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

Commit 398780ae authored by Svet Ganov's avatar Svet Ganov Committed by android-build-merger
Browse files

Merge "Don't access keyguard from instant apps." into pi-dev am: e7bd4e7e

am: cbd47f79

Change-Id: Ia58918ec4c66f9263ad7d0e27e74ae1b87402ba4
parents db8f8141 cbd47f79
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2031,7 +2031,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
                 * Do this in onKeyUp since the Search key is also used for
                 * chording quick launch shortcuts.
                 */
                if (getKeyguardManager().inKeyguardRestrictedInputMode()) {
                if (isNotInstantAppAndKeyguardRestricted()) {
                    break;
                }
                if ((getContext().getResources().getConfiguration().uiMode
@@ -2055,6 +2055,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
        return false;
    }

    private boolean isNotInstantAppAndKeyguardRestricted() {
        return !getContext().getPackageManager().isInstantApp()
            && getKeyguardManager().inKeyguardRestrictedInputMode();
    }

    @Override
    protected void onActive() {
    }