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

Unverified Commit 5e88e54d authored by Dave Daynard's avatar Dave Daynard Committed by Michael Bestas
Browse files

Allow override of DUN settings

Allow override of system DUN settings by setting
persist.sys.dun.override
to one of the following values:
2 = not set, 0 = DUN not required, 1 = DUN required
If the prop is not set or is set to an invalid value the system setting
will be used.

Change-Id: I296f303a23351e4ab29898895abfcd313c747db9
parent ebd37b03
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import android.os.Parcel;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.SystemProperties;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
import android.telephony.CarrierConfigManager;
@@ -1182,6 +1183,10 @@ public class Tethering extends BaseNetworkObserver implements IControlsTethering
        if (tm != null) {
            secureSetting = tm.getTetherApnRequired();
        }
        // Allow override of TETHER_DUN_REQUIRED via prop
        int prop = SystemProperties.getInt("persist.sys.dun.override", -1);
        secureSetting = ((prop < 3) && (prop >= 0)) ? prop : secureSetting;

        synchronized (mPublicSync) {
            // 2 = not set, 0 = DUN not required, 1 = DUN required
            if (secureSetting != 2) {