From 4463948a1266e745d5531a28a353726a25515971 Mon Sep 17 00:00:00 2001 From: Kevin Chyn Date: Mon, 9 Oct 2017 18:34:41 -0700 Subject: [PATCH] Call ensureActivitiesVisibleLocked when setShowWhenLocked If an activity is behind lockscreen and then just calls setShowWhenLocked(true), nothing will happen, as it won't trigger AM to update the visibilities of the activities. We need to make sure to actually update the visibilities in this case. Test: ran go/wm-smoke tests Change-Id: I4fb384a3d5ef8427c2eee32986f1dcbd07514825 --- services/core/java/com/android/server/am/ActivityRecord.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java index f544d3771aba5..0a7c1565d55e7 100644 --- a/services/core/java/com/android/server/am/ActivityRecord.java +++ b/services/core/java/com/android/server/am/ActivityRecord.java @@ -2732,6 +2732,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo void setShowWhenLocked(boolean showWhenLocked) { mShowWhenLocked = showWhenLocked; + mStackSupervisor.ensureActivitiesVisibleLocked(null, 0 /* configChanges */, + false /* preserveWindows */); } /**