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

Commit badfc720 authored by Wink Saville's avatar Wink Saville Committed by Android (Google) Code Review
Browse files

Merge "getSubId returns INVALID_SUB_ID if there are no subIds for a phone." into lmp-dev

parents 70792f37 177b38b2
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -1880,8 +1880,15 @@ public abstract class PhoneBase extends Handler implements Phone {
     * Returns the subscription id.
     * Returns the subscription id.
     */
     */
    public long getSubId() {
    public long getSubId() {
        long [] subId = SubscriptionController.getInstance().getSubId(mPhoneId);
        long subId;
        return subId[0];

        long [] subIds = SubscriptionController.getInstance().getSubId(mPhoneId);
        if (subIds == null) {
            subId = SubscriptionManager.INVALID_SUB_ID;
        } else {
            subId = subIds[0];
        }
        return subId;
    }
    }


    /**
    /**