summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorBenjamin Franz <bfranz@google.com>2014-12-01 16:51:48 +0000
committerBenjamin Franz <bfranz@google.com>2014-12-04 11:20:13 +0000
commit4b9f8ede4e012e5522716bba84c6037a83ee52f9 (patch)
tree02174249f3a2c7dc6d05e172e44f795d558db8af /packages/SystemUI
parentfbeeac8266c190afba084cfc1164385ff5020fce (diff)
downloadframeworks_base-4b9f8ede4e012e5522716bba84c6037a83ee52f9.zip
frameworks_base-4b9f8ede4e012e5522716bba84c6037a83ee52f9.tar.gz
frameworks_base-4b9f8ede4e012e5522716bba84c6037a83ee52f9.tar.bz2
Ensure that the USER_PRESENT_INTENT is sent to all profiles of the current user.
This intent is needed by Smart Lock agents to check whether a given user is active on the device. Bug: 18530771 Change-Id: I5d460cb0cfa8ec4f7952702a3d25d089db78a50f
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 206fc43..7ac0daf 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -72,6 +72,7 @@ import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarWindowManager;
import java.util.ArrayList;
+import java.util.List;
import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;
@@ -1217,7 +1218,12 @@ public class KeyguardViewMediator extends SystemUI {
synchronized (this) {
if (mBootCompleted) {
final UserHandle currentUser = new UserHandle(mLockPatternUtils.getCurrentUser());
- mContext.sendBroadcastAsUser(USER_PRESENT_INTENT, currentUser);
+ final UserManager um = (UserManager) mContext.getSystemService(
+ Context.USER_SERVICE);
+ List <UserInfo> userHandles = um.getProfiles(currentUser.getIdentifier());
+ for (UserInfo ui : userHandles) {
+ mContext.sendBroadcastAsUser(USER_PRESENT_INTENT, ui.getUserHandle());
+ }
} else {
mBootSendUserPresent = true;
}