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

Skip to content
Commit debca09e authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by gitbuildkicker
Browse files

[DO NOT MERGE] Prevent crash from early Toast surface destruction.

To understand this change it's first helpful to review Toasts.
The ViewRoot is constructed on the client side, but it's added,
to a window token controlled by the NotificationManagerService.
When we call NotificationManagerService#cancelToast, the system
will remove this window token. With the window token removed,
the WindowManager needs to destroy the surface to prevent orphaned
windows. If we destroy the Surface before removing the toast on the
client side however, we've never asked the ViewRoot to stop rendering
and we could have a crash. To solve this we just have to ensure we call
removeView before cancelToast.

Bug: 31547288
Bug: 30150688

Change-Id: Ic7e8914a7fb2134a8b9e0c2f3810d7f075c8391e
(cherry picked from commit 016c9c8c)
parent 15984195
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