Do not take screenshots when launching activities...
Unless they are in another task.
Fixes bug 11374158.
Change-Id: I961d4ce9520bc84a182806db2ccb072501c8357a
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 497d48c5..2e5dedf 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -740,7 +740,10 @@
prev.state = ActivityState.PAUSING;
prev.task.touchActiveTime();
clearLaunchTime(prev);
- prev.updateThumbnail(screenshotActivities(prev), null);
+ final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
+ if (next == null || next.task != prev.task) {
+ prev.updateThumbnail(screenshotActivities(prev), null);
+ }
stopFullyDrawnTraceIfNeeded();
mService.updateCpuStats();