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

Commit aebfbfd3 authored by Demon000's avatar Demon000 Committed by Luca Stefani
Browse files

KeyguardView: report transiting bouncer as shown

FOD icon is shown until after the bouncer animation
is completed because onKeyguardBouncerChanged isn't
called when the bouncher animation is started.
Call updateStates when starting to show bouncer
and make sure a transitioning bouncer is considered
shown to make the FOD icon dissapear without
overlapping bouncer.

Change-Id: I4e452a6839586775264e087a7820ecc2bcf9a2cc
parent 9213b9f5
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -105,6 +105,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb

        @Override
        public void onStartingToShow() {
            updateStates();
            updateLockIcon();
        }

@@ -150,6 +151,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    protected boolean mLastShowing;
    protected boolean mLastOccluded;
    private boolean mLastBouncerShowing;
    private boolean mLastBouncerInTransit;
    private boolean mLastBouncerDismissible;
    protected boolean mLastRemoteInputActive;
    private boolean mLastDozing;
@@ -787,6 +789,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        boolean showing = mShowing;
        boolean occluded = mOccluded;
        boolean bouncerShowing = mBouncer.isShowing();
        boolean bouncerInTransit = mBouncer.inTransit();
        boolean bouncerDismissible = !mBouncer.isFullscreenBouncer();
        boolean remoteInputActive = mRemoteInputActive;

@@ -815,14 +818,18 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        if ((showing && !occluded) != (mLastShowing && !mLastOccluded) || mFirstUpdate) {
            updateMonitor.onKeyguardVisibilityChanged(showing && !occluded);
        }
        if (bouncerShowing != mLastBouncerShowing || mFirstUpdate) {
            updateMonitor.sendKeyguardBouncerChanged(bouncerShowing);

        boolean bouncerVisible = bouncerShowing || bouncerInTransit;
        boolean lastBouncerVisible = mLastBouncerShowing || mLastBouncerInTransit;
        if (bouncerVisible != lastBouncerVisible || mFirstUpdate) {
            updateMonitor.sendKeyguardBouncerChanged(bouncerVisible);
        }

        mFirstUpdate = false;
        mLastShowing = showing;
        mLastOccluded = occluded;
        mLastBouncerShowing = bouncerShowing;
        mLastBouncerInTransit = bouncerInTransit;
        mLastBouncerDismissible = bouncerDismissible;
        mLastRemoteInputActive = remoteInputActive;
        mLastDozing = mDozing;