summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorKenny Guy <kennyguy@google.com>2015-05-13 21:07:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-13 21:07:17 +0000
commit467eb0566ff1df320c9a9be3da0f44ee3d6bc9fa (patch)
treeb2cbcd7ca8f3389e9e2ca1055d0770bd7b39149a /packages/SystemUI
parentd7fd045014b746a9822a66390288f44b63e4dc2f (diff)
parent0b7dd1e6c8422da0a21c1631244bec7a2af5085a (diff)
downloadframeworks_base-467eb0566ff1df320c9a9be3da0f44ee3d6bc9fa.zip
frameworks_base-467eb0566ff1df320c9a9be3da0f44ee3d6bc9fa.tar.gz
frameworks_base-467eb0566ff1df320c9a9be3da0f44ee3d6bc9fa.tar.bz2
Merge "Allowing profile to set a subset of keyguard restrictions." into mnc-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index 588ec26..2913c7d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -395,11 +395,6 @@ public abstract class BaseStatusBar extends SystemUI implements
Toast.LENGTH_SHORT).show();
}
}
- } else if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(
- action)) {
- mUsersAllowingPrivateNotifications.clear();
- updateLockscreenNotificationSetting();
- updateNotifications();
} else if (BANNER_ACTION_CANCEL.equals(action) || BANNER_ACTION_SETUP.equals(action)) {
NotificationManager noMan = (NotificationManager)
mContext.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -419,6 +414,19 @@ public abstract class BaseStatusBar extends SystemUI implements
}
};
+ private final BroadcastReceiver mAllUsersReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED.equals(action) &&
+ isCurrentProfile(getSendingUserId())) {
+ mUsersAllowingPrivateNotifications.clear();
+ updateLockscreenNotificationSetting();
+ updateNotifications();
+ }
+ }
+ };
+
private final NotificationListenerService mNotificationListener =
new NotificationListenerService() {
@Override
@@ -631,9 +639,13 @@ public abstract class BaseStatusBar extends SystemUI implements
filter.addAction(Intent.ACTION_USER_PRESENT);
filter.addAction(BANNER_ACTION_CANCEL);
filter.addAction(BANNER_ACTION_SETUP);
- filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
mContext.registerReceiver(mBroadcastReceiver, filter);
+ IntentFilter allUsersFilter = new IntentFilter();
+ allUsersFilter.addAction(
+ DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
+ mContext.registerReceiverAsUser(mAllUsersReceiver, UserHandle.ALL, allUsersFilter,
+ null, null);
updateCurrentProfilesCache();
}