Merge "Don't send broadcast to unprepared apps" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
887a3931ed
@@ -2659,6 +2659,7 @@ public class NotificationManagerService extends SystemService {
|
|||||||
final Set<String> dndApprovedPackages = mConditionProviders.getAllowedPackages();
|
final Set<String> dndApprovedPackages = mConditionProviders.getAllowedPackages();
|
||||||
for (String pkg : dndApprovedPackages) {
|
for (String pkg : dndApprovedPackages) {
|
||||||
intent.setPackage(pkg);
|
intent.setPackage(pkg);
|
||||||
|
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
|
||||||
getContext().sendBroadcastAsUser(intent, UserHandle.ALL);
|
getContext().sendBroadcastAsUser(intent, UserHandle.ALL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user