Merge "Add null pointer judgment processing to prevent restarting" into main

This commit is contained in:
Treehugger Robot
2023-08-10 13:06:16 +00:00
committed by Gerrit Code Review

View File

@@ -5748,7 +5748,7 @@ class Task extends TaskFragment {
false /* deferResume */);
ActivityRecord topActivity = getDisplayArea().topRunningActivity();
Task topRootTask = topActivity.getRootTask();
Task topRootTask = topActivity == null ? null : topActivity.getRootTask();
if (topRootTask != null && topRootTask != this && topActivity.isState(RESUMED)) {
// Usually resuming a top activity triggers the next app transition, but nothing's got
// resumed in this case, so we need to execute it explicitly.