mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-25 07:29:24 -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>
65 lines
3.4 KiB
Diff
65 lines
3.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aaron Liu <aaronjli@google.com>
|
|
Date: Fri, 11 Aug 2023 11:02:33 -0700
|
|
Subject: [PATCH] DO NOT MERGE Ensure finish lockscreen when usersetup
|
|
incomplete
|
|
|
|
Ensure that when the usersetup for the user is not complete, we do not
|
|
want to go to lockscreen, even if lockscreen is not disabled.
|
|
|
|
Bug: 222446076
|
|
Test: add Unit test,
|
|
Test: Wipe device, auth sim pin in setup, observe that lockscreen is
|
|
not there.
|
|
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:01ea2f91df5a1c67da2546d83beeee75c2c1ef94)
|
|
Merged-In: I8e33db8eb6e2c917966cab3d6a4f982670473040
|
|
Change-Id: I8e33db8eb6e2c917966cab3d6a4f982670473040
|
|
---
|
|
.../android/keyguard/KeyguardSecurityContainer.java | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
index bb205956e932..a6fa034cb901 100644
|
|
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java
|
|
@@ -32,6 +32,8 @@ import android.widget.FrameLayout;
|
|
|
|
import com.android.internal.widget.LockPatternUtils;
|
|
import com.android.keyguard.KeyguardSecurityModel.SecurityMode;
|
|
+import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
|
+import com.android.systemui.Dependency;
|
|
|
|
public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSecurityView {
|
|
private static final boolean DEBUG = KeyguardConstants.DEBUG;
|
|
@@ -50,6 +52,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
private SecurityCallback mSecurityCallback;
|
|
private AlertDialog mAlertDialog;
|
|
|
|
+ private final DeviceProvisionedController mDeviceProvisionedController;
|
|
+
|
|
private final KeyguardUpdateMonitor mUpdateMonitor;
|
|
|
|
// Used to notify the container when something interesting happens.
|
|
@@ -81,6 +85,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
mSecurityModel = new KeyguardSecurityModel(context);
|
|
mLockPatternUtils = new LockPatternUtils(context);
|
|
mUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext);
|
|
+ mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class);
|
|
}
|
|
|
|
public void setSecurityCallback(SecurityCallback callback) {
|
|
@@ -351,8 +356,11 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe
|
|
case SimPuk:
|
|
// Shortcut for SIM PIN/PUK to go to directly to user's security screen or home
|
|
SecurityMode securityMode = mSecurityModel.getSecurityMode(targetUserId);
|
|
- if (securityMode == SecurityMode.None || mLockPatternUtils.isLockScreenDisabled(
|
|
- KeyguardUpdateMonitor.getCurrentUser())) {
|
|
+ boolean isLockscreenDisabled = mLockPatternUtils.isLockScreenDisabled(
|
|
+ KeyguardUpdateMonitor.getCurrentUser())
|
|
+ || !mDeviceProvisionedController.isUserSetup(targetUserId);
|
|
+
|
|
+ if (securityMode == SecurityMode.None && isLockscreenDisabled) {
|
|
finish = true;
|
|
} else {
|
|
showSecurityScreen(securityMode);
|