Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +1 −2 Original line number Diff line number Diff line Loading @@ -712,7 +712,6 @@ class KeyguardUnlockAnimationController @Inject constructor( // As soon as the shade starts animating out of the way, start the canned unlock animation, // which will finish keyguard exit when it completes. The in-window animations in the // Launcher window will end on their own. if (fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation() handler.postDelayed({ if (keyguardViewMediator.get().isShowingAndNotOccluded && !keyguardStateController.isKeyguardGoingAway) { Loading @@ -723,7 +722,7 @@ class KeyguardUnlockAnimationController @Inject constructor( if ((wallpaperTargets?.isNotEmpty() == true)) { fadeInWallpaper() if (!fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation() hideKeyguardViewAfterRemoteAnimation() } else { keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation( false /* cancelled */) Loading packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt +13 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.Mockito.verifyNoMoreInteractions import org.mockito.MockitoAnnotations import org.mockito.kotlin.clearInvocations import java.util.function.Predicate @RunWith(AndroidJUnit4::class) Loading Loading @@ -336,6 +337,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Cancel the animator so we can verify only the setSurfaceBehind call below. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) // Set appear to 50%, we'll just verify that we're not applying the identity matrix which // means an animation is in progress. keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(0.5f) Loading Loading @@ -377,6 +382,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Cancel the animator so we can verify only the setSurfaceBehind call below. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f) keyguardUnlockAnimationController.setWallpaperAppearAmount(1f) Loading Loading @@ -409,6 +418,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Stop the animator - we just want to test whether the override is not applied. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f) keyguardUnlockAnimationController.setWallpaperAppearAmount(1f) Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt +1 −2 Original line number Diff line number Diff line Loading @@ -712,7 +712,6 @@ class KeyguardUnlockAnimationController @Inject constructor( // As soon as the shade starts animating out of the way, start the canned unlock animation, // which will finish keyguard exit when it completes. The in-window animations in the // Launcher window will end on their own. if (fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation() handler.postDelayed({ if (keyguardViewMediator.get().isShowingAndNotOccluded && !keyguardStateController.isKeyguardGoingAway) { Loading @@ -723,7 +722,7 @@ class KeyguardUnlockAnimationController @Inject constructor( if ((wallpaperTargets?.isNotEmpty() == true)) { fadeInWallpaper() if (!fastUnlockTransition()) hideKeyguardViewAfterRemoteAnimation() hideKeyguardViewAfterRemoteAnimation() } else { keyguardViewMediator.get().exitKeyguardAndFinishSurfaceBehindRemoteAnimation( false /* cancelled */) Loading
packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardUnlockAnimationControllerTest.kt +13 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.Mockito.verifyNoMoreInteractions import org.mockito.MockitoAnnotations import org.mockito.kotlin.clearInvocations import java.util.function.Predicate @RunWith(AndroidJUnit4::class) Loading Loading @@ -336,6 +337,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Cancel the animator so we can verify only the setSurfaceBehind call below. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) // Set appear to 50%, we'll just verify that we're not applying the identity matrix which // means an animation is in progress. keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(0.5f) Loading Loading @@ -377,6 +382,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Cancel the animator so we can verify only the setSurfaceBehind call below. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f) keyguardUnlockAnimationController.setWallpaperAppearAmount(1f) Loading Loading @@ -409,6 +418,10 @@ class KeyguardUnlockAnimationControllerTest : SysuiTestCase() { false /* requestedShowSurfaceBehindKeyguard */ ) // Stop the animator - we just want to test whether the override is not applied. keyguardUnlockAnimationController.surfaceBehindAlphaAnimator.end() clearInvocations(surfaceTransactionApplier) keyguardUnlockAnimationController.setSurfaceBehindAppearAmount(1f) keyguardUnlockAnimationController.setWallpaperAppearAmount(1f) Loading