summaryrefslogtreecommitdiff
path: root/libs/androidfw/PathUtils.cpp
diff options
context:
space:
mode:
author wilsonshih <wilsonshih@google.com> 2025-01-20 16:07:41 +0800
committer wilsonshih <wilsonshih@google.com> 2025-01-20 16:07:41 +0800
commit269195b37cea7624674acc1550df83847b800041 (patch)
tree161b928401c9a5f16e880c7d16c4286c251b6e7f /libs/androidfw/PathUtils.cpp
parent68673d1951478994fb47ca2246271f8148bbfe98 (diff)
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
Diffstat (limited to 'libs/androidfw/PathUtils.cpp')
0 files changed, 0 insertions, 0 deletions