mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 00:44:23 -05:00
082bc48c32
https://review.lineageos.org/q/topic:P_asb_2022-05 https://review.lineageos.org/q/topic:P_asb_2022-06 https://review.lineageos.org/q/topic:P_asb_2022-07 https://review.lineageos.org/q/topic:P_asb_2022-08 https://review.lineageos.org/q/topic:P_asb_2022-09 https://review.lineageos.org/q/topic:P_asb_2022-10 https://review.lineageos.org/q/topic:P_asb_2022-11 https://review.lineageos.org/q/topic:P_asb_2022-12 https://review.lineageos.org/q/topic:P_asb_2023-01 https://review.lineageos.org/q/topic:P_asb_2023-02 https://review.lineageos.org/q/topic:P_asb_2023-03 https://review.lineageos.org/q/topic:P_asb_2023-04 https://review.lineageos.org/q/topic:P_asb_2023-05 https://review.lineageos.org/q/topic:P_asb_2023-06 https://review.lineageos.org/q/topic:P_asb_2023-07 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/361250 https://review.lineageos.org/q/topic:P_asb_2023-08 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/364606 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/365328 https://review.lineageos.org/q/topic:P_asb_2023-09 https://review.lineageos.org/q/topic:P_asb_2023-10 https://review.lineageos.org/q/topic:P_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/374916 https://review.lineageos.org/q/topic:P_asb_2023-12 https://review.lineageos.org/q/topic:P_asb_2024-01 https://review.lineageos.org/q/topic:P_asb_2024-02 https://review.lineageos.org/q/topic:P_asb_2024-03 https://review.lineageos.org/q/topic:P_asb_2024-04 Signed-off-by: Tavi <tavi@divested.dev>
72 lines
3.3 KiB
Diff
72 lines
3.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Beverly Tai <beverlyt@google.com>
|
|
Date: Tue, 19 Sep 2023 21:01:11 +0000
|
|
Subject: [PATCH] Updated: always show the keyguard on device lockdown
|
|
|
|
Additionally, don't hide keyguard when it's disabled if the user has locked
|
|
down the device.
|
|
|
|
Manual test steps:
|
|
1. Enable app pinning and disable "Ask for PIN before unpinning" setting
|
|
2. Pin an app (ie: Settings)
|
|
3. Lockdown from the power menu
|
|
4. Observe: user is brought to the keyguard, primary auth is
|
|
required to enter the device.
|
|
=> After entering correct credential, the device is still in
|
|
app pinning mode.
|
|
=> After entering an incorrect credential, the keyguard remains
|
|
showing and the user can attempt again up to the limit
|
|
|
|
Bug: 300463732
|
|
Bug: 218495634
|
|
Test: atest KeyguardViewMediatorTest
|
|
Test: manual
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:35a6e2f2c952440b1102033b2c3e496438503cff)
|
|
Merged-In: I70fdae80f717712b3dfc9df54b9649959b4bb8f0
|
|
Change-Id: I70fdae80f717712b3dfc9df54b9649959b4bb8f0
|
|
---
|
|
.../systemui/keyguard/KeyguardViewMediator.java | 16 ++++++++++++++--
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
index 292e9e752052..c7d231f6f522 100644
|
|
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
|
@@ -571,6 +571,13 @@ public class KeyguardViewMediator extends SystemUI {
|
|
}
|
|
}
|
|
|
|
+ @Override
|
|
+ public void onStrongAuthStateChanged(int userId) {
|
|
+ if (mLockPatternUtils.isUserInLockdown(KeyguardUpdateMonitor.getCurrentUser())) {
|
|
+ doKeyguardLocked(null);
|
|
+ }
|
|
+ }
|
|
+
|
|
@Override
|
|
public void onTrustChanged(int userId) {
|
|
if (userId == KeyguardUpdateMonitor.getCurrentUser()) {
|
|
@@ -1129,6 +1136,10 @@ public class KeyguardViewMediator extends SystemUI {
|
|
mExternallyEnabled = enabled;
|
|
|
|
if (!enabled && mShowing) {
|
|
+ if (mLockPatternUtils.isUserInLockdown(KeyguardUpdateMonitor.getCurrentUser())) {
|
|
+ Log.d(TAG, "keyguardEnabled(false) overridden by user lockdown");
|
|
+ return;
|
|
+ }
|
|
if (mExitSecureCallback != null) {
|
|
if (DEBUG) Log.d(TAG, "in process of verifyUnlock request, ignoring");
|
|
// we're in the process of handling a request to verify the user
|
|
@@ -1340,8 +1351,9 @@ public class KeyguardViewMediator extends SystemUI {
|
|
return;
|
|
}
|
|
|
|
- // if another app is disabling us, don't show
|
|
- if (!mExternallyEnabled) {
|
|
+ // if another app is disabling us, don't show unless we're in lockdown mode
|
|
+ if (!mExternallyEnabled
|
|
+ && !mLockPatternUtils.isUserInLockdown(KeyguardUpdateMonitor.getCurrentUser())) {
|
|
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled");
|
|
|
|
// note: we *should* set mNeedToReshowWhenReenabled=true here, but that makes
|