diff options
author | John Spurlock <jspurlock@google.com> | 2015-05-13 10:47:05 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2015-05-13 10:47:05 -0400 |
commit | e7a835bc9d2af1fcdd1a645df77388048ceb1f66 (patch) | |
tree | b0515ef5d9224fd93b699f4747a5097672444771 | |
parent | cf304fb35c2086601178858e307d3dda36dbbff7 (diff) | |
download | frameworks_base-e7a835bc9d2af1fcdd1a645df77388048ceb1f66.zip frameworks_base-e7a835bc9d2af1fcdd1a645df77388048ceb1f66.tar.gz frameworks_base-e7a835bc9d2af1fcdd1a645df77388048ceb1f66.tar.bz2 |
NoMan: Specify all users for noman broadcasts.
Change-Id: I347bc25b09506dd5fd695e68f23e9654bab8103c
-rw-r--r-- | services/core/java/com/android/server/notification/NotificationManagerService.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index 791c1de..5d91fb4 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -908,11 +908,6 @@ public class NotificationManagerService extends SystemService { void onPolicyChanged() { sendRegisteredOnlyBroadcast(NotificationManager.ACTION_NOTIFICATION_POLICY_CHANGED); } - - private void sendRegisteredOnlyBroadcast(String action) { - getContext().sendBroadcast(new Intent(action) - .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)); - } }); final File systemDir = new File(Environment.getDataDirectory(), "system"); mPolicyFile = new AtomicFile(new File(systemDir, "notification_policy.xml")); @@ -995,6 +990,11 @@ public class NotificationManagerService extends SystemService { publishLocalService(NotificationManagerInternal.class, mInternalService); } + private void sendRegisteredOnlyBroadcast(String action) { + getContext().sendBroadcastAsUser(new Intent(action) + .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), UserHandle.ALL, null); + } + /** * Read the old XML-based app block database and import those blockages into the AppOps system. */ @@ -1061,8 +1061,7 @@ public class NotificationManagerService extends SystemService { ZenLog.traceEffectsSuppressorChanged(mEffectsSuppressor, suppressor); mEffectsSuppressor = suppressor; mZenModeHelper.setEffectsSuppressed(suppressor != null); - getContext().sendBroadcast(new Intent(NotificationManager.ACTION_EFFECTS_SUPPRESSOR_CHANGED) - .addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)); + sendRegisteredOnlyBroadcast(NotificationManager.ACTION_EFFECTS_SUPPRESSOR_CHANGED); } private void updateInterruptionFilterLocked() { |