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

Commit 3f7564a1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I447f5c9c,Id3de50c6,I13e9ef2f into sc-v2-dev

* changes:
  Don't show the keyguard status bar if we're animating the screen off.
  Adjust unlock parameters so that the lockscreen content doesn't overlap with the app/launcher.
  Don't play the screen off animation if we disabled animations system-wide.
parents 0363d752 6ab3eb7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ const val SURFACE_BEHIND_SCALE_PIVOT_Y = 0.66f
 * The dismiss amount is the inverse of the notification panel expansion, which decreases as the
 * lock screen is swiped away.
 */
const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.1f
const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.25f

/**
 * Dismiss amount at which to complete the keyguard exit animation and hide the keyguard.
@@ -70,7 +70,7 @@ const val DISMISS_AMOUNT_SHOW_SURFACE_THRESHOLD = 0.1f
 * The dismiss amount is the inverse of the notification panel expansion, which decreases as the
 * lock screen is swiped away.
 */
const val DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD = 0.3f
const val DISMISS_AMOUNT_EXIT_KEYGUARD_THRESHOLD = 0.4f

/**
 * Initiates, controls, and ends the keyguard unlock animation.
+10 −3
Original line number Diff line number Diff line
@@ -4380,9 +4380,16 @@ public class NotificationPanelViewController extends PanelViewController {
                    }
                }
            } else {
                final boolean animatingUnlockedShadeToKeyguard = oldState == SHADE
                        && statusBarState == KEYGUARD
                        && mUnlockedScreenOffAnimationController.isScreenOffAnimationPlaying();
                if (!animatingUnlockedShadeToKeyguard) {
                    // Only make the status bar visible if we're not animating the screen off, since
                    // we only want to be showing the clock/notifications during the animation.
                    mKeyguardStatusBarViewController.updateViewState(
                            /* alpha= */ 1f,
                            keyguardShowing ? View.VISIBLE : View.INVISIBLE);
                }
                if (keyguardShowing && oldState != mBarState) {
                    if (mQs != null) {
                        mQs.hideImmediately();
+6 −0
Original line number Diff line number Diff line
@@ -226,6 +226,12 @@ class UnlockedScreenOffAnimationController @Inject constructor(
            return false
        }

        // If animations are disabled system-wide, don't play this one either.
        if (Settings.Global.getString(
                context.contentResolver, Settings.Global.ANIMATOR_DURATION_SCALE) == "0") {
            return false
        }

        // We only play the unlocked screen off animation if we are... unlocked.
        if (statusBarStateControllerImpl.state != StatusBarState.SHADE) {
            return false