Whitelist PHONE_STATE to wakeup apps
Whitelists PHONE_STATE to wake up apps that are not
running when this intent is broadcast.
The bug to track removing this intent from the whitelist is b/37579761
Test: Compile and run
Change-Id: I89987195c9e6d5160b40666fbfc3893602ab1c15
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index dd4d906..4ce76f4 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -1531,6 +1531,9 @@
intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
}
+ // Wakeup apps for the (SUBSCRIPTION_)PHONE_STATE broadcast.
+ intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
+
// Send broadcast twice, once for apps that have PRIVILEGED permission and once for those
// that have the runtime one
mContext.sendBroadcastAsUser(intent, UserHandle.ALL,