diff options
Diffstat (limited to 'src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | src/com/android/inputmethod/latin/LatinIME.java | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/com/android/inputmethod/latin/LatinIME.java b/src/com/android/inputmethod/latin/LatinIME.java index bde04d15a..e5ad75bca 100644 --- a/src/com/android/inputmethod/latin/LatinIME.java +++ b/src/com/android/inputmethod/latin/LatinIME.java @@ -190,6 +190,7 @@ public class LatinIME extends InputMethodService } if (!mTutorialShownBefore && mTutorial != null) { mTutorial.close(false); + mTutorial = null; } super.onConfigurationChanged(conf); } @@ -299,23 +300,35 @@ public class LatinIME extends InputMethodService if (mSuggest != null) { mSuggest.setCorrectionMode(mCorrectionMode); } + mPredictionOn = mPredictionOn && mCorrectionMode > 0; if (!mTutorialShownBefore && mTutorial == null) { - mHandler.sendEmptyMessageDelayed(MSG_CHECK_TUTORIAL, 1000); + mHandler.sendEmptyMessageDelayed(MSG_CHECK_TUTORIAL, + mInputView.isShown() ? 100 : 3000); } - mPredictionOn = mPredictionOn && mCorrectionMode > 0; if (TRACE) Debug.startMethodTracing("latinime"); } @Override + public void onWindowShown() { + super.onWindowShown(); + // Bring the tutorial up faster, if window just shown + if (!mTutorialShownBefore && mTutorial == null) { + mHandler.removeMessages(MSG_CHECK_TUTORIAL); + mHandler.sendEmptyMessageDelayed(MSG_CHECK_TUTORIAL, 1000); + } + } + + @Override public void onFinishInput() { super.onFinishInput(); if (mInputView != null) { mInputView.closing(); } - if (!mTutorialShownBefore && mTutorial != null) { - mTutorial.close(false); - } +// if (!mTutorialShownBefore && mTutorial != null) { +// mTutorial.close(false); +// mTutorial = null; +// } } @Override @@ -346,6 +359,10 @@ public class LatinIME extends InputMethodService @Override public void hideWindow() { if (TRACE) Debug.stopMethodTracing(); + if (!mTutorialShownBefore && mTutorial != null) { + mTutorial.close(false); + mTutorial = null; + } super.hideWindow(); TextEntryState.endSession(); } @@ -982,7 +999,7 @@ public class LatinIME extends InputMethodService // Get the settings preferences SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this); mProximityCorrection = sp.getBoolean(PREF_PROXIMITY_CORRECTION, true); - mVibrateOn = sp.getBoolean(PREF_VIBRATE_ON, true); + mVibrateOn = sp.getBoolean(PREF_VIBRATE_ON, false); mSoundOn = sp.getBoolean(PREF_SOUND_ON, false); String predictionBasic = getString(R.string.prediction_basic); String mode = sp.getString(PREF_PREDICTION, predictionBasic); |