OSDN Git Service

Make sure MASTER_CLEAR_NOTIFICATION goes to manifest receivers
authorChristopher Tate <ctate@google.com>
Wed, 25 Jan 2017 22:49:44 +0000 (14:49 -0800)
committerChris Tate <ctate@android.com>
Tue, 31 Jan 2017 20:52:39 +0000 (20:52 +0000)
It sometimes needs to launch OEM-supplied apps for processing, so make sure
it continues to do so.

Bug 34587823
Test: verified dispatch via logcat/dumpsys

Change-Id: Ic80e06582116cdd629492ed01a9b05b0e1b3822e

core/java/android/os/RecoverySystem.java

index a8822c5..ef5bc5c 100644 (file)
@@ -623,7 +623,8 @@ public class RecoverySystem {
         final ConditionVariable condition = new ConditionVariable();
 
         Intent intent = new Intent("android.intent.action.MASTER_CLEAR_NOTIFICATION");
-        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND
+                | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
         context.sendOrderedBroadcastAsUser(intent, UserHandle.SYSTEM,
                 android.Manifest.permission.MASTER_CLEAR,
                 new BroadcastReceiver() {