Skip sync invisible & lifecycle-unlreated window for an Activity.
Client can create extra window and set it's visibility to INVISIBLE or GONE, for either case, the client won't redraw this window after request sync, which can cause sync timeout. To preventing from the timeout issue, skip sync that window during prepareSync. Bug: 285818330 Test: atest WindowOrganizerTests WindowStateTests Test: create a window and set it's visibility to GONE, verify that activity transition won't be blocked on waiting for this kind of window. Change-Id: Ie8ccf1d9b8629a60943726cf3c2b8daad84fe08c
This commit is contained in:
@@ -5667,6 +5667,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
|
||||
// TODO(b/233286785): Add sync support to wallpaper.
|
||||
return true;
|
||||
}
|
||||
if (mActivityRecord != null && mViewVisibility != View.VISIBLE
|
||||
&& mWinAnimator.mAttrType != TYPE_BASE_APPLICATION
|
||||
&& mWinAnimator.mAttrType != TYPE_APPLICATION_STARTING) {
|
||||
// Skip sync for invisible app windows which are not managed by activity lifecycle.
|
||||
return false;
|
||||
}
|
||||
// In the WindowContainer implementation we immediately mark ready
|
||||
// since a generic WindowContainer only needs to wait for its
|
||||
// children to finish and is immediately ready from its own
|
||||
|
||||
Reference in New Issue
Block a user