am 913a8925: DO NOT MERGE. Backport master InputMethodManagerService.java to gingerbread
Merge commit '913a8925c07e854a80bf5df87561f290d3a56d61' into gingerbread-plus-aosp * commit '913a8925c07e854a80bf5df87561f290d3a56d61': DO NOT MERGE. Backport master InputMethodManagerService.java to gingerbread
This commit is contained in:
@@ -475,8 +475,10 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
mContext.getContentResolver(),
|
mContext.getContentResolver(),
|
||||||
Settings.Secure.ENABLED_INPUT_METHODS);
|
Settings.Secure.ENABLED_INPUT_METHODS);
|
||||||
Slog.i(TAG, "Enabled input methods: " + enabledStr);
|
Slog.i(TAG, "Enabled input methods: " + enabledStr);
|
||||||
if (enabledStr == null) {
|
final String defaultIme = Settings.Secure.getString(mContext
|
||||||
Slog.i(TAG, "Enabled input methods has not been set, enabling all");
|
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||||
|
if (enabledStr == null || TextUtils.isEmpty(defaultIme)) {
|
||||||
|
Slog.i(TAG, "Enabled input methods or default IME has not been set, enabling all");
|
||||||
InputMethodInfo defIm = null;
|
InputMethodInfo defIm = null;
|
||||||
StringBuilder sb = new StringBuilder(256);
|
StringBuilder sb = new StringBuilder(256);
|
||||||
final int N = mMethodList.size();
|
final int N = mMethodList.size();
|
||||||
@@ -981,7 +983,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
void setInputMethodLocked(String id) {
|
void setInputMethodLocked(String id) {
|
||||||
InputMethodInfo info = mMethodMap.get(id);
|
InputMethodInfo info = mMethodMap.get(id);
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
throw new IllegalArgumentException("Unknown id: " + mCurMethodId);
|
throw new IllegalArgumentException("Unknown id: " + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id.equals(mCurMethodId)) {
|
if (id.equals(mCurMethodId)) {
|
||||||
@@ -1479,7 +1481,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
|||||||
|
|
||||||
String defaultIme = Settings.Secure.getString(mContext
|
String defaultIme = Settings.Secure.getString(mContext
|
||||||
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||||
if (!map.containsKey(defaultIme)) {
|
if (!TextUtils.isEmpty(defaultIme) && !map.containsKey(defaultIme)) {
|
||||||
if (chooseNewDefaultIMELocked()) {
|
if (chooseNewDefaultIMELocked()) {
|
||||||
updateFromSettingsLocked();
|
updateFromSettingsLocked();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user