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

Commit 177b38b2 authored by Wink Saville's avatar Wink Saville
Browse files

getSubId returns INVALID_SUB_ID if there are no subIds for a phone.

Bug: 17399710
Change-Id: Ice47ee47ecc516d9d1ebe7cada8d1a145803d6c7
parent 17e77849
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1880,8 +1880,15 @@ public abstract class PhoneBase extends Handler implements Phone {
     * Returns the subscription id.
     */
    public long getSubId() {
        long [] subId = SubscriptionController.getInstance().getSubId(mPhoneId);
        return subId[0];
        long subId;

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

    /**