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

Commit 269195b3 authored by wilsonshih's avatar wilsonshih
Browse files

Prevent undisplayed splash screen from hanging in Shell.

A View's mAttachInfo field is assigned after
ViewRootImpl#performTraversals. Therefore, if the system server rapidly
requests to add two splash screen windows and then remove one during
the add sequence, the removal request might be ignored because the
traversal may not have occurred yet.
Instead of checking isAttachedToWindow, checking for the existence of
the root view's parent is more robust. This check is valid immediately
after WindowManagerGlobal#addView is called.

Flag: EXEMPT bugfix
Bug: 388221833
Test: hard-code to force create multiple splash screens in the system
server, to simulate what would happen when remove splash screen request
send to shell before the splash screen view added to the root view,
then found out the isAttachedToWindow could make the root view stay in
Shell if traversal hasn't happen.

Change-Id: I9a4f09685cbac409804e1086b027c6532c0367eb
parent 68673d19
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