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

Commit 3048314d authored by Neil Fuller's avatar Neil Fuller Committed by android-build-merger
Browse files

Merge "Remove uninitialized tz path from MccTable"

am: 8de1277b

Change-Id: Ie374aeadcfc44ce25746a27030c5607d0a2e0217
parents 019ae25d 8de1277b
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -200,9 +200,6 @@ public final class MccTable {
            }

            Slog.d(LOG_TAG, "updateMccMncConfiguration: mcc=" + mcc + ", mnc=" + mnc);
            if (mcc != 0) {
                setTimezoneFromMccIfNeeded(context, mcc);
            }

            try {
                Configuration config = new Configuration();
@@ -351,22 +348,6 @@ public final class MccTable {
        return null;
    }

    /**
     * If the timezone is not already set, set it based on the MCC of the SIM.
     * @param context Context to act on.
     * @param mcc Mobile Country Code of the SIM or SIM-like entity (build prop on CDMA)
     */
    private static void setTimezoneFromMccIfNeeded(Context context, int mcc) {
        if (!TimeServiceHelperImpl.isTimeZoneSettingInitializedStatic()) {
            String zoneId = defaultTimeZoneForMcc(mcc);
            if (zoneId != null && zoneId.length() > 0) {
                // Set time zone based on MCC
                TimeServiceHelperImpl.setDeviceTimeZoneStatic(context, zoneId);
                Slog.d(LOG_TAG, "timezone set to " + zoneId);
            }
        }
    }

    /**
     * Get Locale based on the MCC of the SIM.
     *