diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java index 12101d1189f74..2bfdce0c49392 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -983,9 +983,11 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, @Override public void onAnimationCancelled(boolean isKeyguardOccluded) { - if (mUnoccludeAnimator != null) { - mUnoccludeAnimator.cancel(); - } + mContext.getMainExecutor().execute(() -> { + if (mUnoccludeAnimator != null) { + mUnoccludeAnimator.cancel(); + } + }); setOccluded(isKeyguardOccluded /* isOccluded */, false /* animate */); Log.d(TAG, "Unocclude animation cancelled. Occluded state is now: "