summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java13
-rw-r--r--telephony/java/com/android/internal/telephony/ITelephony.aidl5
2 files changed, 15 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 973cd77916b5..6f0765277762 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -7082,10 +7082,21 @@ public class TelephonyManager {
* @hide
*/
public boolean getTetherApnRequired() {
+ return getTetherApnRequired(getSubId(SubscriptionManager.getDefaultDataSubscriptionId()));
+ }
+
+ /**
+ * Check whether DUN APN is required for tethering with subId.
+ *
+ * @param subId the id of the subscription to require tethering.
+ * @return {@code true} if DUN APN is required for tethering.
+ * @hide
+ */
+ public boolean getTetherApnRequired(int subId) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.getTetherApnRequired();
+ return telephony.getTetherApnRequiredForSubscriber(subId);
} catch (RemoteException ex) {
Rlog.e(TAG, "hasMatchedTetherApnSetting RemoteException", ex);
} catch (NullPointerException ex) {
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 02a5bc8937ee..5d21bb0d7fff 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -788,12 +788,13 @@ interface ITelephony {
int getPreferredNetworkType(int subId);
/**
- * Check whether DUN APN is required for tethering.
+ * Check whether DUN APN is required for tethering with subId.
*
+ * @param subId the id of the subscription to require tethering.
* @return {@code true} if DUN APN is required for tethering.
* @hide
*/
- boolean getTetherApnRequired();
+ boolean getTetherApnRequiredForSubscriber(int subId);
/**
* Enables framework IMS and triggers IMS Registration.