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
This commit is contained in:
Josh Tsuji
2022-06-02 17:14:54 -04:00
parent 7a1dd2e61c
commit ec8486238b

View File

@@ -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