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

Commit 8de1277b authored by Neil Fuller's avatar Neil Fuller Committed by Gerrit Code Review
Browse files

Merge "Remove uninitialized tz path from MccTable"

parents e1f3701d 8d2eaef4
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.
     *