summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-05-13 14:54:00 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-13 14:54:01 +0000
commit5b32fa78d30f44bcabd1695d2f5d1062ca1118d5 (patch)
tree38fcbeb5817acb9ef397f1a32ba87451c23224af
parent6a3418e2e1608a57244a9957b535148783b70a31 (diff)
parente7a835bc9d2af1fcdd1a645df77388048ceb1f66 (diff)
downloadframeworks_base-5b32fa78d30f44bcabd1695d2f5d1062ca1118d5.zip
frameworks_base-5b32fa78d30f44bcabd1695d2f5d1062ca1118d5.tar.gz
frameworks_base-5b32fa78d30f44bcabd1695d2f5d1062ca1118d5.tar.bz2
Merge "NoMan: Specify all users for noman broadcasts." into mnc-dev
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java13
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() {