From 0756632aa056cc873943f7f19c7501ce79608394 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Thu, 26 Sep 2013 16:42:55 -0700 Subject: Dismiss keyguard when resuming visible activities If an activity is visible behind the keyguard when it is launched by another activity then there would be no call to dismissKeyguard. Because the other activity is pausing the call to dismissKeyguard is skipped in startActivityLocked(). And because it is already visible the call to ActivityRecord.windowsVisible() is never made and the call to reportActivityVisibleLocked() which calls dismissKeyguard() is also never made. This change recognizes when an activity is resumed and visible and calls dismissKeyguard() in that case. Fixes bug 10732489. Change-Id: I3de1350a55231aaa14dadc8709fd0fcf4960742c --- services/java/com/android/server/am/ActivityStack.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to '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 index a88c3cc..18ff819 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -937,6 +937,10 @@ final class ActivityStack { next.idle = false; next.results = null; next.newIntents = null; + if (next.nowVisible) { + // We won't get a call to reportActivityVisibleLocked() so dismiss lockscreen now. + mStackSupervisor.dismissKeyguard(); + } // schedule an idle timeout in case the app doesn't do it for us. mStackSupervisor.scheduleIdleTimeoutLocked(next); -- cgit v1.1