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

Commit b5920035 authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Merge "Fixed tethering failed when device is on CBRS" into qt-r1-dev

am: 3d6790ad

Change-Id: I69621675ffe80b285b2073fe1a58bbd8e447fcbd
parents 15b235f2 3d6790ad
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1301,6 +1301,13 @@ public class PhoneSwitcher extends Handler {
        }
    }

    /**
     * @return The active data subscription id
     */
    public int getActiveDataSubId() {
        return mPreferredDataSubId;
    }

    public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
        final IndentingPrintWriter pw = new IndentingPrintWriter(writer, "  ");
        pw.println("PhoneSwitcher:");
+23 −0
Original line number Diff line number Diff line
@@ -3739,4 +3739,27 @@ public class SubscriptionController extends ISub.Stub {
        return TextUtils.emptyIfNull(getSubscriptionProperty(subId,
                SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES));
    }

    /**
     * Get active data subscription id.
     *
     * @return Active data subscription id
     *
     * @hide
     */
    @Override
    public int getActiveDataSubscriptionId() {
        enforceReadPrivilegedPhoneState("getActiveDataSubscriptionId");
        final long token = Binder.clearCallingIdentity();

        try {
            int subId = PhoneSwitcher.getInstance().getActiveDataSubId();
            if (!SubscriptionManager.isUsableSubscriptionId(subId)) {
                subId = getDefaultDataSubId();
            }
            return subId;
        } finally {
            Binder.restoreCallingIdentity(token);
        }
    }
}