diff options
author | Amith Yamasani <yamasani@google.com> | 2010-03-24 21:45:37 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2010-03-24 22:30:16 -0700 |
commit | 305b0fb47c16f5ded987a9fcd7a9aa22fc70c2eb (patch) | |
tree | dfa5f50bc2372d57cef316ccf2c78f78b5ab3482 /src | |
parent | 3d503e356f2a4ca6b5baaceec9ea0f04cf038609 (diff) | |
download | packages_apps_Settings-305b0fb47c16f5ded987a9fcd7a9aa22fc70c2eb.zip packages_apps_Settings-305b0fb47c16f5ded987a9fcd7a9aa22fc70c2eb.tar.gz packages_apps_Settings-305b0fb47c16f5ded987a9fcd7a9aa22fc70c2eb.tar.bz2 |
Fix 2242164 Soft keyboard keeps getting enabled even if I disable it
On keyboardful devices, it is possible to disable the system soft input
method. Something changed in eclair that caused the ime to be re-enabled
on every package manager update (packages added/deleted).
Now keep track of disabled system imes in the settings db and search
in that list before enabling a system IME on package changes.
Every time the user goes to settings to enable/disable imes, the list
is re-created.
Any new system IMEs that may be added via an OTA will get enabled if
they have a different package name.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/LanguageSettings.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/settings/LanguageSettings.java b/src/com/android/settings/LanguageSettings.java index 4d1f994..91d260c 100644 --- a/src/com/android/settings/LanguageSettings.java +++ b/src/com/android/settings/LanguageSettings.java @@ -180,7 +180,8 @@ public class LanguageSettings extends PreferenceActivity { super.onPause(); StringBuilder builder = new StringBuilder(256); - + StringBuilder disabledSysImes = new StringBuilder(256); + int firstEnabled = -1; int N = mInputMethodProperties.size(); for (int i = 0; i < N; ++i) { @@ -199,6 +200,12 @@ public class LanguageSettings extends PreferenceActivity { } else if (hasIt) { mLastInputMethodId = mLastTickedInputMethodId; } + // If it's a disabled system ime, add it to the disabled list so that it + // doesn't get enabled automatically on any changes to the package list + if (pref != null && !pref.isChecked() && systemIme && mHaveHardKeyboard) { + if (disabledSysImes.length() > 0) disabledSysImes.append(":"); + disabledSysImes.append(id); + } } // If the last input method is unset, set it as the first enabled one. @@ -213,6 +220,8 @@ public class LanguageSettings extends PreferenceActivity { Settings.Secure.putString(getContentResolver(), Settings.Secure.ENABLED_INPUT_METHODS, builder.toString()); Settings.Secure.putString(getContentResolver(), + Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS, disabledSysImes.toString()); + Settings.Secure.putString(getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD, mLastInputMethodId != null ? mLastInputMethodId : ""); } |