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

Commit f3f5ba2f authored by Junda Liu's avatar Junda Liu Committed by Android (Google) Code Review
Browse files

Merge "Add hasMatchedTetherApnSetting support." into lmp-mr1-dev

parents ed588e46 79f9daf3
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -276,6 +276,13 @@ public interface Phone {
     */
    String[] getActiveApnTypes();

    /**
     * Check if TETHER_DUN_APN setting or config_tether_apndata includes APN that matches
     * current operator.
     * @return true if there is a matching DUN APN.
     */
    boolean hasMatchedTetherApnSetting();

    /**
     * Returns string for the active APN host.
     *  @return type as a string or null if none.
+5 −0
Original line number Diff line number Diff line
@@ -1689,6 +1689,11 @@ public abstract class PhoneBase extends Handler implements Phone {
        return mDcTracker.getActiveApnTypes();
    }

    @Override
    public boolean hasMatchedTetherApnSetting() {
        return mDcTracker.hasMatchedTetherApnSetting();
    }

    @Override
    public String getActiveApnHost(String apnType) {
        return mDcTracker.getActiveApnString(apnType);
+5 −0
Original line number Diff line number Diff line
@@ -413,6 +413,11 @@ public class PhoneProxy extends Handler implements Phone {
        return mActivePhone.getActiveApnTypes();
    }

    @Override
    public boolean hasMatchedTetherApnSetting() {
        return mActivePhone.hasMatchedTetherApnSetting();
    }

    @Override
    public String getActiveApnHost(String apnType) {
        return mActivePhone.getActiveApnHost(apnType);
+6 −0
Original line number Diff line number Diff line
@@ -717,6 +717,12 @@ public abstract class DcTrackerBase extends Handler {
        return retDunSetting;
    }

    public boolean hasMatchedTetherApnSetting() {
        ApnSetting matched = fetchDunApn();
        log("hasMatchedTetherApnSetting: APN=" + matched);
        return matched != null;
    }

    public String[] getActiveApnTypes() {
        String[] result;
        if (mActiveApn != null) {