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

Commit 04821a89 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE Use KeyguardStateController for #isShowing" into tm-qpr-dev

parents 1387d8d4 e6e7b75d
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -3178,14 +3178,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
     * Whether the keyguard is showing and not occluded.
     */
    public boolean isKeyguardVisible() {
        return isKeyguardShowing() && !mKeyguardOccluded;
    }

    /**
     * Whether the keyguard is showing. It may still be occluded and not visible.
     */
    public boolean isKeyguardShowing() {
        return mKeyguardShowing;
        return mKeyguardShowing && !mKeyguardOccluded;
    }

    /**
+0 −5
Original line number Diff line number Diff line
@@ -93,11 +93,6 @@ public interface KeyguardViewController {
     */
    void setOccluded(boolean occluded, boolean animate);

    /**
     * @return Whether the keyguard is showing
     */
    boolean isShowing();

    /**
     * Dismisses the keyguard by going to the next screen or making it gone.
     */
+1 −1
Original line number Diff line number Diff line
@@ -219,7 +219,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
                mView.animateInUdfpsBouncer(null);
            }

            if (mKeyguardViewManager.isOccluded()) {
            if (mKeyguardStateController.isOccluded()) {
                mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(true);
            }

+3 −3
Original line number Diff line number Diff line
@@ -666,7 +666,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
            return
        }

        if (keyguardViewController.isShowing && !playingCannedUnlockAnimation) {
        if (keyguardStateController.isShowing && !playingCannedUnlockAnimation) {
            showOrHideSurfaceIfDismissAmountThresholdsReached()

            // If the surface is visible or it's about to be, start updating its appearance to
@@ -726,7 +726,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
    private fun finishKeyguardExitRemoteAnimationIfReachThreshold() {
        // no-op if keyguard is not showing or animation is not enabled.
        if (!KeyguardService.sEnableRemoteKeyguardGoingAwayAnimation ||
                !keyguardViewController.isShowing) {
                !keyguardStateController.isShowing) {
            return
        }

@@ -849,7 +849,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
     * animation.
     */
    fun hideKeyguardViewAfterRemoteAnimation() {
        if (keyguardViewController.isShowing) {
        if (keyguardStateController.isShowing) {
            // Hide the keyguard, with no fade out since we animated it away during the unlock.

            keyguardViewController.hide(
+1 −1
Original line number Diff line number Diff line
@@ -1881,7 +1881,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
        // if the keyguard is already showing, don't bother. check flags in both files
        // to account for the hiding animation which results in a delay and discrepancy
        // between flags
        if (mShowing && mKeyguardViewControllerLazy.get().isShowing()) {
        if (mShowing && mKeyguardStateController.isShowing()) {
            if (DEBUG) Log.d(TAG, "doKeyguard: not showing because it is already showing");
            resetStateLocked();
            return;
Loading