Merge "Show wake up animation when unlock by fingerprint" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-20 14:52:07 +00:00
committed by Android (Google) Code Review
2 changed files with 10 additions and 3 deletions

View File

@@ -37,6 +37,7 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.notification.ActivityLaunchAnimator
import com.android.systemui.statusbar.phone.BiometricUnlockController
import com.android.systemui.statusbar.phone.BiometricUnlockController.MODE_WAKE_AND_UNLOCK
import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.phone.NotificationShadeWindowController
import com.android.systemui.statusbar.phone.PanelExpansionListener
import com.android.systemui.statusbar.phone.ScrimController
@@ -60,6 +61,7 @@ class NotificationShadeDepthController @Inject constructor(
private val choreographer: Choreographer,
private val wallpaperManager: WallpaperManager,
private val notificationShadeWindowController: NotificationShadeWindowController,
private val dozeParameters: DozeParameters,
dumpManager: DumpManager
) : PanelExpansionListener, Dumpable {
companion object {
@@ -206,9 +208,12 @@ class NotificationShadeDepthController @Inject constructor(
keyguardAnimator?.cancel()
keyguardAnimator = ValueAnimator.ofFloat(1f, 0f).apply {
duration = keyguardStateController.keyguardFadingAwayDuration
// keyguardStateController.keyguardFadingAwayDuration might be zero when unlock by
// fingerprint due to there is no window container, see AppTransition#goodToGo.
// We use DozeParameters.wallpaperFadeOutDuration as an alternative.
duration = dozeParameters.wallpaperFadeOutDuration
startDelay = keyguardStateController.keyguardFadingAwayDelay
interpolator = Interpolators.DECELERATE_QUINT
interpolator = Interpolators.FAST_OUT_SLOW_IN
addUpdateListener { animation: ValueAnimator ->
wakeAndUnlockBlurRadius =
blurUtils.blurRadiusOfRatio(animation.animatedValue as Float)

View File

@@ -28,6 +28,7 @@ import com.android.systemui.dump.DumpManager
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.notification.ActivityLaunchAnimator
import com.android.systemui.statusbar.phone.BiometricUnlockController
import com.android.systemui.statusbar.phone.DozeParameters
import com.android.systemui.statusbar.phone.NotificationShadeWindowController
import com.android.systemui.statusbar.policy.KeyguardStateController
import org.junit.Before
@@ -67,6 +68,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
@Mock private lateinit var shadeAnimation: NotificationShadeDepthController.DepthAnimation
@Mock private lateinit var globalActionsSpring: NotificationShadeDepthController.DepthAnimation
@Mock private lateinit var brightnessSpring: NotificationShadeDepthController.DepthAnimation
@Mock private lateinit var dozeParameters: DozeParameters
@JvmField @Rule val mockitoRule = MockitoJUnit.rule()
private lateinit var statusBarStateListener: StatusBarStateController.StateListener
@@ -87,7 +89,7 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() {
notificationShadeDepthController = NotificationShadeDepthController(
statusBarStateController, blurUtils, biometricUnlockController,
keyguardStateController, choreographer, wallpaperManager,
notificationShadeWindowController, dumpManager)
notificationShadeWindowController, dozeParameters, dumpManager)
notificationShadeDepthController.shadeSpring = shadeSpring
notificationShadeDepthController.shadeAnimation = shadeAnimation
notificationShadeDepthController.brightnessMirrorSpring = brightnessSpring