summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/provider/Settings.java2
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java13
2 files changed, 14 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 8614862..cc5b515 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -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";
}
/**
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 50b8eba..9940fa8 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -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();