Merge "[ShellTrans] Fix SystemUI crash when finish keyguard animation." into tm-qpr-dev

This commit is contained in:
Wei Sheng Shih
2022-12-20 02:29:35 +00:00
committed by Android (Google) Code Review

View File

@@ -321,6 +321,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
// and unlock the device as well as hiding the surface. // and unlock the device as well as hiding the surface.
if (surfaceBehindAlpha == 0f) { if (surfaceBehindAlpha == 0f) {
Log.d(TAG, "surfaceBehindAlphaAnimator#onAnimationEnd") Log.d(TAG, "surfaceBehindAlphaAnimator#onAnimationEnd")
surfaceBehindRemoteAnimationTargets = null
keyguardViewMediator.get().finishSurfaceBehindRemoteAnimation( keyguardViewMediator.get().finishSurfaceBehindRemoteAnimation(
false /* cancelled */) false /* cancelled */)
} else { } else {
@@ -825,13 +826,13 @@ class KeyguardUnlockAnimationController @Inject constructor(
// Make sure we made the surface behind fully visible, just in case. It should already be // Make sure we made the surface behind fully visible, just in case. It should already be
// fully visible. The exit animation is finished, and we should not hold the leash anymore, // fully visible. The exit animation is finished, and we should not hold the leash anymore,
// so forcing it to 1f. // so forcing it to 1f.
surfaceBehindAlphaAnimator.cancel()
surfaceBehindEntryAnimator.cancel()
surfaceBehindAlpha = 1f surfaceBehindAlpha = 1f
setSurfaceBehindAppearAmount(1f) setSurfaceBehindAppearAmount(1f)
surfaceBehindAlphaAnimator.cancel()
surfaceBehindEntryAnimator.cancel()
try { try {
launcherUnlockController?.setUnlockAmount(1f, false /* forceIfAnimating */) launcherUnlockController?.setUnlockAmount(1f, false /* forceIfAnimating */)
} catch (e: RemoteException) { } catch (e: RemoteException) {
Log.e(TAG, "Remote exception in notifyFinishedKeyguardExitAnimation", e) Log.e(TAG, "Remote exception in notifyFinishedKeyguardExitAnimation", e)
} }