summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author kwaky <kwaky@google.com> 2020-06-09 17:03:12 -0700
committer kwaky <kwaky@google.com> 2020-06-09 17:13:35 -0700
commitb3890939c4f402920dc3bebc67f77e422d81a3d5 (patch)
treecb2684788c2ccf0fc4493a3bb0b1b5eca7111c46
parent24790e967e82610783602cc903add3314d969ad4 (diff)
Show Bouncer (Unocclude it) if Activity Dismissing Keyguard is launched
while Keyguard is occluded. Test: android.server.wm.MultiDisplayLockedKeyguardTests passing without flakiness (10 passes/10 attempts). Bug: 156117648 Change-Id: I744c566433614a9de6fec3de9d4e9581472f73cf
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
index 2dad5f872e73..69766cc6c0d0 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/keyguard/CarKeyguardViewController.java
@@ -103,6 +103,7 @@ public class CarKeyguardViewController extends OverlayViewController implements
private KeyguardBouncer mBouncer;
private OnKeyguardCancelClickedListener mKeyguardCancelClickedListener;
private boolean mShowing;
+ private boolean mIsOccluded;
@Inject
public CarKeyguardViewController(
@@ -220,6 +221,7 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override
public void setOccluded(boolean occluded, boolean animate) {
+ mIsOccluded = occluded;
getOverlayViewGlobalStateController().setOccluded(occluded);
if (!occluded) {
reset(/* hideBouncerWhenShowing= */ false);
@@ -244,6 +246,12 @@ public class CarKeyguardViewController extends OverlayViewController implements
@Override
public void dismissAndCollapse() {
+ // If dismissing and collapsing Keyguard is requested (e.g. by a Keyguard-dismissing
+ // Activity) while Keyguard is occluded, unocclude Keyguard so the user can authenticate to
+ // dismiss Keyguard.
+ if (mIsOccluded) {
+ setOccluded(/* occluded= */ false, /* animate= */ false);
+ }
if (!mBouncer.isSecure()) {
hide(/* startTime= */ 0, /* fadeoutDuration= */ 0);
}