Toast: Fix ActivityRecord does not attached to process

ActivityRecord's IApplicationThread has been set to null due
to the process being killed. At this time, the ActivityRecord
is no longer used.

Bug: 249221879

Test: build and boot

Signed-off-by: hupeng3 <hp121520@gmail.com>
Change-Id: I47b8ee8cb779dc64c4353d39d38b6c5d65fb8373
This commit is contained in:
hupeng3
2022-09-23 11:37:41 +08:00
parent 3023a33455
commit 4842a82cee

View File

@@ -1695,7 +1695,7 @@ class TaskFragment extends WindowContainer<WindowContainer> {
ProtoLog.v(WM_DEBUG_STATES, "Executing finish of activity: %s", prev);
prev = prev.completeFinishing(false /* updateVisibility */,
"completePausedLocked");
} else if (prev.hasProcess()) {
} else if (prev.attachedToProcess()) {
ProtoLog.v(WM_DEBUG_STATES, "Enqueue pending stop if needed: %s "
+ "wasStopping=%b visibleRequested=%b", prev, wasStopping,
prev.mVisibleRequested);