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
This commit is contained in:
Kevin Chyn
2017-10-09 18:34:41 -07:00
committed by Jorim Jaggi
parent 0f8970d7e6
commit 4463948a12

View File

@@ -2732,6 +2732,8 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
void setShowWhenLocked(boolean showWhenLocked) {
mShowWhenLocked = showWhenLocked;
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0 /* configChanges */,
false /* preserveWindows */);
}
/**