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

Commit 7070d7f4 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Remove MODE_UNLOCK_FADING since it's no longer needed" into tm-d1-dev...

Merge "Remove MODE_UNLOCK_FADING since it's no longer needed" into tm-d1-dev am: 0596a705 am: 3df4f2de am: 58b156ce

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



Change-Id: If76625fd82144844d696d7747e3ee6bc35593dcc
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents bca1fb95 58b156ce
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -736,12 +736,10 @@ public class NotificationMediaManager implements Dumpable {
                }
                boolean cannotAnimateDoze = mStatusBarStateController.isDozing()
                        && !ScrimState.AOD.getAnimateChange();
                boolean needsBypassFading = mKeyguardStateController.isBypassFadingAnimation();
                if (((mBiometricUnlockController != null && mBiometricUnlockController.getMode()
                        == BiometricUnlockController.MODE_WAKE_AND_UNLOCK_PULSING
                                || cannotAnimateDoze) && !needsBypassFading)
                                || cannotAnimateDoze))
                        || hideBecauseOccluded) {

                    // We are unlocking directly - no animation!
                    mBackdrop.setVisibility(View.GONE);
                    mBackdropBack.setImageDrawable(null);
+6 −19
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
            MODE_SHOW_BOUNCER,
            MODE_ONLY_WAKE,
            MODE_UNLOCK_COLLAPSING,
            MODE_UNLOCK_FADING,
            MODE_DISMISS_BOUNCER,
            MODE_WAKE_AND_UNLOCK_FROM_DREAM
    })
@@ -137,16 +136,10 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
     */
    public static final int MODE_WAKE_AND_UNLOCK_FROM_DREAM = 6;

    /**
     * Faster mode of dismissing the lock screen when we cross fade to an app
     * (used for keyguard bypass.)
     */
    public static final int MODE_UNLOCK_FADING = 7;

    /**
     * When bouncer is visible and will be dismissed.
     */
    public static final int MODE_DISMISS_BOUNCER = 8;
    public static final int MODE_DISMISS_BOUNCER = 7;

    /**
     * How much faster we collapse the lockscreen when authenticating with biometric.
@@ -451,8 +444,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        }
        switch (mMode) {
            case MODE_DISMISS_BOUNCER:
            case MODE_UNLOCK_FADING:
                Trace.beginSection("MODE_DISMISS_BOUNCER or MODE_UNLOCK_FADING");
                Trace.beginSection("MODE_DISMISS_BOUNCER");
                mKeyguardViewController.notifyKeyguardAuthenticated(
                        false /* strongAuth */);
                Trace.endSection();
@@ -616,14 +608,9 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
        if (mKeyguardViewController.isShowing()) {
            if ((mKeyguardViewController.bouncerIsOrWillBeShowing()
                    || mKeyguardBypassController.getAltBouncerShowing()) && unlockingAllowed) {
                if (bypass && mKeyguardBypassController.canPlaySubtleWindowAnimations()) {
                    return MODE_UNLOCK_FADING;
                } else {
                return MODE_DISMISS_BOUNCER;
                }
            } else if (unlockingAllowed) {
                return bypass || mAuthController.isUdfpsFingerDown()
                        ? MODE_UNLOCK_FADING : MODE_NONE;
            } else if (unlockingAllowed && (bypass || mAuthController.isUdfpsFingerDown())) {
                return MODE_UNLOCK_COLLAPSING;
            } else {
                return bypass ? MODE_SHOW_BOUNCER : MODE_NONE;
            }
@@ -799,7 +786,7 @@ public class BiometricUnlockController extends KeyguardUpdateMonitorCallback imp
     * on or off.
     */
    public boolean isBiometricUnlock() {
        return isWakeAndUnlock() || mMode == MODE_UNLOCK_COLLAPSING || mMode == MODE_UNLOCK_FADING;
        return isWakeAndUnlock() || mMode == MODE_UNLOCK_COLLAPSING;
    }

    /**
+1 −2
Original line number Diff line number Diff line
@@ -396,8 +396,7 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn

    void keyguardGoingAway();

    void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration,
            boolean isBypassFading);
    void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration);

    void finishKeyguardFadingAway();

+3 −6
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ import android.view.WindowManager;
import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityManager;
import android.widget.DateTimeView;
import android.window.SplashScreen;

import androidx.annotation.NonNull;
import androidx.lifecycle.Lifecycle;
@@ -3178,11 +3177,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
     * @param startTime the start time of the animations in uptime millis
     * @param delay the precalculated animation delay in milliseconds
     * @param fadeoutDuration the duration of the exit animation, in milliseconds
     * @param isBypassFading is this a fading away animation while bypassing
     */
    @Override
    public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration,
            boolean isBypassFading) {
    public void setKeyguardFadingAway(long startTime, long delay, long fadeoutDuration) {
        mCommandQueue.appTransitionStarting(mDisplayId, startTime + fadeoutDuration
                        - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION,
                LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true);
@@ -3190,7 +3187,7 @@ public class CentralSurfacesImpl extends CoreStartable implements
        mCommandQueue.appTransitionStarting(mDisplayId,
                    startTime - LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION,
                    LightBarTransitionsController.DEFAULT_TINT_ANIMATION_DURATION, true);
        mKeyguardStateController.notifyKeyguardFadingAway(delay, fadeoutDuration, isBypassFading);
        mKeyguardStateController.notifyKeyguardFadingAway(delay, fadeoutDuration);
    }

    /**
+0 −14
Original line number Diff line number Diff line
@@ -197,20 +197,6 @@ open class KeyguardBypassController : Dumpable, StackScrollAlgorithm.BypassContr
        return false
    }

    /**
     * If shorter animations should be played when unlocking.
     */
    fun canPlaySubtleWindowAnimations(): Boolean {
        if (bypassEnabled) {
            return when {
                statusBarStateController.state != StatusBarState.KEYGUARD -> false
                qSExpanded -> false
                else -> true
            }
        }
        return false
    }

    fun onStartedGoingToSleep() {
        pendingUnlock = null
    }
Loading