diff options
author | 2012-03-06 19:06:58 +0900 | |
---|---|---|
committer | 2012-03-06 19:07:21 +0900 | |
commit | 89ffb212b469531db4a616afb9bb7ba6d2a56b50 (patch) | |
tree | 79ebc710bd833c2ebec27b333f4890d4ab263767 /java/src | |
parent | 3cd1a00ecacf01f3005e794f01be46648707c741 (diff) | |
download | latinime-89ffb212b469531db4a616afb9bb7ba6d2a56b50.tar.gz latinime-89ffb212b469531db4a616afb9bb7ba6d2a56b50.tar.xz latinime-89ffb212b469531db4a616afb9bb7ba6d2a56b50.zip |
Make the keyboardswitcher and the subtypeswitcher final.
Change-Id: Ifcc79357adcc53f93b190b6e98d5569f42f74655
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 6b9ee9bf0..e755fa4a6 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -193,8 +193,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar private InputMethodManagerCompatWrapper mImm; private Resources mResources; private SharedPreferences mPrefs; - private KeyboardSwitcher mKeyboardSwitcher; - private SubtypeSwitcher mSubtypeSwitcher; + private final KeyboardSwitcher mKeyboardSwitcher; + private final SubtypeSwitcher mSubtypeSwitcher; private VoiceProxy mVoiceProxy; private UserDictionary mUserDictionary; @@ -486,6 +486,12 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } } + public LatinIME() { + super(); + mSubtypeSwitcher = SubtypeSwitcher.getInstance(); + mKeyboardSwitcher = KeyboardSwitcher.getInstance(); + } + @Override public void onCreate() { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); @@ -500,8 +506,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar super.onCreate(); mImm = InputMethodManagerCompatWrapper.getInstance(); - mSubtypeSwitcher = SubtypeSwitcher.getInstance(); - mKeyboardSwitcher = KeyboardSwitcher.getInstance(); mVibrator = VibratorCompatWrapper.getInstance(this); mHandler.onCreate(); DEBUG = LatinImeLogger.sDBG; @@ -549,7 +553,6 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar // Has to be package-visible for unit tests /* package */ void loadSettings() { if (null == mPrefs) mPrefs = PreferenceManager.getDefaultSharedPreferences(this); - if (null == mSubtypeSwitcher) mSubtypeSwitcher = SubtypeSwitcher.getInstance(); mSettingsValues = new SettingsValues(mPrefs, this, mSubtypeSwitcher.getInputLocaleStr()); resetContactsDictionary(null == mSuggest ? null : mSuggest.getContactsDictionary()); } |