diff options
author | 2025-04-17 16:24:22 +0000 | |
---|---|---|
committer | 2025-09-18 09:03:38 +0200 | |
commit | a181481f19dd61ea043c760f13eec61b6261bad7 (patch) | |
tree | 0ed2ef8b4237b301053e778246a863017620c63f | |
parent | e630cfeb0e90a128cea6727384a96b960d74ec26 (diff) |
[SP 2025-09-01] Don't show dismissible keyguard in app pinning mode
On foldables, if the "Continue using apps on fold" is set
to "Swipe up to continue", when closing the device,
a dismissible keyguard will show.
If this setting is set, and there's a pinned app, instead
of showing the dismissible keyguard on fold, we keep the
screen on with the app displayed.
This keeps the app pinned and in the same security state as
when it was unfolded.
Bug: 404252173
Flag: EXEMPT bugfix
Test: manually (given settings described above), pin app, fold;
observe app still shows with screen on
Change-Id: I61e2014b9d21862859090707e5531a61bf966fc3
(cherry picked from commit 14f874decfdd5616b9fb3804154dd2560ebad0a1)
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java index 79685088fed7..eb8db93474bc 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java @@ -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(); } |