From 79323120dd1faf139c4d881e2d817d1b8085d252 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Mon, 25 Aug 2014 16:56:52 -0700 Subject: [PATCH] Remove redundant call to window manager addTask() If there are activities in persisted tasks then calling addAppToken() will automatically call addTask(). If there are no activities then calling addTask() is a nop. In either case the call to addTask() is unnecessary. It was actually worse than unnecessary because in the former case we ended up with two identical tasks in the Window Manager. Fixes bug 16958544. Change-Id: I2dc4b50aa94668873c1a783c47e0c696d62616f0 --- .../core/java/com/android/server/am/ActivityStackSupervisor.java | 1 - 1 file changed, 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 8aec392322485..bd8501c430b9b 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2430,7 +2430,6 @@ public final class ActivityStackSupervisor implements DisplayListener { r.userId, r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind); } - mWindowManager.addTask(taskId, stackId, false); } resumeHomeStackTask(HOME_ACTIVITY_TYPE, null); }