From 446ef1de8d373c1b017df8d19ebf9a47811fb402 Mon Sep 17 00:00:00 2001 From: riddle_hsu Date: Thu, 9 Jan 2014 20:24:34 +0800 Subject: [PATCH] Fix visibility of multiple non-fullscreen activities. Issue detail: Assume X, Y are non-fullscreen activities. a.Home starts an activity X in task A in application stack. b.X starts an activity Y in or c.Activity X will be invisible. How to fix: Because the function "isActivityOverHome" means an activity is able to see home. But there may have many non-fullscreen activities between the top non-fullscreen activity and home. If flag "behindFullscreen" is set, those middle activities will be invisible. So it should only take care from who is adjacent to home. Then check two flags frontOfTask(task root) and mOnTopOfHome for constraining the condition. Change-Id: I60bcea304976414e44835a0a38675aae365e9e19 --- services/java/com/android/server/am/ActivityStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 services/java/com/android/server/am/ActivityStack.java diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java old mode 100644 new mode 100755 index 37f4cd7a32af3..e9c78a7a31a7e --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -1144,7 +1144,7 @@ final class ActivityStack { } else if (isActivityOverHome(r)) { if (DEBUG_VISBILITY) Slog.v(TAG, "Showing home: at " + r); showHomeBehindStack = true; - behindFullscreen = !isHomeStack(); + behindFullscreen = !isHomeStack() && r.frontOfTask && task.mOnTopOfHome; } } else { if (DEBUG_VISBILITY) Slog.v(