summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/NetworkPolicyManager.java32
1 files changed, 31 insertions, 1 deletions
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index 32e6a6d13e28..0f66c794ea50 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -337,7 +337,6 @@ public class NetworkPolicyManager {
* requested state until explicitly cleared, or the next reboot,
* whichever happens first
* @param callingPackage the name of the package making the call.
- *
*/
public void setSubscriptionOverride(int subId, @SubscriptionOverrideMask int overrideMask,
@SubscriptionOverrideMask int overrideValue, long timeoutMillis,
@@ -351,6 +350,37 @@ public class NetworkPolicyManager {
}
/**
+ * Set the subscription plans for a specific subscriber.
+ *
+ * @param subId the subscriber this relationship applies to.
+ * @param plans the list of plans.
+ * @param callingPackage the name of the package making the call
+ */
+ public void setSubscriptionPlans(int subId, @NonNull SubscriptionPlan[] plans,
+ @NonNull String callingPackage) {
+ try {
+ mService.setSubscriptionPlans(subId, plans, callingPackage);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
+ * Get subscription plans for the given subscription id.
+ *
+ * @param subId the subscriber to get the subscription plans for.
+ * @param callingPackage the name of the package making the call.
+ */
+ @NonNull
+ public SubscriptionPlan[] getSubscriptionPlans(int subId, @NonNull String callingPackage) {
+ try {
+ return mService.getSubscriptionPlans(subId, callingPackage);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Resets network policy settings back to factory defaults.
*
* @hide