diff options
| author | 2019-02-06 15:57:26 -0800 | |
|---|---|---|
| committer | 2019-02-13 13:34:45 -0800 | |
| commit | 509580fbdfdbd6b1a129bd348d40f56b43a5a0f1 (patch) | |
| tree | 8faba9fd22f8b711c1932fecc9a5fdaf95533b41 /location/java/com | |
| parent | d56355755b17db8a3c4ca58552747456671e32cc (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/java/com')
| -rw-r--r-- | location/java/com/android/internal/location/ProviderRequest.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/location/java/com/android/internal/location/ProviderRequest.java b/location/java/com/android/internal/location/ProviderRequest.java index a45c20d9d09d..af8123ac52f4 100644 --- a/location/java/com/android/internal/location/ProviderRequest.java +++ b/location/java/com/android/internal/location/ProviderRequest.java @@ -40,7 +40,7 @@ public final class ProviderRequest implements Parcelable { * restrictions or any other restricting factors and always satisfy this request to the best of * their ability. This flag should only be used in event of an emergency. */ - public boolean forceLocation = false; + public boolean locationSettingsIgnored = false; /** * Whether provider shall make stronger than normal tradeoffs to substantially restrict power @@ -70,6 +70,7 @@ public final class ProviderRequest implements Parcelable { request.reportLocation = in.readInt() == 1; request.interval = in.readLong(); request.lowPowerMode = in.readBoolean(); + request.locationSettingsIgnored = in.readBoolean(); int count = in.readInt(); for (int i = 0; i < count; i++) { request.locationRequests.add(LocationRequest.CREATOR.createFromParcel(in)); @@ -93,6 +94,7 @@ public final class ProviderRequest implements Parcelable { parcel.writeInt(reportLocation ? 1 : 0); parcel.writeLong(interval); parcel.writeBoolean(lowPowerMode); + parcel.writeBoolean(locationSettingsIgnored); parcel.writeInt(locationRequests.size()); for (LocationRequest request : locationRequests) { request.writeToParcel(parcel, flags); @@ -107,7 +109,12 @@ public final class ProviderRequest implements Parcelable { s.append("ON"); s.append(" interval="); TimeUtils.formatDuration(interval, s); - s.append(" lowPowerMode=" + lowPowerMode); + if (lowPowerMode) { + s.append(" lowPowerMode"); + } + if (locationSettingsIgnored) { + s.append(" locationSettingsIgnored"); + } } else { s.append("OFF"); } |