Skip to content
Commit 08eae598 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Unlink death recipient which references to DisplayContent

Though the remote side (SystemUI) will unregister the recipient
when receiving display removed, it may be too late that the
DisplayContent is removed from RootWindowContainer, then WMS#
setDisplayWindowInsetsController becomes no-op and causes the
instance of DisplayContent to be leaked.

Also release windowing layer manually in case it is an additional
layer which isn't managed by WindowContainer (e.g. if the display
does not have FEATURE_WINDOWED_MAGNIFICATION). So it won't rely
on GC to release.

Bug: 240704591
Test: Create/destroy virtual display many times.
      GC: adb shell 'kill -10 `pidof system_server`'
      No surface of virtual display exists in:
      adb shell dumpsys SurfaceFlinger grep -A 100 'Offscreen'
Change-Id: Iac84992b8eb13c4348dfca87924fb0c2fa94a5b8
parent 6a573aec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment