summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
index 63e4d97..8dc7573 100644
--- a/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
+++ b/src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
@@ -1422,8 +1422,17 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
if (nitzSubs.length >= 9) {
String tzname = nitzSubs[8].replace('!','/');
zone = TimeZone.getTimeZone( tzname );
+ // From luni's getTimeZone() "We never return null; on failure we return the
+ // equivalent of "GMT"." This is bad, since it'll force all invalid strings
+ // to "GMT"... and all the null-zone checks below will fail, making tzOffset
+ // irrelevant and GMT the active TZ. So tzOffset will take precedence if this
+ // results in "GMT"
+ if (TimeZone.getTimeZone("GMT").equals(zone) && tzOffset != 0) {
+ zone = null;
+ }
}
+
String iso = SystemProperties.get(TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY);
if (zone == null) {