summaryrefslogtreecommitdiff
path: root/location/lib/java
diff options
context:
space:
mode:
authorSoonil Nagarkar <sooniln@google.com>2019-02-06 15:57:26 -0800
committerSoonil Nagarkar <sooniln@google.com>2019-02-13 13:34:45 -0800
commit509580fbdfdbd6b1a129bd348d40f56b43a5a0f1 (patch)
tree8faba9fd22f8b711c1932fecc9a5fdaf95533b41 /location/lib/java
parentd56355755b17db8a3c4ca58552747456671e32cc (diff)
Refactor API naming and add unbundled support
Rename APIs while there are no clients. Also prevent throttling when location settings are being ignored. Bug: 118883513 Test: manual Change-Id: I225c50b152e77ab181c959ecd9dc652333f59d5e
Diffstat (limited to 'location/lib/java')
-rw-r--r--location/lib/java/com/android/location/provider/LocationRequestUnbundled.java9
-rw-r--r--location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java6
2 files changed, 12 insertions, 3 deletions
diff --git a/location/lib/java/com/android/location/provider/LocationRequestUnbundled.java b/location/lib/java/com/android/location/provider/LocationRequestUnbundled.java
index 41fd769b5abd..2511c39caf5c 100644
--- a/location/lib/java/com/android/location/provider/LocationRequestUnbundled.java
+++ b/location/lib/java/com/android/location/provider/LocationRequestUnbundled.java
@@ -121,6 +121,15 @@ public final class LocationRequestUnbundled {
return delegate.getSmallestDisplacement();
}
+ /**
+ * Returns true if location settings will be ignored in order to satisfy this request.
+ *
+ * @return true if location settings will be ignored in order to satisfy this request
+ */
+ public boolean isLocationSettingsIgnored() {
+ return delegate.isLocationSettingsIgnored();
+ }
+
@Override
public String toString() {
return delegate.toString();
diff --git a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
index b825b58cd3e9..febbf1b23e0c 100644
--- a/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
+++ b/location/lib/java/com/android/location/provider/ProviderRequestUnbundled.java
@@ -46,15 +46,15 @@ public final class ProviderRequestUnbundled {
return mRequest.interval;
}
- public boolean getForceLocation() {
- return mRequest.forceLocation;
+ public boolean isLocationSettingsIgnored() {
+ return mRequest.locationSettingsIgnored;
}
/**
* Never null.
*/
public List<LocationRequestUnbundled> getLocationRequests() {
- List<LocationRequestUnbundled> result = new ArrayList<LocationRequestUnbundled>(
+ List<LocationRequestUnbundled> result = new ArrayList<>(
mRequest.locationRequests.size());
for (LocationRequest r : mRequest.locationRequests) {
result.add(new LocationRequestUnbundled(r));