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

Commit f11b3980 authored by Justin Dunlap's avatar Justin Dunlap Committed by Android (Google) Code Review
Browse files

Merge "Don't show dismissible keyguard in app pinning mode" into security-aosp-25Q2-staging

parents c96de2de 71cb04bb
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -333,6 +333,7 @@ public class KeyguardService extends Service {
    };
    private final KeyguardServiceShowLockscreenInteractor mKeyguardServiceShowLockscreenInteractor;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
    private final ActivityManager mActivityManager;

    @Inject
    public KeyguardService(
@@ -359,7 +360,8 @@ public class KeyguardService extends Service {
            Lazy<DeviceEntryInteractor> deviceEntryInteractorLazy,
            KeyguardStateCallbackInteractor keyguardStateCallbackInteractor,
            KeyguardServiceShowLockscreenInteractor keyguardServiceShowLockscreenInteractor,
            KeyguardUpdateMonitor keyguardUpdateMonitor) {
            KeyguardUpdateMonitor keyguardUpdateMonitor,
            ActivityManager activityManager) {
        super();
        mKeyguardViewMediator = keyguardViewMediator;
        mKeyguardLifecyclesDispatcher = keyguardLifecyclesDispatcher;
@@ -393,6 +395,7 @@ public class KeyguardService extends Service {
        mKeyguardDismissInteractor = keyguardDismissInteractor;
        mKeyguardServiceShowLockscreenInteractor = keyguardServiceShowLockscreenInteractor;
        mKeyguardUpdateMonitor = keyguardUpdateMonitor;
        mActivityManager = activityManager;
    }

    @Override
@@ -684,6 +687,11 @@ public class KeyguardService extends Service {
        public void showDismissibleKeyguard() {
            trace("showDismissibleKeyguard");
            checkPermission();

            if (mActivityManager.getLockTaskModeState() != ActivityManager.LOCK_TASK_MODE_NONE) {
                return;
            }

            if (mFoldGracePeriodProvider.get().isEnabled()) {
                mKeyguardInteractor.showDismissibleKeyguard();
            }