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

Commit 470879c2 authored by Manuel Auer's avatar Manuel Auer
Browse files

Add option for MVNO roaming fix. Making commit bc097e94 switchable.

Change-Id: I66c5e5bcda6b0bfa42dbdbcce6bca34abd880182
parent dccd67a9
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -2671,6 +2671,8 @@ public final class Settings {
        @Deprecated
        @Deprecated
        public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
        public static final String WIFI_WATCHDOG_PING_TIMEOUT_MS =
            Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;
            Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS;

        public static final String BUTTON_MVNO_ROAMING_KEY = "button_mvno_roaming_key";
    }
    }


    /**
    /**
+12 −1
Original line number Original line Diff line number Diff line
@@ -1286,7 +1286,18 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
     * @return true for roaming state set
     * @return true for roaming state set
     */
     */
    private boolean isRoamingBetweenOperators(boolean gsmRoaming, ServiceState s) {
    private boolean isRoamingBetweenOperators(boolean gsmRoaming, ServiceState s) {
        String spn = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, "empty");

        boolean mvnoRoaming = Settings.System.getInt(
                phone.getContext().getContentResolver(),
                Settings.System.BUTTON_MVNO_ROAMING_KEY, 0) == 1;

        String spn;

        if (!mvnoRoaming) {
            spn = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, "empty");
        } else {
            spn = SystemProperties.get(TelephonyProperties.PROPERTY_ICC_OPERATOR_ALPHA, "");
        }


        String onsl = s.getOperatorAlphaLong();
        String onsl = s.getOperatorAlphaLong();
        String onss = s.getOperatorAlphaShort();
        String onss = s.getOperatorAlphaShort();