Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef3f9c55 authored by Daichi Hirono's avatar Daichi Hirono
Browse files

Prevent surface use after release in DragResizeInputListener

DragResizeInputListener initialized input channels on a background
thread. The decor surface used for initialization could be released on
the main thread before the background initialization completed, leading
to a use-after-release.

This change addresses the issue by having DragResizeInputListener create
and own a new SurfaceControl referencing the same underlying surface as
the decor surface. DragResizeInputListener is then responsible for
releasing this new SurfaceControl after background initialization,
ensuring safe cleanup.

Bug: 401470167
Test: DragResizeInputListenerTest
Flag: com.android.window.flags.enable_drag_resize_set_up_in_bg_thread
Change-Id: I37ba7d97d51079ba07148a425826a0cd9b59c3fd
parent c76ef2ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment