diff options
| author | 2022-08-17 06:23:15 +0000 | |
|---|---|---|
| committer | 2022-08-17 06:23:15 +0000 | |
| commit | 33e3f60e06fbeeba49854539ef7fb00900b9ec65 (patch) | |
| tree | 819f7a660b1d95db59d6c7fe23659fa4ba90a013 | |
| parent | e1e8b1b9325698c8f731faaad447ba906132add6 (diff) | |
| parent | f5909156007fb7976c34ec187a68792d92a6edc2 (diff) | |
Merge "Do not create starting window if there is no task." into tm-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/StartingSurfaceController.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/wm/StartingSurfaceController.java b/services/core/java/com/android/server/wm/StartingSurfaceController.java index f83173bd46c0..0bb773ae5e41 100644 --- a/services/core/java/com/android/server/wm/StartingSurfaceController.java +++ b/services/core/java/com/android/server/wm/StartingSurfaceController.java @@ -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. |