Merge "Do not wait for Activity#onDestroy if the activity has no process" into udc-qpr-dev

This commit is contained in:
Louis Chang
2023-06-12 00:35:09 +00:00
committed by Android (Google) Code Review

View File

@@ -1891,7 +1891,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks {
// DestroyActivityItem may be called first.
final ActivityRecord top = task.getTopMostActivity();
if (top != null && top.finishing && !top.mAppStopped && top.lastVisibleTime > 0
&& !task.mKillProcessesOnDestroyed) {
&& !task.mKillProcessesOnDestroyed && top.hasProcess()) {
task.mKillProcessesOnDestroyed = true;
mHandler.sendMessageDelayed(
mHandler.obtainMessage(KILL_TASK_PROCESSES_TIMEOUT_MSG, task),