Merge "Prevent having empty task added back into TDA" into sc-dev

This commit is contained in:
Tony Huang
2021-07-16 05:56:08 +00:00
committed by Android (Google) Code Review

View File

@@ -5604,7 +5604,8 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
@Override @Override
public ActivityTokens getTopActivityForTask(int taskId) { public ActivityTokens getTopActivityForTask(int taskId) {
synchronized (mGlobalLock) { synchronized (mGlobalLock) {
final Task task = mRootWindowContainer.anyTaskForId(taskId); final Task task = mRootWindowContainer.anyTaskForId(taskId,
MATCH_ATTACHED_TASK_ONLY);
if (task == null) { if (task == null) {
Slog.w(TAG, "getApplicationThreadForTopActivity failed:" Slog.w(TAG, "getApplicationThreadForTopActivity failed:"
+ " Requested task not found"); + " Requested task not found");