Merge "Add extra logs for skipping hideKeyguardViewAfterRemoteAnimation" into tm-d1-dev
This commit is contained in:
@@ -169,7 +169,8 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
playingCannedAnimation: Boolean,
|
playingCannedAnimation: Boolean,
|
||||||
fromWakeAndUnlock: Boolean,
|
fromWakeAndUnlock: Boolean,
|
||||||
unlockAnimationStartDelay: Long,
|
unlockAnimationStartDelay: Long,
|
||||||
unlockAnimationDuration: Long) {}
|
unlockAnimationDuration: Long
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the remote unlock animation ends, in all cases, canned or swipe-to-unlock.
|
* 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
|
// call onKeyguardExitRemoteAnimationFinished since that will hide the keyguard
|
||||||
// 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")
|
||||||
keyguardViewMediator.get().finishSurfaceBehindRemoteAnimation(
|
keyguardViewMediator.get().finishSurfaceBehindRemoteAnimation(
|
||||||
false /* cancelled */)
|
false /* cancelled */)
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "skip finishSurfaceBehindRemoteAnimation" +
|
||||||
|
" surfaceBehindAlpha=$surfaceBehindAlpha")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -325,6 +330,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
}
|
}
|
||||||
addListener(object : AnimatorListenerAdapter() {
|
addListener(object : AnimatorListenerAdapter() {
|
||||||
override fun onAnimationEnd(animation: Animator) {
|
override fun onAnimationEnd(animation: Animator) {
|
||||||
|
Log.d(TAG, "surfaceBehindEntryAnimator#onAnimationEnd")
|
||||||
playingCannedUnlockAnimation = false
|
playingCannedUnlockAnimation = false
|
||||||
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
|
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
|
||||||
false /* cancelled */
|
false /* cancelled */
|
||||||
@@ -372,8 +378,8 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
* changed.
|
* changed.
|
||||||
*/
|
*/
|
||||||
override fun onKeyguardGoingAwayChanged() {
|
override fun onKeyguardGoingAwayChanged() {
|
||||||
if (keyguardStateController.isKeyguardGoingAway
|
if (keyguardStateController.isKeyguardGoingAway &&
|
||||||
&& !statusBarStateController.leaveOpenOnKeyguardHide()) {
|
!statusBarStateController.leaveOpenOnKeyguardHide()) {
|
||||||
prepareForInWindowLauncherAnimations()
|
prepareForInWindowLauncherAnimations()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -427,7 +433,7 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
launcherUnlockController?.prepareForUnlock(
|
launcherUnlockController?.prepareForUnlock(
|
||||||
willUnlockWithSmartspaceTransition, /* willAnimateSmartspace */
|
willUnlockWithSmartspaceTransition, /* willAnimateSmartspace */
|
||||||
lockscreenSmartspaceBounds, /* lockscreenSmartspaceBounds */
|
lockscreenSmartspaceBounds, /* lockscreenSmartspaceBounds */
|
||||||
selectedPage, /* selectedPage */
|
selectedPage /* selectedPage */
|
||||||
)
|
)
|
||||||
} catch (e: RemoteException) {
|
} catch (e: RemoteException) {
|
||||||
Log.e(TAG, "Remote exception in prepareForInWindowUnlockAnimations.", e)
|
Log.e(TAG, "Remote exception in prepareForInWindowUnlockAnimations.", e)
|
||||||
@@ -502,19 +508,23 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
* by the dismiss amount via [onKeyguardDismissAmountChanged].
|
* by the dismiss amount via [onKeyguardDismissAmountChanged].
|
||||||
*/
|
*/
|
||||||
private fun playCannedUnlockAnimation() {
|
private fun playCannedUnlockAnimation() {
|
||||||
|
Log.d(TAG, "playCannedUnlockAnimation")
|
||||||
playingCannedUnlockAnimation = true
|
playingCannedUnlockAnimation = true
|
||||||
|
|
||||||
|
|
||||||
when {
|
when {
|
||||||
// If we're set up for in-window launcher animations, ask Launcher to play its in-window
|
// If we're set up for in-window launcher animations, ask Launcher to play its in-window
|
||||||
// canned animation.
|
// 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
|
// 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
|
// 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
|
// circular light reveal will show the app surface, and it looks weird if it's moving
|
||||||
// around behind that.
|
// around behind that.
|
||||||
biometricUnlockControllerLazy.get().isWakeAndUnlock -> {
|
biometricUnlockControllerLazy.get().isWakeAndUnlock -> {
|
||||||
|
Log.d(TAG, "playCannedUnlockAnimation, isWakeAndUnlock")
|
||||||
setSurfaceBehindAppearAmount(1f)
|
setSurfaceBehindAppearAmount(1f)
|
||||||
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
|
keyguardViewMediator.get().onKeyguardExitRemoteAnimationFinished(
|
||||||
false /* cancelled */)
|
false /* cancelled */)
|
||||||
@@ -522,7 +532,10 @@ class KeyguardUnlockAnimationController @Inject constructor(
|
|||||||
|
|
||||||
// Otherwise, we're doing a normal full-window unlock. Start this animator, which will
|
// Otherwise, we're doing a normal full-window unlock. Start this animator, which will
|
||||||
// scale/translate the window underneath the lockscreen.
|
// 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() {
|
private fun fadeInSurfaceBehind() {
|
||||||
|
Log.d(TAG, "fadeInSurfaceBehind")
|
||||||
surfaceBehindAlphaAnimator.cancel()
|
surfaceBehindAlphaAnimator.cancel()
|
||||||
surfaceBehindAlphaAnimator.start()
|
surfaceBehindAlphaAnimator.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun fadeOutSurfaceBehind() {
|
private fun fadeOutSurfaceBehind() {
|
||||||
|
Log.d(TAG, "fadeOutSurfaceBehind")
|
||||||
surfaceBehindAlphaAnimator.cancel()
|
surfaceBehindAlphaAnimator.cancel()
|
||||||
surfaceBehindAlphaAnimator.reverse()
|
surfaceBehindAlphaAnimator.reverse()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun shouldPerformSmartspaceTransition(): Boolean {
|
private fun shouldPerformSmartspaceTransition(): Boolean {
|
||||||
// Feature is disabled, so we don't want to.
|
// Feature is disabled, so we don't want to.
|
||||||
if (!featureFlags.isEnabled(Flags.SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED)) {
|
if (!featureFlags.isEnabled(Flags.SMARTSPACE_SHARED_ELEMENT_TRANSITION_ENABLED)) {
|
||||||
|
|||||||
@@ -2423,7 +2423,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
RemoteAnimationTarget[] apps, RemoteAnimationTarget[] wallpapers,
|
||||||
RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) {
|
RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) {
|
||||||
Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
|
Trace.beginSection("KeyguardViewMediator#handleStartKeyguardExitAnimation");
|
||||||
if (DEBUG) Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
|
Log.d(TAG, "handleStartKeyguardExitAnimation startTime=" + startTime
|
||||||
+ " fadeoutDuration=" + fadeoutDuration);
|
+ " fadeoutDuration=" + fadeoutDuration);
|
||||||
synchronized (KeyguardViewMediator.this) {
|
synchronized (KeyguardViewMediator.this) {
|
||||||
|
|
||||||
@@ -2619,7 +2619,11 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
* @param cancelled {@code true} if the animation was cancelled before it finishes.
|
* @param cancelled {@code true} if the animation was cancelled before it finishes.
|
||||||
*/
|
*/
|
||||||
public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) {
|
public void onKeyguardExitRemoteAnimationFinished(boolean cancelled) {
|
||||||
|
Log.d(TAG, "onKeyguardExitRemoteAnimationFinished");
|
||||||
if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
|
if (!mSurfaceBehindRemoteAnimationRunning && !mSurfaceBehindRemoteAnimationRequested) {
|
||||||
|
Log.d(TAG, "skip onKeyguardExitRemoteAnimationFinished cancelled=" + cancelled
|
||||||
|
+ " surfaceAnimationRunning=" + mSurfaceBehindRemoteAnimationRunning
|
||||||
|
+ " surfaceAnimationRequested=" + mSurfaceBehindRemoteAnimationRequested);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2633,7 +2637,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable,
|
|||||||
onKeyguardExitFinished();
|
onKeyguardExitFinished();
|
||||||
|
|
||||||
if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) {
|
if (mKeyguardStateController.isDismissingFromSwipe() || wasShowing) {
|
||||||
|
Log.d(TAG, "onKeyguardExitRemoteAnimationFinished"
|
||||||
|
+ "#hideKeyguardViewAfterRemoteAnimation");
|
||||||
mKeyguardUnlockAnimationControllerLazy.get().hideKeyguardViewAfterRemoteAnimation();
|
mKeyguardUnlockAnimationControllerLazy.get().hideKeyguardViewAfterRemoteAnimation();
|
||||||
|
} else {
|
||||||
|
Log.d(TAG, "skip hideKeyguardViewAfterRemoteAnimation"
|
||||||
|
+ " dismissFromSwipe=" + mKeyguardStateController.isDismissingFromSwipe()
|
||||||
|
+ " wasShowing=" + wasShowing);
|
||||||
}
|
}
|
||||||
|
|
||||||
finishSurfaceBehindRemoteAnimation(cancelled);
|
finishSurfaceBehindRemoteAnimation(cancelled);
|
||||||
|
|||||||
Reference in New Issue
Block a user