Merge "Prevent having empty task added back into TDA" into sc-dev am: f4690485e1 am: 992c37ed9a

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15298116

Change-Id: I079e477c609fbcb3caea7b4e4c110d854e313500
This commit is contained in:
Tony Huang
2021-07-16 06:13:05 +00:00
committed by Automerger Merge Worker

View File

@@ -5666,7 +5666,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");