Loading services/java/com/android/server/InputMethodManagerService.java +21 −17 Original line number Diff line number Diff line Loading @@ -1912,7 +1912,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // If there are no selected subtypes, tries finding the most applicable one according to the // current system locale private int findApplicableSubtype(String id) { private int findApplicableSubtypeLocked(String id) { InputMethodInfo imi = mMethodMap.get(id); if (imi == null) { return NOT_A_SUBTYPE_ID; Loading Loading @@ -1954,6 +1954,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub * @return Return the current subtype of this input method. */ public InputMethodSubtype getCurrentInputMethodSubtype() { synchronized (mMethodMap) { boolean subtypeIsSelected = false; try { subtypeIsSelected = Settings.Secure.getInt(mContext.getContentResolver(), Loading @@ -1961,18 +1962,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } catch (SettingNotFoundException e) { } if (!subtypeIsSelected || mCurrentSubtype == null) { String lastInputMethodId = Settings.Secure.getString(mContext .getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); String lastInputMethodId = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); int subtypeId = getSelectedInputMethodSubtypeId(lastInputMethodId); if (subtypeId == NOT_A_SUBTYPE_ID) { subtypeId = findApplicableSubtype(lastInputMethodId); subtypeId = findApplicableSubtypeLocked(lastInputMethodId); } if (subtypeId != NOT_A_SUBTYPE_ID) { mCurrentSubtype = mMethodMap.get(lastInputMethodId).getSubtypes().get(subtypeId); mCurrentSubtype = mMethodMap.get(lastInputMethodId).getSubtypes().get(subtypeId); } } return mCurrentSubtype; } } public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) { synchronized (mMethodMap) { Loading Loading
services/java/com/android/server/InputMethodManagerService.java +21 −17 Original line number Diff line number Diff line Loading @@ -1912,7 +1912,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub // If there are no selected subtypes, tries finding the most applicable one according to the // current system locale private int findApplicableSubtype(String id) { private int findApplicableSubtypeLocked(String id) { InputMethodInfo imi = mMethodMap.get(id); if (imi == null) { return NOT_A_SUBTYPE_ID; Loading Loading @@ -1954,6 +1954,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub * @return Return the current subtype of this input method. */ public InputMethodSubtype getCurrentInputMethodSubtype() { synchronized (mMethodMap) { boolean subtypeIsSelected = false; try { subtypeIsSelected = Settings.Secure.getInt(mContext.getContentResolver(), Loading @@ -1961,18 +1962,21 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } catch (SettingNotFoundException e) { } if (!subtypeIsSelected || mCurrentSubtype == null) { String lastInputMethodId = Settings.Secure.getString(mContext .getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); String lastInputMethodId = Settings.Secure.getString(mContext.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); int subtypeId = getSelectedInputMethodSubtypeId(lastInputMethodId); if (subtypeId == NOT_A_SUBTYPE_ID) { subtypeId = findApplicableSubtype(lastInputMethodId); subtypeId = findApplicableSubtypeLocked(lastInputMethodId); } if (subtypeId != NOT_A_SUBTYPE_ID) { mCurrentSubtype = mMethodMap.get(lastInputMethodId).getSubtypes().get(subtypeId); mCurrentSubtype = mMethodMap.get(lastInputMethodId).getSubtypes().get(subtypeId); } } return mCurrentSubtype; } } public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) { synchronized (mMethodMap) { Loading