From afebe14ef77b32c970faa33e20e826e627a0c112 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Wed, 4 May 2022 15:25:41 -0400 Subject: [PATCH] Unocclude immediately so that the surface animation is visible. Prior to ag/17776445, a bug caused WM to call setOccluded(false) for us at the start of the animation. Fixing that bug revealed this one - the animation on the occluding surface does not render if we think we're occluded. Bug: 230436724 Test: occlude/unocclude Change-Id: I5a6bbabdc74fbd671c0a84d811cb6c22651f1fb1 --- .../com/android/systemui/keyguard/KeyguardViewMediator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 10ea1e06c6d7f..ec621e5cc89e3 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -921,12 +921,12 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, RemoteAnimationTarget[] wallpapers, RemoteAnimationTarget[] nonApps, IRemoteAnimationFinishedCallback finishedCallback) throws RemoteException { + setOccluded(false /* isOccluded */, true /* animate */); + if (apps == null || apps.length == 0 || apps[0] == null) { Log.d(TAG, "No apps provided to unocclude runner; " + "skipping animation and unoccluding."); - finishedCallback.onAnimationFinished(); - setOccluded(false /* isOccluded */, true /* animate */); return; } @@ -971,7 +971,6 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Override public void onAnimationEnd(Animator animation) { try { - setOccluded(false /* isOccluded */, true /* animate */); finishedCallback.onAnimationFinished(); mUnoccludeAnimator = null; } catch (RemoteException e) {