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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -43,6 +43,24 @@ public final class LocationTimeZoneProviderRequestUnbundled {
|
||||
return mRequest.getReportLocationTimeZone();
|
||||
}
|
||||
|
||||
@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();
|
||||
|
||||
Reference in New Issue
Block a user