summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-07-05 09:06:22 +0000
committer Riddle Hsu <riddlehsu@google.com> 2023-07-05 11:39:38 +0000
commite1c25dbb4b995476aadcec3ad470904161779843 (patch)
treef04b881a33f2d12fdf2aec4bfe4bb25efb17659a
parentbf1b4aa1bff13cb1497c3980a6db47c8eba2f59a (diff)
Exclude screen decoration overlay from transition participants
It doesn't need an animation and its surface layer should not be changed by transition. Bug: 288726181 Test: Switch screen size by "Settings > Display > Screen resolution" or "Display size and text > Display size". Check "adb shell dumpsys SurfaceFlinger | grep -A10 ScreenDecor" The parent of ScreenDecor's should be none (root). And ScreenDecor doesn't move to "Offscreen Layers". Change-Id: Ib5262f6d4be3aac4f83a82bd9e93bad7437ef640
-rw-r--r--services/core/java/com/android/server/wm/Transition.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/Transition.java b/services/core/java/com/android/server/wm/Transition.java
index 1b27bb17f599..638d99d0ecc7 100644
--- a/services/core/java/com/android/server/wm/Transition.java
+++ b/services/core/java/com/android/server/wm/Transition.java
@@ -619,6 +619,12 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
if (!isInTransientHide(wc)) {
mSyncEngine.addToSyncSet(mSyncId, wc);
}
+ if (wc.asWindowToken() != null && wc.asWindowToken().mRoundedCornerOverlay) {
+ // Only need to sync the transaction (SyncSet) without ChangeInfo because cutout and
+ // rounded corner overlay never need animations. Especially their surfaces may be put
+ // in root (null, see WindowToken#makeSurface()) that cannot reparent.
+ return;
+ }
ChangeInfo info = mChanges.get(wc);
if (info == null) {
info = new ChangeInfo(wc);