Hide ongoing notification icon when the screen is locked.
Bug: 5858903 Change-Id: Ibee9123f4a520e77f4baf8bdd3d75364ab451100
This commit is contained in:
@ -1132,6 +1132,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
|
||||
private boolean needsToShowImeSwitchOngoingNotification() {
|
||||
if (!mShowOngoingImeSwitcherForPhones) return false;
|
||||
if (isScreenLocked()) return false;
|
||||
synchronized (mMethodMap) {
|
||||
List<InputMethodInfo> imis = mSettings.getEnabledInputMethodListLocked();
|
||||
final int N = imis.size();
|
||||
@ -2148,15 +2149,18 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
|
||||
mContext.startActivity(intent);
|
||||
}
|
||||
|
||||
private boolean isScreenLocked() {
|
||||
return mKeyguardManager != null
|
||||
&& mKeyguardManager.isKeyguardLocked() && mKeyguardManager.isKeyguardSecure();
|
||||
}
|
||||
private void showInputMethodMenuInternal(boolean showSubtypes) {
|
||||
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();
|
||||
final boolean isScreenLocked = isScreenLocked();
|
||||
|
||||
String lastInputMethodId = Settings.Secure.getString(context
|
||||
final String lastInputMethodId = Settings.Secure.getString(context
|
||||
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
|
||||
int lastInputMethodSubtypeId = getSelectedInputMethodSubtypeId(lastInputMethodId);
|
||||
if (DEBUG) Slog.v(TAG, "Current IME: " + lastInputMethodId);
|
||||
|
Reference in New Issue
Block a user