Stop using AppToken movement and start using Task.
Change-Id: I5fbd3b2b692e0e127386051f782b1015515ba384
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 4373502..84d5a72 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -2113,7 +2113,7 @@
if (DEBUG_TASKS) Slog.v(TAG, "Start pushing activity " + target
+ " out to new task " + target.task);
}
- mService.mWindowManager.setAppGroupId(target.appToken, task.taskId);
+ mService.mWindowManager.setAppGroupId(target.appToken, target.task.taskId);
if (replyChainEnd < 0) {
replyChainEnd = targetI;
}
@@ -2145,7 +2145,7 @@
}
mHistory.remove(srcPos);
mHistory.add(dstPos, p);
- mService.mWindowManager.moveAppToken(dstPos, p.appToken);
+// mService.mWindowManager.moveAppToken(dstPos, p.appToken);
mService.mWindowManager.setAppGroupId(p.appToken, taskId);
dstPos++;
i++;
@@ -2297,7 +2297,7 @@
if (DEBUG_TASKS) Slog.v(TAG, "Pulling activity " + p
+ " from " + srcPos + " to " + lastReparentPos
+ " in to resetting task " + task);
- mService.mWindowManager.moveAppToken(lastReparentPos, p.appToken);
+// mService.mWindowManager.moveAppToken(lastReparentPos, p.appToken);
mService.mWindowManager.setAppGroupId(p.appToken, taskId);
}
// TODO: This is wrong because it doesn't take lastReparentPos into account.
@@ -4566,7 +4566,7 @@
updateTransitLocked(AppTransition.TRANSIT_TASK_TO_FRONT, options);
}
- mService.mWindowManager.moveAppTokensToTop(moved);
+// mService.mWindowManager.moveAppTokensToTop(moved);
mService.mWindowManager.moveTaskToTop(task);
if (VALIDATE_TOKENS) {
validateAppTokensLocked();
@@ -4659,7 +4659,7 @@
mService.mWindowManager.prepareAppTransition(
AppTransition.TRANSIT_TASK_TO_BACK, false);
}
- mService.mWindowManager.moveAppTokensToBottom(moved);
+// mService.mWindowManager.moveAppTokensToBottom(moved);
mService.mWindowManager.moveTaskToBottom(task);
if (VALIDATE_TOKENS) {
validateAppTokensLocked();