diff options
author | Bart Sears <bsears@google.com> | 2015-05-07 01:52:07 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-07 01:52:08 +0000 |
commit | 1b0888fe8e70ddb92090edbaea545f2766ee404e (patch) | |
tree | 7f6c873c631702a827d83d7358b87649d770f0b2 /core | |
parent | ee2e8fbe71444baac010d363cca9a113e12abdb6 (diff) | |
parent | d130bdc462b163f9afcaf144b477be80959e04d6 (diff) | |
download | frameworks_base-1b0888fe8e70ddb92090edbaea545f2766ee404e.zip frameworks_base-1b0888fe8e70ddb92090edbaea545f2766ee404e.tar.gz frameworks_base-1b0888fe8e70ddb92090edbaea545f2766ee404e.tar.bz2 |
Merge "Revert "Always show auxiliary subtypes from NavBar keyboard icon."" into mnc-dev
Diffstat (limited to 'core')
3 files changed, 6 insertions, 39 deletions
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 040fd37..78604bf 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -247,13 +247,6 @@ public final class InputMethodManager { /** @hide */ public static final int DISPATCH_HANDLED = 1; - /** @hide */ - public static final int SHOW_IM_PICKER_MODE_AUTO = 0; - /** @hide */ - public static final int SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES = 1; - /** @hide */ - public static final int SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES = 2; - final IInputMethodManager mService; final Looper mMainLooper; @@ -1897,28 +1890,9 @@ public final class InputMethodManager { } } - /** - * Shows the input method chooser dialog. - * - * @param showAuxiliarySubtypes Set true to show auxiliary input methods. - * @hide - */ - public void showInputMethodPicker(boolean showAuxiliarySubtypes) { - synchronized (mH) { - try { - final int mode = showAuxiliarySubtypes ? - SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES: - SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES; - mService.showInputMethodPickerFromClient(mClient, mode); - } catch (RemoteException e) { - Log.w(TAG, "IME died: " + mCurId, e); - } - } - } - private void showInputMethodPickerLocked() { try { - mService.showInputMethodPickerFromClient(mClient, SHOW_IM_PICKER_MODE_AUTO); + mService.showInputMethodPickerFromClient(mClient); } catch (RemoteException e) { Log.w(TAG, "IME died: " + mCurId, e); } diff --git a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java index ce94727..52485dd 100644 --- a/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java +++ b/core/java/com/android/internal/inputmethod/InputMethodSubtypeSwitchingController.java @@ -196,7 +196,7 @@ public class InputMethodSubtypeSwitchingController { } public List<ImeSubtypeListItem> getSortedInputMethodAndSubtypeList( - boolean showSubtypes, boolean includeAuxiliarySubtypes, boolean isScreenLocked) { + boolean showSubtypes, boolean inputShown, boolean isScreenLocked) { final ArrayList<ImeSubtypeListItem> imList = new ArrayList<ImeSubtypeListItem>(); final HashMap<InputMethodInfo, List<InputMethodSubtype>> immis = @@ -205,12 +205,6 @@ public class InputMethodSubtypeSwitchingController { if (immis == null || immis.size() == 0) { return Collections.emptyList(); } - if (isScreenLocked && includeAuxiliarySubtypes) { - if (DEBUG) { - Slog.w(TAG, "Auxiliary subtypes are not allowed to be shown in lock screen."); - } - includeAuxiliarySubtypes = false; - } mSortedImmis.clear(); mSortedImmis.putAll(immis); for (InputMethodInfo imi : mSortedImmis.keySet()) { @@ -233,7 +227,7 @@ public class InputMethodSubtypeSwitchingController { final String subtypeHashCode = String.valueOf(subtype.hashCode()); // We show all enabled IMEs and subtypes when an IME is shown. if (enabledSubtypeSet.contains(subtypeHashCode) - && (includeAuxiliarySubtypes || !subtype.isAuxiliary())) { + && ((inputShown && !isScreenLocked) || !subtype.isAuxiliary())) { final CharSequence subtypeLabel = subtype.overridesImplicitlyEnabledSubtype() ? null : subtype .getDisplayName(mContext, imi.getPackageName(), @@ -522,8 +516,8 @@ public class InputMethodSubtypeSwitchingController { } public List<ImeSubtypeListItem> getSortedInputMethodAndSubtypeListLocked(boolean showSubtypes, - boolean includingAuxiliarySubtypes, boolean isScreenLocked) { + boolean inputShown, boolean isScreenLocked) { return mSubtypeList.getSortedInputMethodAndSubtypeList( - showSubtypes, includingAuxiliarySubtypes, isScreenLocked); + showSubtypes, inputShown, isScreenLocked); } } diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl index 60c5e42..6f104dd 100644 --- a/core/java/com/android/internal/view/IInputMethodManager.aidl +++ b/core/java/com/android/internal/view/IInputMethodManager.aidl @@ -59,8 +59,7 @@ interface IInputMethodManager { int controlFlags, int softInputMode, int windowFlags, in EditorInfo attribute, IInputContext inputContext); - void showInputMethodPickerFromClient(in IInputMethodClient client, - int auxiliarySubtypeMode); + void showInputMethodPickerFromClient(in IInputMethodClient client); void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId); void setInputMethod(in IBinder token, String id); void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype); |