From ec8486238bae6deaecc1a829f4095c1b768e8e20 Mon Sep 17 00:00:00 2001 From: Josh Tsuji Date: Thu, 2 Jun 2022 17:14:54 -0400 Subject: [PATCH] Set occluded = false if occlude remote animation is cancelled. Due to a bug, this was previously not needed (and could cause issues) since WM would call setOccluded(false) directly if the animation was cancelled. However, that was due to a flag mismatch bug fixed in ag/17776445. With that bug fixed, WM is never expected to call setOccluded directly, so we need to do it when the animation is cancelled. Fixes: 232002936 Fixes: 232296784 Test: atest SystemUITests Test: launch/kill occluding activities Change-Id: I9eadd8940f1e0d71c6b627ccc0301284dfefbc2b --- .../android/systemui/keyguard/KeyguardViewMediator.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 62fc960297811..80ad93fd84e7e 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -840,8 +840,9 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Override public void onLaunchAnimationCancelled() { - Log.d(TAG, "Occlude launch animation cancelled. " - + "Occluded state is now: " + mOccluded); + setOccluded(true /* occluded */, false /* animate */); + Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: " + + mOccluded); } @NonNull @@ -904,6 +905,10 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, if (mUnoccludeAnimator != null) { mUnoccludeAnimator.cancel(); } + + setOccluded(false /* isOccluded */, false /* animate */); + Log.d(TAG, "Unocclude animation cancelled. Occluded state is now: " + + mOccluded); } @Override