diff options
| author | 2024-04-19 05:20:51 +0000 | |
|---|---|---|
| committer | 2024-04-19 05:20:51 +0000 | |
| commit | 97cb72cd8608d82b4fb3eb15f8c96f9d88562743 (patch) | |
| tree | b3b6ae846b4a25c3c8f1b0cf275723e2495852ec | |
| parent | 32477236c34c215a1e686c2c5125f1ca4dcb59c2 (diff) | |
| parent | 9abde299a28b907d981cebbdc7480a09824c255a (diff) | |
Merge "Update task surface visibility with reparent for pip" into main
| -rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index 91860a6db942..390a7cf2d09e 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -4805,6 +4805,14 @@ class Task extends TaskFragment { topActivity.getSyncTransaction()); } lastParentBeforePip.moveToFront("movePinnedActivityToOriginalTask"); + // If the reparent is not included in transition, make sure the visibility of + // task is still updated by core. Otherwise if the task is collected (e.g. + // rotation change) after leaving this scope, the visibility operation will be + // put in sync transaction, then it is not synced with reparent. + if (com.android.window.flags.Flags.removePrepareSurfaceInPlacement() + && lastParentBeforePip.mSyncState == SYNC_STATE_NONE) { + lastParentBeforePip.prepareSurfaces(); + } } if (isPip2ExperimentEnabled) { super.setWindowingMode(windowingMode); |