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

Commit 5f5a7ffb authored by /e/ robot's avatar /e/ robot
Browse files

Merge remote-tracking branch 'origin/lineage-16.0' into v1-pie

parents c4c448ea ec8f960e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import android.content.Context;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.util.SharedLog;
import android.os.SystemProperties;
import android.telephony.TelephonyManager;
import android.text.TextUtils;

@@ -211,6 +212,11 @@ public class TetheringConfiguration {
    }

    public static int checkDunRequired(Context ctx) {
        // Allow override via prop
        final int dunProp = SystemProperties.getInt("persist.sys.dun.override", -1);
        if (dunProp >= 0) {
            return dunProp;
        }
        final TelephonyManager tm = (TelephonyManager) ctx.getSystemService(TELEPHONY_SERVICE);
        return (tm != null) ? tm.getTetherApnRequired() : DUN_UNSPECIFIED;
    }