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

Commit 3be9888e authored by 苗苗 (Miao Miao)'s avatar 苗苗 (Miao Miao)
Browse files

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
parent 31e3f2e7
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -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) {
+3 −2
Original line number Diff line number Diff line
@@ -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.