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

Commit a3897015 authored by Davor Bertovic's avatar Davor Bertovic Committed by Steve Kondik
Browse files

Add national data roaming and make it optional (1/2)

by Robin Morawetz (Rdlgrmpf) and Davor Bertovic (LorD ClockaN)

Change-Id: Ief840d818ecf4b8ebb088fab34f01878d0a9f2d7
parent edcd72a5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2232,6 +2232,10 @@ public final class Settings {
         */
        public static final String VOLUME_WAKE_SCREEN = "volume_wake_screen";

        /**
         * Whether national data Roming should be used.
         */
        public static final String MVNO_ROAMING = "mvno_roaming";

        /**
         * Settings to backup. This is here so that it's in the same place as the settings
+3 −1
Original line number Diff line number Diff line
@@ -1220,7 +1220,9 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
        } catch (Exception e){
        }

        return gsmRoaming && !(equalsMcc && (equalsOnsl || equalsOnss));
        boolean mvnoRoaming = Settings.System.getInt(phone.getContext().getContentResolver(),
            Settings.System.MVNO_ROAMING, 0) == 1;
        return gsmRoaming && !(equalsMcc && (equalsOnsl || equalsOnss || mvnoRoaming));
    }

    private static int twoDigitsAt(String s, int offset) {