diff options
| author | 2020-08-12 17:46:47 +0100 | |
|---|---|---|
| committer | 2020-08-20 08:52:41 +0000 | |
| commit | 376a91befa178332c08b37ce0b4e4dbd7351bb6f (patch) | |
| tree | b5802f0a3bda86bef9010dbd86569bae7dc57c54 /location/lib/java | |
| parent | e076ada0c70254123f37e2b34c61f528920c90cf (diff) | |
Basic changes to the LocationTimeZoneProvider API
These changes have been broken out as they stand alone and should be
relatively uncontroversial.
The LocationTimeZoneEvent is having UserHandle added, mostly for
logging at this point so we can debug issues with multi-user providers.
Bug: 152744911
Bug: 149014708
Test: atest services/tests/servicestests/src/android/location/timezone/LocationTimeZoneEventTest.java
Change-Id: Iafbd5bc9778d68bc9c3046244e7dca6d9892519e
Diffstat (limited to 'location/lib/java')
2 files changed, 19 insertions, 1 deletions
diff --git a/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderBase.java b/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderBase.java index 0143c88e0898..c533c20d07e3 100644 --- a/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderBase.java +++ b/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderBase.java @@ -32,7 +32,7 @@ import java.util.Objects; /** * Base class for location time zone providers implemented as unbundled services. * - * TODO Provide details of the expected service actions. + * TODO(b/152744911): Provide details of the expected service actions and threading. * * <p>IMPORTANT: This class is effectively a public API for unbundled applications, and must remain * API stable. diff --git a/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderRequestUnbundled.java b/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderRequestUnbundled.java index dd80466637e6..e898bbf3ecc0 100644 --- a/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderRequestUnbundled.java +++ b/location/lib/java/com/android/location/timezone/provider/LocationTimeZoneProviderRequestUnbundled.java @@ -44,6 +44,24 @@ public final class LocationTimeZoneProviderRequestUnbundled { } @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LocationTimeZoneProviderRequestUnbundled that = + (LocationTimeZoneProviderRequestUnbundled) o; + return mRequest.equals(that.mRequest); + } + + @Override + public int hashCode() { + return Objects.hash(mRequest); + } + + @Override public String toString() { return mRequest.toString(); } |