From 62c5e9d7f7c860449b926971bad385836bb40fdc Mon Sep 17 00:00:00 2001 From: Filip Gruszczynski Date: Thu, 4 Feb 2016 11:06:54 -0800 Subject: [PATCH] Only make home opaque when requesting visible behind false. Bug: 26945608 Change-Id: I11273654c27a2847ca8ec9ac16823672e5d3fbe7 --- .../java/com/android/server/am/ActivityStackSupervisor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 95bc95a8767af..3496238f905f0 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2606,9 +2606,11 @@ public final class ActivityStackSupervisor implements DisplayListener { stack.setVisibleBehindActivity(visible ? r : null); if (!visible) { - // Make the activity immediately above r opaque. + // If there is a translucent home activity, we need to force it stop being translucent, + // because we can't depend on the application to necessarily perform that operation. + // Check out b/14469711 for details. final ActivityRecord next = stack.findNextTranslucentActivity(r); - if (next != null) { + if (next != null && next.isHomeActivity()) { mService.convertFromTranslucent(next.appToken); } }