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

Commit a94991d3 authored by Wink Saville's avatar Wink Saville
Browse files

Use SubscriptionController.getSubIdUsingPhoneId for getSubId

This is slightly better as code in getSubIdUsingPhoneId also returns
INVALID_SUB_ID if the length is 0.

Bug: 17399710
Change-Id: I47484c0001ea4606029dbf42e135a33031beb8da
parent 691b8d29
Loading
Loading
Loading
Loading
+1 −9
Original line number Original line Diff line number Diff line
@@ -1880,15 +1880,7 @@ public abstract class PhoneBase extends Handler implements Phone {
     * Returns the subscription id.
     * Returns the subscription id.
     */
     */
    public long getSubId() {
    public long getSubId() {
        long subId;
        return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);

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


    /**
    /**