diff options
| author | 2023-06-12 14:28:19 +0000 | |
|---|---|---|
| committer | 2023-06-12 14:28:19 +0000 | |
| commit | e4a6aabf43071fa3201f95bd0d0be33117009ccc (patch) | |
| tree | 6bbea9521dffa6d1e1442a943732fdaf87b6c201 | |
| parent | 9bba082dacdfe0103bf17b96927107b1f05bdb05 (diff) | |
| parent | 6aa744f4f5fcd331b8798d48513e7eb1bdf5dd68 (diff) | |
Merge "Remove dismiss check from security container" into udc-dev am: 27dcd8bbb8 am: 6aa744f4f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23632012
Change-Id: Ica479e252a3f3eeb4daa90ebd09299a64af20023
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 files changed, 0 insertions, 22 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index c1344e001d0c..7c511a32bb36 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -275,13 +275,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard */ @Override public void finish(boolean fromPrimaryAuth, int targetUserId) { - if (!mKeyguardStateController.canDismissLockScreen() && !fromPrimaryAuth) { - Log.e(TAG, - "Tried to dismiss keyguard when lockscreen is not dismissible and user " - + "was not authenticated with a primary security method " - + "(pin/password/pattern)."); - return; - } // If there's a pending runnable because the user interacted with a widget // and we're leaving keyguard, then run it. boolean deferKeyguardDone = false; diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java index f59fd99b9a01..e561f1f233b4 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.java @@ -587,21 +587,6 @@ public class KeyguardSecurityContainerControllerTest extends SysuiTestCase { } @Test - public void testSecurityCallbackFinish() { - when(mKeyguardStateController.canDismissLockScreen()).thenReturn(true); - when(mKeyguardUpdateMonitor.isUserUnlocked(0)).thenReturn(true); - mKeyguardSecurityContainerController.finish(true, 0); - verify(mViewMediatorCallback).keyguardDone(anyBoolean(), anyInt()); - } - - @Test - public void testSecurityCallbackFinish_cannotDismissLockScreenAndNotStrongAuth() { - when(mKeyguardStateController.canDismissLockScreen()).thenReturn(false); - mKeyguardSecurityContainerController.finish(false, 0); - verify(mViewMediatorCallback, never()).keyguardDone(anyBoolean(), anyInt()); - } - - @Test public void testOnStartingToHide() { mKeyguardSecurityContainerController.onStartingToHide(); verify(mKeyguardSecurityViewFlipperController).getSecurityView(any(SecurityMode.class), |