Allow controlling SystemUI flags during RecentsAnimation
Such that the bars can flip from light/dark depending on animation
progress.
Test: go/wm-smoke
Test: Swipe up from light bar app
Test: WindowStateTests
Bug: 73498721
Change-Id: Ie4b99c75840474a01225720fcd7372191f035a3e
diff --git a/services/core/java/com/android/server/wm/RecentsAnimationController.java b/services/core/java/com/android/server/wm/RecentsAnimationController.java
index 39b886d..cd01c0f 100644
--- a/services/core/java/com/android/server/wm/RecentsAnimationController.java
+++ b/services/core/java/com/android/server/wm/RecentsAnimationController.java
@@ -136,6 +136,22 @@
}
@Override
+ public void setAnimationTargetsBehindSystemBars(boolean behindSystemBars)
+ throws RemoteException {
+ long token = Binder.clearCallingIdentity();
+ try {
+ synchronized (mService.getWindowManagerLock()) {
+ for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
+ mPendingAnimations.get(i).mTask.setCanAffectSystemUiFlags(behindSystemBars);
+ }
+ mService.mWindowPlacerLocked.requestTraversal();
+ }
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
+ }
+
+ @Override
public void setInputConsumerEnabled(boolean enabled) {
if (DEBUG) Log.d(TAG, "setInputConsumerEnabled(" + enabled + "): mCanceled="
+ mCanceled);
@@ -279,6 +295,7 @@
+ mPendingAnimations.size());
for (int i = mPendingAnimations.size() - 1; i >= 0; i--) {
final TaskAnimationAdapter adapter = mPendingAnimations.get(i);
+ adapter.mTask.setCanAffectSystemUiFlags(true);
adapter.mCapturedFinishCallback.onAnimationFinished(adapter);
}
mPendingAnimations.clear();