Define broadcasts for refreshing data plans.
We don't hand the Intent out to the Settings app, since we need to
carefully set whitelisting to allow the carrier app to wake up and
respond if it's dozing.
Define new "changed" broadcast that we'll send out whenever plans
are changed internally.
Test: builds, boots
Bug: 64133169
Change-Id: Iacdd06d8e273fd52c8fc83edab13c9c8453b28eb
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 3c47e85..5d7256d 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -2793,6 +2793,11 @@
handleNetworkPoliciesUpdateAL(true);
}
}
+
+ final Intent intent = new Intent(SubscriptionManager.ACTION_SUBSCRIPTION_PLANS_CHANGED);
+ intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
+ intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
+ mContext.sendBroadcast(intent, android.Manifest.permission.MANAGE_SUBSCRIPTION_PLANS);
} finally {
Binder.restoreCallingIdentity(token);
}