Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35f5ec71 authored by Youngjun Kwak's avatar Youngjun Kwak Committed by Automerger Merge Worker
Browse files

Merge "Show Bouncer (Unocclude it) if Activity Dismissing Keyguard is launched...

Merge "Show Bouncer (Unocclude it) if Activity Dismissing Keyguard is launched while Keyguard is occluded." into rvc-dev am: 4b7fbdfb am: e2002f3e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11816089

Change-Id: I2a2c7c1893ccfafc47f7f0d967e7b837bbd7cccd
parents 25b5c8fb e2002f3e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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);
        }