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

Commit e5852a03 authored by Jack Yu's avatar Jack Yu
Browse files

Renamed methods for clarification

Test: build
Bug: 239607619
Merged-In: Iefbf99da50eb7575234d03a36bd65d2e34a76b41
Change-Id: Iefbf99da50eb7575234d03a36bd65d2e34a76b41
parent 02c79c89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -439,7 +439,7 @@ public class MultiSimSettingController extends Handler {
        // being specified in it. So here we do additional check to make sur we don't miss the
        // subId.
        if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
            int[] subIds = mSubController.getSubId(phoneId);
            int[] subIds = mSubController.getSubIds(phoneId);
            if (!ArrayUtils.isEmpty(subIds)) {
                CarrierConfigManager cm = (CarrierConfigManager) mContext.getSystemService(
                        mContext.CARRIER_CONFIG_SERVICE);
+1 −1
Original line number Diff line number Diff line
@@ -4058,7 +4058,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
            Rlog.e(LOG_TAG, "SubscriptionController.getInstance = null! Returning default subId");
            return SubscriptionManager.DEFAULT_SUBSCRIPTION_ID;
        }
        return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhoneId);
        return SubscriptionController.getInstance().getSubId(mPhoneId);
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -2707,7 +2707,7 @@ public abstract class SMSDispatcher extends Handler {

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    protected int getSubId() {
        return SubscriptionController.getInstance().getSubIdUsingPhoneId(mPhone.getPhoneId());
        return SubscriptionController.getInstance().getSubId(mPhone.getPhoneId());
    }

    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
+8 −9
Original line number Diff line number Diff line
@@ -1517,7 +1517,7 @@ public class SubscriptionController extends ISub.Stub {
                notifySubscriptionInfoChanged();
            } else {  // Handle Local SIM devices
                // Set Display name after sub id is set above so as to get valid simCarrierName
                int subId = getSubIdUsingPhoneId(slotIndex);
                int subId = getSubId(slotIndex);
                if (!SubscriptionManager.isValidSubscriptionId(subId)) {
                    if (DBG) {
                        logdl("[addSubInfoRecord]- getSubId failed invalid subId = " + subId);
@@ -1792,7 +1792,7 @@ public class SubscriptionController extends ISub.Stub {
    public boolean setPlmnSpn(int slotIndex, boolean showPlmn, String plmn, boolean showSpn,
                              String spn) {
        synchronized (mLock) {
            int subId = getSubIdUsingPhoneId(slotIndex);
            int subId = getSubId(slotIndex);
            if (mContext.getPackageManager().resolveContentProvider(
                    SubscriptionManager.CONTENT_URI.getAuthority(), 0) == null ||
                    !SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -2622,13 +2622,13 @@ public class SubscriptionController extends ISub.Stub {
    }

    /**
     * Return the subId for specified slot Id.
     * Return the subIds for specified slot Id.
     * @deprecated
     */
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @Override
    @Deprecated
    public int[] getSubId(int slotIndex) {
    public int[] getSubIds(int slotIndex) {
        if (VDBG) printStackTrace("[getSubId]+ slotIndex=" + slotIndex);

        // Map default slotIndex to the current default subId.
@@ -3028,9 +3028,8 @@ public class SubscriptionController extends ISub.Stub {

    // FIXME: We need we should not be assuming phoneId == slotIndex as it will not be true
    // when there are multiple subscriptions per sim and probably for other reasons.
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    public int getSubIdUsingPhoneId(int phoneId) {
        int[] subIds = getSubId(phoneId);
    public int getSubId(int phoneId) {
        int[] subIds = getSubIds(phoneId);
        if (subIds == null || subIds.length == 0) {
            return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
        }
@@ -4042,7 +4041,7 @@ public class SubscriptionController extends ISub.Stub {
     * @return true if sub/group is the same, false otherwise
     */
    public boolean checkPhoneIdAndIccIdMatch(int phoneId, String iccid) {
        int subId = getSubIdUsingPhoneId(phoneId);
        int subId = getSubId(phoneId);
        if (!SubscriptionManager.isUsableSubIdValue(subId)) return false;
        ParcelUuid groupUuid = getGroupUuid(subId);
        List<SubscriptionInfo> subInfoList;
@@ -4315,7 +4314,7 @@ public class SubscriptionController extends ISub.Stub {
                        Settings.Global.ENABLED_SUBSCRIPTION_FOR_SLOT + physicalSlotIndex);
            } catch (Settings.SettingNotFoundException e) {
                // Value never set. Return whether it's currently active.
                subId = getSubIdUsingPhoneId(logicalSlotIndex);
                subId = getSubId(logicalSlotIndex);
            }

            return subId;
+1 −1
Original line number Diff line number Diff line
@@ -1166,7 +1166,7 @@ public class SubscriptionInfoUpdater extends Handler {
            return;
        }

        int currentSubId = mSubscriptionController.getSubIdUsingPhoneId(phoneId);
        int currentSubId = mSubscriptionController.getSubId(phoneId);
        if (!SubscriptionManager.isValidSubscriptionId(currentSubId)
                || currentSubId == SubscriptionManager.DEFAULT_SUBSCRIPTION_ID) {
            if (DBG) logd("No subscription is active for phone being updated");
Loading