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

Commit 305bf62f authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "Add option for MVNO roaming fix. Making commit...

Merge "Add option for MVNO roaming fix. Making commit bc097e94 switchable." into froyo
parents 327cc8f4 470879c2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2671,6 +2671,8 @@ public final class Settings {
        @Deprecated
        public static final String 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 Diff line number Diff line
@@ -1286,7 +1286,18 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
     * @return true for roaming state set
     */
    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 onss = s.getOperatorAlphaShort();