Do not create starting window if there is no task.
Do not add starting window on the activity if no task exists in
the activity.
Also add an error log for the activity without task.
Bug: 233153876
Bug: 240032099
Test: atest SplashscreenTests ActivityRecordTests
Change-Id: Iea264cd8b605443c695165c1136d56b86ffd4eb1
Merged-In: Iea264cd8b605443c695165c1136d56b86ffd4eb1
(cherry picked from commit 24697fe3fd)
This commit is contained in:
committed by
Wei Sheng Shih
parent
c4b0e9318d
commit
f590915600
@@ -220,6 +220,11 @@ public class StartingSurfaceController {
|
||||
// Attempt to add starting window from the top-most activity.
|
||||
for (int i = mDeferringAddStartActivities.size() - 1; i >= 0; --i) {
|
||||
final DeferringStartingWindowRecord next = mDeferringAddStartActivities.get(i);
|
||||
if (next.mDeferring.getTask() == null) {
|
||||
Slog.e(TAG, "No task exists: " + next.mDeferring.shortComponentName
|
||||
+ " parent: " + next.mDeferring.getParent());
|
||||
continue;
|
||||
}
|
||||
next.mDeferring.showStartingWindow(next.mPrev, mInitNewTask, mInitTaskSwitch,
|
||||
mInitProcessRunning, true /* startActivity */, next.mSource, topOptions);
|
||||
// If one succeeds, it is done.
|
||||
|
||||
Reference in New Issue
Block a user