diff options
author | Josh Tsuji <tsuji@google.com> | 2022-06-17 16:07:40 -0700 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-06-30 02:24:10 +0000 |
commit | 56059b266eab7e3e7ff9cce4e357c69ab786596e (patch) | |
tree | a81ad4f2b483e9bd7a4a247894dab15f01b3b1e3 | |
parent | a49c0207fa90f5c1042c8db61724ef77f3d995d4 (diff) | |
download | base-56059b266eab7e3e7ff9cce4e357c69ab786596e.tar.gz |
Set occluded state on remote animation cancel.
The launch animator cancel method can be
called by other methods within the activity
launch animator, which is very dangerous
since it can set the occluded state incorrectly.
Bug: 235463625
Test: occlude and unocclude repeatedly to trigger cancel/restart
Change-Id: I1a8cc95876c2966009c9cfa8dbe2471a360930a7
(cherry picked from commit bdfb30745c55b8cce593c8fb0b9587b5a5896b32)
Merged-In: I1a8cc95876c2966009c9cfa8dbe2471a360930a7
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java | 8 |
1 files changed, 5 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 66a210754330..94c594dd8a48 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -842,7 +842,6 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Override public void onLaunchAnimationCancelled() { - setOccluded(true /* occluded */, false /* animate */); Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: " + mOccluded); } @@ -915,7 +914,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, mUnoccludeAnimator.cancel(); } - setOccluded(isKeyguardOccluded, false /* animate */); + setOccluded(isKeyguardOccluded /* isOccluded */, false /* animate */); Log.d(TAG, "Unocclude animation cancelled. Occluded state is now: " + mOccluded); } @@ -3195,7 +3194,10 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Override public void onAnimationCancelled(boolean isKeyguardOccluded) throws RemoteException { super.onAnimationCancelled(isKeyguardOccluded); - Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: " + mOccluded); + setOccluded(isKeyguardOccluded /* occluded */, false /* animate */); + + Log.d(TAG, "Occlude animation cancelled by WM. " + + "Setting occluded state to: " + mOccluded); } } } |