From 7c552b378614574c518c95ba9afde7d01d10ec21 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Sat, 29 Aug 2020 18:52:51 +0100 Subject: Small fixes to basic classes and refactorings Small fixes to basic classes and refactorings noticed while preparing a later change. These changes are fairly "obvious" fixes and refactorings, removed from the later change to make it smaller. Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/ Bug: 149014708 Change-Id: If9bcb567778d82f49b3481c50a64c0d739ce2ace --- .../java/android/location/timezone/LocationTimeZoneEvent.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'location/java') diff --git a/location/java/android/location/timezone/LocationTimeZoneEvent.java b/location/java/android/location/timezone/LocationTimeZoneEvent.java index 540bdfffe16a..55bc507964e6 100644 --- a/location/java/android/location/timezone/LocationTimeZoneEvent.java +++ b/location/java/android/location/timezone/LocationTimeZoneEvent.java @@ -35,7 +35,8 @@ import java.util.Objects; */ public final class LocationTimeZoneEvent implements Parcelable { - @IntDef({ EVENT_TYPE_UNKNOWN, EVENT_TYPE_SUCCESS, EVENT_TYPE_SUCCESS }) + @IntDef({ EVENT_TYPE_UNKNOWN, EVENT_TYPE_PERMANENT_FAILURE, EVENT_TYPE_SUCCESS, + EVENT_TYPE_UNCERTAIN }) @interface EventType {} /** Uninitialized value for {@link #mEventType} - must not be used for real events. */ @@ -43,7 +44,7 @@ public final class LocationTimeZoneEvent implements Parcelable { /** * Indicates there was a permanent failure. This is not generally expected, and probably means a - * required backend service is no longer supported / available. + * required backend service has been turned down, or the client is unreasonably old. */ public static final int EVENT_TYPE_PERMANENT_FAILURE = 1; @@ -54,8 +55,9 @@ public final class LocationTimeZoneEvent implements Parcelable { public static final int EVENT_TYPE_SUCCESS = 2; /** - * Indicates the time zone is not known because there was a (temporary) error, e.g. when - * detecting location, or when resolving the location to a time zone. + * Indicates the time zone is not known because of an expected runtime state or error, e.g. when + * the provider is unable to detect location, or there was a problem when resolving the location + * to a time zone. */ public static final int EVENT_TYPE_UNCERTAIN = 3; -- cgit v1.2.3-59-g8ed1b