summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Beverly <beverlyt@google.com> 2022-06-14 19:03:39 +0000
committer Beverly Tai <beverlyt@google.com> 2022-06-16 19:37:28 +0000
commit307c7617f8ae28c0f4cb0397411980325fad6f38 (patch)
tree38ad8a7fb7b04fc0666dd8486f1e077b37a2dc12
parentda4c70fb0b411fb1751b18f090ee295450144086 (diff)
Add extra logs for skipping hideKeyguardViewAfterRemoteAnimation
To figure out why b/234593480 may be occurring. Test: manual Bug: 234593480 Change-Id: Id31259897fcbce8224304ade71a857405bb509cc
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt30
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java12
2 files changed, 33 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
index c686b48278a3..99b57200a397 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardUnlockAnimationController.kt
@@ -169,7 +169,8 @@ class KeyguardUnlockAnimationController @Inject constructor(
playingCannedAnimation: Boolean,
fromWakeAndUnlock: Boolean,
unlockAnimationStartDelay: Long,
- unlockAnimationDuration: Long) {}
+ unlockAnimationDuration: Long
+ ) {}
/**
* Called when the remote unlock animation ends, in all cases, canned or swipe-to-unlock.
@@ -308,8 +309,12 @@ class KeyguardUnlockAnimationController @Inject constructor(
// call onKeyguardExitRemoteAnimationFinished since that will hide the keyguard
// and unlock the device as well as hiding the surface.
if (surfaceBehindAlpha == 0f) {
+ Log.d(TAG, "surfaceBehindAlphaAnimator#onAnimationEnd")
keyguardViewMediator.get().finishSurfaceBehindRemoteAnimation(
false /* cancelled */)
+ } else {
+ Log.d(TAG, "skip finishSurfaceBehindRemoteAnimation" +
+ " surfaceBehindAlpha=$surfaceBehindAlpha")
}
}
})
@@ -325,6 +330,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
}
addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
+ Log.d(TAG, "surfaceBehindEntryAnimator#onAnimationEnd")
playingCannedUnlockAnimation = false
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
false /* cancelled */
@@ -372,8 +378,8 @@ class KeyguardUnlockAnimationController @Inject constructor(
* changed.
*/
override fun onKeyguardGoingAwayChanged() {
- if (keyguardStateController.isKeyguardGoingAway
- && !statusBarStateController.leaveOpenOnKeyguardHide()) {
+ if (keyguardStateController.isKeyguardGoingAway &&
+ !statusBarStateController.leaveOpenOnKeyguardHide()) {
prepareForInWindowLauncherAnimations()
}
}
@@ -427,7 +433,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
launcherUnlockController?.prepareForUnlock(
willUnlockWithSmartspaceTransition, /* willAnimateSmartspace */
lockscreenSmartspaceBounds, /* lockscreenSmartspaceBounds */
- selectedPage, /* selectedPage */
+ selectedPage /* selectedPage */
)
} catch (e: RemoteException) {
Log.e(TAG, "Remote exception in prepareForInWindowUnlockAnimations.", e)
@@ -502,19 +508,23 @@ class KeyguardUnlockAnimationController @Inject constructor(
* by the dismiss amount via [onKeyguardDismissAmountChanged].
*/
private fun playCannedUnlockAnimation() {
+ Log.d(TAG, "playCannedUnlockAnimation")
playingCannedUnlockAnimation = true
-
when {
// If we're set up for in-window launcher animations, ask Launcher to play its in-window
// canned animation.
- willUnlockWithInWindowLauncherAnimations -> unlockToLauncherWithInWindowAnimations()
+ willUnlockWithInWindowLauncherAnimations -> {
+ Log.d(TAG, "playCannedUnlockAnimation, unlockToLauncherWithInWindowAnimations")
+ unlockToLauncherWithInWindowAnimations()
+ }
// If we're waking and unlocking to a non-Launcher app surface (or Launcher in-window
// animations are not available), show it immediately and end the remote animation. The
// circular light reveal will show the app surface, and it looks weird if it's moving
// around behind that.
biometricUnlockControllerLazy.get().isWakeAndUnlock -> {
+ Log.d(TAG, "playCannedUnlockAnimation, isWakeAndUnlock")
setSurfaceBehindAppearAmount(1f)
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
false /* cancelled */)
@@ -522,7 +532,10 @@ class KeyguardUnlockAnimationController @Inject constructor(
// Otherwise, we're doing a normal full-window unlock. Start this animator, which will
// scale/translate the window underneath the lockscreen.
- else -> surfaceBehindEntryAnimator.start()
+ else -> {
+ Log.d(TAG, "playCannedUnlockAnimation, surfaceBehindEntryAnimator#start")
+ surfaceBehindEntryAnimator.start()
+ }
}
}
@@ -774,16 +787,17 @@ class KeyguardUnlockAnimationController @Inject constructor(
}
private fun fadeInSurfaceBehind() {
+ Log.d(TAG, "fadeInSurfaceBehind")
surfaceBehindAlphaAnimator.cancel()
surfaceBehindAlphaAnimator.start()
}
private fun fadeOutSurfaceBehind() {
+ Log.d(TAG, "fadeOutSurfaceBehind")
surfaceBehindAlphaAnimator.cancel()
surfaceBehindAlphaAnimator.reverse()
}
-
private fun shouldPerformSmartspaceTransition(): Boolean {
// Feature is disabled, so we don't want to.
if (!featureFlags.isEnabled(Flags.SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED)) {
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 80ad93fd84e7..22f3da302e74 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -2414,7 +2414,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) {
Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
- if (DEBUG) Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
+ Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
+ " fadeoutDuration=" + fadeoutDuration);
synchronized (KeyguardViewMediator.this) {
@@ -2610,7 +2610,11 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
* @param cancelled {@code true} if the animation was cancelled before it finishes.
*/
public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) {
+ Log.d(TAG, "onKeyguardExitRemoteAnimationFinished");
if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
+ Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished cancelled=" + cancelled
+ + " surfaceAnimationRunning=" + mSurfaceBehindRemoteAnimationRunning
+ + " surfaceAnimationRequested=" + mSurfaceBehindRemoteAnimationRequested);
return;
}
@@ -2624,7 +2628,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
onKeyguardExitFinished();
if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) {
+ Log.d(TAG, "onKeyguardExitRemoteAnimationFinished"
+ + "#hideKeyguardViewAfterRemoteAnimation");
mKeyguardUnlockAnimationControllerLazy.get().hideKeyguardViewAfterRemoteAnimation();
+ } else {
+ Log.d(TAG, "skip hideKeyguardViewAfterRemoteAnimation"
+ + " dismissFromSwipe=" + mKeyguardStateController.isDismissingFromSwipe()
+ + " wasShowing=" + wasShowing);
}
finishSurfaceBehindRemoteAnimation(cancelled);