Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fe695fb authored by Sarah Chin's avatar Sarah Chin
Browse files

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
Merged-In: I7b232a1a695d1db7cb0d0a177bb1090e9033b805
parent 36b9bc8e
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -525,9 +525,11 @@ public class NetworkPolicyManager {
     *
     *
     * @param subId the subscriber to get the subscription plans for.
     * @param subId the subscriber to get the subscription plans for.
     * @param callingPackage the name of the package making the call.
     * @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
     * @hide
     */
     */
    @NonNull
    @Nullable
    public SubscriptionPlan[] getSubscriptionPlans(int subId, @NonNull String callingPackage) {
    public SubscriptionPlan[] getSubscriptionPlans(int subId, @NonNull String callingPackage) {
        try {
        try {
            return mService.getSubscriptionPlans(subId, callingPackage);
            return mService.getSubscriptionPlans(subId, callingPackage);
@@ -540,7 +542,7 @@ public class NetworkPolicyManager {
     * Get subscription plan for the given networkTemplate.
     * Get subscription plan for the given networkTemplate.
     *
     *
     * @param template the networkTemplate to get the subscription plan for.
     * @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.
     *         {@code null} if not found.
     * @hide
     * @hide
     */
     */