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

Commit 3d6790ad authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 1bcb2767 50245713
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);
        }
    }
}