summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorSarah Chin <sarahchin@google.com>2022-01-28 22:44:58 -0800
committerSarah Chin <sarahchin@google.com>2022-01-31 18:16:54 +0000
commit8e5d992fa41ef52ee3e3cbe7a67b4f6cd5dbe03b (patch)
treec33ddbe8e30bcea6409562618f88fd9da6fe911c /core/java
parent2810da2c61039f98bf767849ae29d16f42ee0a91 (diff)
Update getSubscriptionPlans documentation
getSubscriptionPlans can return null if a plan has not been set for the given subId yet. Change the annotation from @NonNull -> @Nullable and update the documentation. SubscriptionManager#getSubscriptionPlans will return the @NonNull plans instead. Test: build Bug: 213896944 Change-Id: I7b232a1a695d1db7cb0d0a177bb1090e9033b805
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/NetworkPolicyManager.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/net/NetworkPolicyManager.java b/core/java/android/net/NetworkPolicyManager.java
index c936bfa05118..9122adfece53 100644
--- a/core/java/android/net/NetworkPolicyManager.java
+++ b/core/java/android/net/NetworkPolicyManager.java
@@ -523,9 +523,11 @@ public class NetworkPolicyManager {
*
* @param subId the subscriber to get the subscription plans for.
* @param callingPackage the name of the package making the call.
+ * @return the active {@link SubscriptionPlan}s for the given subscription id, or
+ * {@code null} if not found.
* @hide
*/
- @NonNull
+ @Nullable
public SubscriptionPlan[] getSubscriptionPlans(int subId, @NonNull String callingPackage) {
try {
return mService.getSubscriptionPlans(subId, callingPackage);
@@ -538,7 +540,7 @@ public class NetworkPolicyManager {
* Get subscription plan for the given networkTemplate.
*
* @param template the networkTemplate to get the subscription plan for.
- * @return the active {@link SubscriptionPlan} for the given template, or
+ * @return the active {@link SubscriptionPlan}s for the given template, or
* {@code null} if not found.
* @hide
*/