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
Loading
Please register or sign in to comment