summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kuhne <skuhne@google.com>2015-05-12 13:42:18 -0700
committerStefan Kuhne <skuhne@google.com>2015-05-13 14:07:57 +0000
commit54714cd21e272a4edca16d10f67b0ba3043af535 (patch)
tree07468b80fba21a9aca200b7559e35a60644ebaa7
parent1e6be7285d4dc8b494c70aef8d2ed8b8c1d8e0de (diff)
downloadframeworks_base-54714cd21e272a4edca16d10f67b0ba3043af535.zip
frameworks_base-54714cd21e272a4edca16d10f67b0ba3043af535.tar.gz
frameworks_base-54714cd21e272a4edca16d10f67b0ba3043af535.tar.bz2
Ensure activity visiblity when moving task
There was a visibility problem when multiple already running activity got resized at the same time. Only the last activity launched that got focus was shown and all others were not. The problem arose when a new ActivityStack got created and the (existing) window got attached which led to the divergence of the visibility states in different objects. The WindowState thinks that it is visible, but the AppWindowToken thinks that it is not. Subsequent calls to WindowState::ShowLw ignore calls to show the window and the application logic enters the GONE state until it recieves focus. Bug: 20692085 Change-Id: Ifc0e3686398ccd1d1ff32e1a266163b8db5b7f26
-rw-r--r--services/core/java/com/android/server/am/ActivityStackSupervisor.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 8c98f9f..bdb3201 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -2860,6 +2860,9 @@ public final class ActivityStackSupervisor implements DisplayListener {
task.stack.removeTask(task, "moveTaskToStack", false /* notMoving */);
}
stack.addTask(task, toTop, true);
+ // The task might have already been running and its visibility needs to be synchronized with
+ // the visibility of the stack / windows.
+ stack.ensureActivitiesVisibleLocked(null, 0);
resumeTopActivitiesLocked();
}