Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c93efc9 authored by satok's avatar satok
Browse files

Hide ongoing notification icon when the screen is locked.

Bug: 5858903
Change-Id: Ibee9123f4a520e77f4baf8bdd3d75364ab451100
parent fbdff47a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -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);