Merge "Rename ZoneInfoDB -> ZoneInfoDb" am: 402674f2a0 am: c3e31d6ac5
Change-Id: Ib094f9f67112998c82642dd4f8688a75f8b8e0ee
This commit is contained in:
@@ -35,7 +35,7 @@ import android.util.ArrayMap;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.proto.ProtoOutputStream;
|
import android.util.proto.ProtoOutputStream;
|
||||||
|
|
||||||
import libcore.timezone.ZoneInfoDB;
|
import libcore.timezone.ZoneInfoDb;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
@@ -1000,7 +1000,7 @@ public class AlarmManager {
|
|||||||
if (mTargetSdkVersion >= Build.VERSION_CODES.M) {
|
if (mTargetSdkVersion >= Build.VERSION_CODES.M) {
|
||||||
boolean hasTimeZone = false;
|
boolean hasTimeZone = false;
|
||||||
try {
|
try {
|
||||||
hasTimeZone = ZoneInfoDB.getInstance().hasTimeZone(timeZone);
|
hasTimeZone = ZoneInfoDb.getInstance().hasTimeZone(timeZone);
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ package android.text.format;
|
|||||||
|
|
||||||
import android.util.TimeFormatException;
|
import android.util.TimeFormatException;
|
||||||
|
|
||||||
import libcore.timezone.ZoneInfoDB;
|
import libcore.timezone.ZoneInfoDb;
|
||||||
import libcore.util.ZoneInfo;
|
import libcore.util.ZoneInfo;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -1107,9 +1107,9 @@ public class Time {
|
|||||||
|
|
||||||
private static ZoneInfo lookupZoneInfo(String timezoneId) {
|
private static ZoneInfo lookupZoneInfo(String timezoneId) {
|
||||||
try {
|
try {
|
||||||
ZoneInfo zoneInfo = ZoneInfoDB.getInstance().makeTimeZone(timezoneId);
|
ZoneInfo zoneInfo = ZoneInfoDb.getInstance().makeTimeZone(timezoneId);
|
||||||
if (zoneInfo == null) {
|
if (zoneInfo == null) {
|
||||||
zoneInfo = ZoneInfoDB.getInstance().makeTimeZone("GMT");
|
zoneInfo = ZoneInfoDb.getInstance().makeTimeZone("GMT");
|
||||||
}
|
}
|
||||||
if (zoneInfo == null) {
|
if (zoneInfo == null) {
|
||||||
throw new AssertionError("GMT not found: \"" + timezoneId + "\"");
|
throw new AssertionError("GMT not found: \"" + timezoneId + "\"");
|
||||||
|
|||||||
@@ -43,16 +43,16 @@ public final class ZoneInfoDb {
|
|||||||
public static ZoneInfoDb getInstance() {
|
public static ZoneInfoDb getInstance() {
|
||||||
synchronized (sLock) {
|
synchronized (sLock) {
|
||||||
if (sInstance == null) {
|
if (sInstance == null) {
|
||||||
sInstance = new ZoneInfoDb(libcore.timezone.ZoneInfoDB.getInstance());
|
sInstance = new ZoneInfoDb(libcore.timezone.ZoneInfoDb.getInstance());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private final libcore.timezone.ZoneInfoDB mDelegate;
|
private final libcore.timezone.ZoneInfoDb mDelegate;
|
||||||
|
|
||||||
private ZoneInfoDb(libcore.timezone.ZoneInfoDB delegate) {
|
private ZoneInfoDb(libcore.timezone.ZoneInfoDb delegate) {
|
||||||
mDelegate = Objects.requireNonNull(delegate);
|
mDelegate = Objects.requireNonNull(delegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import android.os.SystemClock;
|
|||||||
import libcore.timezone.CountryTimeZones;
|
import libcore.timezone.CountryTimeZones;
|
||||||
import libcore.timezone.CountryTimeZones.TimeZoneMapping;
|
import libcore.timezone.CountryTimeZones.TimeZoneMapping;
|
||||||
import libcore.timezone.TimeZoneFinder;
|
import libcore.timezone.TimeZoneFinder;
|
||||||
import libcore.timezone.ZoneInfoDB;
|
import libcore.timezone.ZoneInfoDb;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -133,7 +133,7 @@ public class TimeUtils {
|
|||||||
* during the lifetime of an activity.
|
* during the lifetime of an activity.
|
||||||
*/
|
*/
|
||||||
public static String getTimeZoneDatabaseVersion() {
|
public static String getTimeZoneDatabaseVersion() {
|
||||||
return ZoneInfoDB.getInstance().getVersion();
|
return ZoneInfoDb.getInstance().getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide Field length that can hold 999 days of time */
|
/** @hide Field length that can hold 999 days of time */
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ import com.android.timezone.distro.installer.TimeZoneDistroInstaller;
|
|||||||
import libcore.timezone.TimeZoneDataFiles;
|
import libcore.timezone.TimeZoneDataFiles;
|
||||||
import libcore.timezone.TimeZoneFinder;
|
import libcore.timezone.TimeZoneFinder;
|
||||||
import libcore.timezone.TzDataSetVersion;
|
import libcore.timezone.TzDataSetVersion;
|
||||||
import libcore.timezone.ZoneInfoDB;
|
import libcore.timezone.ZoneInfoDb;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
@@ -518,9 +518,9 @@ public final class RulesManagerService extends IRulesManager.Stub {
|
|||||||
case 'a': {
|
case 'a': {
|
||||||
// Report the active rules version (i.e. the rules in use by the current
|
// Report the active rules version (i.e. the rules in use by the current
|
||||||
// process).
|
// process).
|
||||||
pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): "
|
pw.println("Active rules version (ICU, ZoneInfoDb, TimeZoneFinder): "
|
||||||
+ TimeZone.getTZDataVersion() + ","
|
+ TimeZone.getTZDataVersion() + ","
|
||||||
+ ZoneInfoDB.getInstance().getVersion() + ","
|
+ ZoneInfoDb.getInstance().getVersion() + ","
|
||||||
+ TimeZoneFinder.getInstance().getIanaVersion());
|
+ TimeZoneFinder.getInstance().getIanaVersion());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -536,7 +536,7 @@ public final class RulesManagerService extends IRulesManager.Stub {
|
|||||||
pw.println("RulesManagerService state: " + toString());
|
pw.println("RulesManagerService state: " + toString());
|
||||||
pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): "
|
pw.println("Active rules version (ICU, ZoneInfoDB, TimeZoneFinder): "
|
||||||
+ TimeZone.getTZDataVersion() + ","
|
+ TimeZone.getTZDataVersion() + ","
|
||||||
+ ZoneInfoDB.getInstance().getVersion() + ","
|
+ ZoneInfoDb.getInstance().getVersion() + ","
|
||||||
+ TimeZoneFinder.getInstance().getIanaVersion());
|
+ TimeZoneFinder.getInstance().getIanaVersion());
|
||||||
pw.println("Distro state: " + rulesState.toString());
|
pw.println("Distro state: " + rulesState.toString());
|
||||||
mPackageTracker.dump(pw);
|
mPackageTracker.dump(pw);
|
||||||
|
|||||||
Reference in New Issue
Block a user