From 51de96af1a4678b035f964747a82f9891821aee1 Mon Sep 17 00:00:00 2001 From: Brad Ebinger Date: Fri, 21 Apr 2017 17:05:18 -0700 Subject: [PATCH] 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 --- services/core/java/com/android/server/TelephonyRegistry.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java index dd4d9065f126e..4ce76f4b96fe0 100644 --- a/services/core/java/com/android/server/TelephonyRegistry.java +++ b/services/core/java/com/android/server/TelephonyRegistry.java @@ -1531,6 +1531,9 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { 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,