diff options
| author | 2019-03-26 15:45:52 -0700 | |
|---|---|---|
| committer | 2019-03-26 15:45:52 -0700 | |
| commit | 012a279038e8ef55c31ab71d2e59d81349d6be65 (patch) | |
| tree | 3543fa3613178d4ab951ba8b20d56e4b2728df89 | |
| parent | 94628539aa7ebd69f21d0c7ebbf4162b1e9764b9 (diff) | |
| parent | cd24e832e84d1d048e0f1740d8cd56c501a3f975 (diff) | |
Merge "Device could not use wifi hotspot when data card switch to sim2"
am: cd24e832e8
Change-Id: I9ae2b31e6dd3f4a4c575ff37b8a9df58eb2c2e70
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 13 | ||||
| -rw-r--r-- | telephony/java/com/android/internal/telephony/ITelephony.aidl | 5 |
2 files changed, 15 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 676d0fc50139..6ac9a3f91f5c 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -7107,10 +7107,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 7a677cb5d62a..f01f03b0aad8 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. |