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
This commit is contained in:
Riddle Hsu
2023-07-05 09:06:22 +00:00
parent bf1b4aa1bf
commit e1c25dbb4b

View File

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