Don't send broadcast to unprepared apps
Test: reboot, verify broadcast delivery in bugreport Fixes: 185532863 Change-Id: I94a4b4be693d73ea6154a91e88cd2bf1d3495b94
This commit is contained in:
@@ -2659,6 +2659,7 @@ public class NotificationManagerService extends SystemService {
|
||||
final Set<String> dndApprovedPackages = mConditionProviders.getAllowedPackages();
|
||||
for (String pkg : dndApprovedPackages) {
|
||||
intent.setPackage(pkg);
|
||||
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
|
||||
getContext().sendBroadcastAsUser(intent, UserHandle.ALL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user