summaryrefslogtreecommitdiff
path: root/cmds/bootanimation/BootAnimation.cpp
diff options
context:
space:
mode:
author Qijing Yao <yaoqq@google.com> 2025-03-07 16:25:37 +0900
committer Qijing Yao <yaoqq@google.com> 2025-03-07 18:06:20 +0900
commitb50ba0c4437de32d3dd49c4acfa0f825ca59c63f (patch)
tree615e61a3a656b05a8282878127a386dbfa455740 /cmds/bootanimation/BootAnimation.cpp
parent4f06c68fa4a691d8cf9d9d43cbdb994011674b01 (diff)
Unregister DisplayWindowListener when window closed
To support drag across multi-displays, we added MultiDisplayVeiledResizeTaskPositioner as an OnDisplaysChangedListener to DisplayController. However, the listener was never unregistered, and since a new taskPositioner is created for each window, this resulted in a memory leak. This change addresses the issue by: * Adding a `close()` method to the `TaskDragResizer` interface and its implementations. For `MultiDisplayVeiledResizeTaskPositioner`, it removes the listener from `DisplayController`. For other implementations, it's a no-op. * Calling `TaskDragResizer.close()` in `WindowDecoration#close()`. Bug: 399076683 Test: atest; check heap dump to confirm the memory leak is resolved Flag: com.android.window.flags.enable_connected_displays_window_drag Change-Id: I14f0c3d04385c06899f846ceaa1962b024cdc62e
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
0 files changed, 0 insertions, 0 deletions