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

Skip to content
Commit 15df6703 authored by Romain Guy's avatar Romain Guy
Browse files

Fix potential leak in ViewRoot.

The way View.post() is handled can cause potential leaks in ViewRoot. For instance,
if a View calls post(Runnable) just after being detached from the window (in an
onClickListener for instance,) it will enqueue a Runnable in ViewRoot.RunQueue.
Unfortunately the RunQueue is emptied only on the very first layout of the ViewRoot.
This change prevents the leak by rxecuting the enqueued Runnables on every layout request
The latter did not happen before and to keep views in a correct state I think it
is necessary to always ensure we run the Runnables sent via View.post().
parent 6a2d513a
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