diff options
author | 2024-06-13 04:19:48 +0000 | |
---|---|---|
committer | 2024-06-13 04:27:17 +0000 | |
commit | bec9dd44d02b6745f7513591ef8b9a4445f9edaf (patch) | |
tree | 26b64f8a1a2b401ae818de1965a2c72fe93976a3 | |
parent | 7f7d690aecf7d915e97997f61d00fc28fcf3c8ec (diff) |
Specific release windowless surface in core.
So the surface layer can be removed once shell side also remove it,
instead of waiting for GC happen in system server.
Bug: 345021645
Test: trigger PB animation multiple times, then verify windowless
surface wont' remain in offscreen hierarchy.
Change-Id: I75d0cd1264c11c67d0b4fa22485c2f7559852a57
-rw-r--r-- | services/core/java/com/android/server/wm/BackNavigationController.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/BackNavigationController.java b/services/core/java/com/android/server/wm/BackNavigationController.java index 0febec9169c0..297219064435 100644 --- a/services/core/java/com/android/server/wm/BackNavigationController.java +++ b/services/core/java/com/android/server/wm/BackNavigationController.java @@ -1366,8 +1366,6 @@ class BackNavigationController { ? task.getSurfaceControl() : mAdaptors[0].mTarget.getSurfaceControl()); } - // remove starting surface. - mStartingSurface = null; } } @@ -1384,7 +1382,10 @@ class BackNavigationController { .removeWindowlessStartingSurface(mRequestedStartingSurfaceId, !openTransitionMatch); mRequestedStartingSurfaceId = INVALID_TASK_ID; - mStartingSurface = null; + if (mStartingSurface != null && mStartingSurface.isValid()) { + mStartingSurface.release(); + mStartingSurface = null; + } } } |