diff options
Diffstat (limited to 'services/java/com/android/server/InputMethodManagerService.java')
-rw-r--r-- | services/java/com/android/server/InputMethodManagerService.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 6b64dd0..38bcebc 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -619,10 +619,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } void updateImeWindowStatusLocked() { - if (mStatusBar != null) { - mStatusBar.setImeWindowStatus(mCurToken, mImeWindowVis, - mBackDisposition); - } + setImeWindowStatus(mCurToken, mImeWindowVis, mBackDisposition); } @Override @@ -995,6 +992,8 @@ public class InputMethodManagerService extends IInputMethodManager.Stub sessionState.session.finishSession(); } catch (RemoteException e) { Slog.w(TAG, "Session failed to close due to remote exception", e); + mImeWindowVis = 0; + updateImeWindowStatusLocked(); } } } @@ -1121,6 +1120,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } } + @SuppressWarnings("deprecation") @Override public void setImeWindowStatus(IBinder token, int vis, int backDisposition) { int uid = Binder.getCallingUid(); @@ -2018,8 +2018,9 @@ public class InputMethodManagerService extends IInputMethodManager.Stub if (DEBUG) Slog.v(TAG, "Show switching menu"); final Context context = mContext; - final PackageManager pm = context.getPackageManager(); + final boolean isScreenLocked = mKeyguardManager != null + && mKeyguardManager.isKeyguardLocked() && mKeyguardManager.isKeyguardSecure(); String lastInputMethodId = Settings.Secure.getString(context .getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD); @@ -2075,7 +2076,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub final String subtypeHashCode = String.valueOf(subtype.hashCode()); // We show all enabled IMEs and subtypes when an IME is shown. if (enabledSubtypeSet.contains(subtypeHashCode) - && (mInputShown || !subtype.isAuxiliary())) { + && ((mInputShown && !isScreenLocked) || !subtype.isAuxiliary())) { final CharSequence title; final String mode = subtype.getMode(); title = TextUtils.concat(subtype.getDisplayName(context, @@ -2162,8 +2163,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } }); - if (showSubtypes && mKeyguardManager != null && !(mKeyguardManager.isKeyguardLocked() - && mKeyguardManager.isKeyguardSecure())) { + if (showSubtypes && !isScreenLocked) { mDialogBuilder.setPositiveButton( com.android.internal.R.string.configure_input_methods, new DialogInterface.OnClickListener() { @@ -2591,6 +2591,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub } // TODO: We should change the return type from List to List<Parcelable> + @SuppressWarnings("rawtypes") @Override public List getShortcutInputMethodsAndSubtypes() { synchronized (mMethodMap) { |