Consolidate handling occluded initializing activity
Since task fragment is introduced, forAllOccludedActivities may not work as expected because individual task fragment has its own occluding relationship. Without correcting that, it may remove active starting window. Though the method can be fixed by iterating task fragment with bounds check, it increases the complexity to maintain another partial logic of EnsureActivitiesVisibleHelper. So it may be more efficient and simpler by reusing the core of visibility update to call cancelInitializing. And because the visibility update is common to be called when resuming, it can provide the same effect. In this way, the long loop executed every time (cancelInitializingActivities) when resuming any activity is also eliminated. Also - Remove mStartingWindowState because the nullity of mStartingData has already indicated that. - Move transferSplashScreenIfNeeded to removeStartingWindow because when calling removeStartingWindowAnimation, it should do the removal directly. Bug: 189385912 Bug: 194193397 Test: ActivityRecordTests#testTransferStartingWindowFromFinishingActivity RootTaskTests#testClearUnknownAppVisibilityBehindFullscreenActivity Change-Id: I4621c2215807e713d9142acc7814786de50d88c4
Loading
Please register or sign in to comment