diff options
| author | 2019-03-20 14:30:45 +0800 | |
|---|---|---|
| committer | 2019-03-21 16:20:05 +0800 | |
| commit | 3be9888e5a0ab5ab8889d2e6b90b6444e1d35575 (patch) | |
| tree | aa37572a99993b7c00c0685bdc5456b2cdf66940 | |
| parent | 31e3f2e7345bf55c856d9a8156514afccc96e8d3 (diff) | |
Device could not use wifi hotspot when data card switch to sim2
STEPS TO REPRODUCE:
1. Test devide insert two sim card into the phone,Sim1 do not support DUN APN and sim2 support DUP APN
2. Switch data card to sim2
2. Enable wifi hotspot
3. Reference phone connect test device wifi hotspot and access website
OBSERVED RESULTS:
Reference phone could connect to test device wifi hotspot but could not access to Internet
Test: Whether wifi hotspot available when sim2 which support DUN APN is data card
Change-Id: I733ccea273b03efc6bbc59c3308d0b7941eb282b
| -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 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. |