Loading api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4171,7 +4171,7 @@ package android.location { method @Deprecated @NonNull public String getProvider(); method public int getQuality(); method @Deprecated public float getSmallestDisplacement(); method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1729,7 +1729,7 @@ package android.location { } public final class LocationRequest implements android.os.Parcelable { method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading location/java/android/location/LocationManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,16 @@ import java.util.function.Consumer; @RequiresFeature(PackageManager.FEATURE_LOCATION) public class LocationManager { /** * For apps targeting Android S and above, LocationRequest system APIs may not be used with * PendingIntent location requests. * * @hide */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.R) public static final long PREVENT_PENDING_INTENT_SYSTEM_API_USAGE = 169887240L; /** * For apps targeting Android S and above, location clients may receive historical locations * (from before the present time) under some circumstances. Loading location/java/android/location/LocationRequest.java +12 −9 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public final class LocationRequest implements Parcelable { boolean hiddenFromAppOps, boolean locationSettingsIgnored, boolean lowPower, @Nullable WorkSource workSource) { WorkSource workSource) { Preconditions.checkArgument(intervalMillis != PASSIVE_INTERVAL || quality == POWER_NONE); Preconditions.checkArgument(minUpdateIntervalMillis <= intervalMillis); Loading @@ -265,7 +265,7 @@ public final class LocationRequest implements Parcelable { mHideFromAppOps = hiddenFromAppOps; mLowPower = lowPower; mLocationSettingsIgnored = locationSettingsIgnored; mWorkSource = workSource; mWorkSource = Objects.requireNonNull(workSource); } /** Loading Loading @@ -645,12 +645,15 @@ public final class LocationRequest implements Parcelable { @SystemApi @Deprecated public void setWorkSource(@Nullable WorkSource workSource) { if (workSource == null) { workSource = new WorkSource(); } mWorkSource = workSource; } /** * Returns the work source used for power blame for this request. If null, the system is free to * assign power blame as it deems most appropriate. * Returns the work source used for power blame for this request. If empty, the system is free * to assign power blame as it deems most appropriate. * * @return the work source used for power blame for this request * Loading @@ -658,7 +661,7 @@ public final class LocationRequest implements Parcelable { */ @TestApi @SystemApi public @Nullable WorkSource getWorkSource() { public @NonNull WorkSource getWorkSource() { return mWorkSource; } Loading Loading @@ -1062,9 +1065,9 @@ public final class LocationRequest implements Parcelable { } /** * Sets the work source to use for power blame for this location request. Defaults to null, * which implies the system is free to assign power blame as it determines best for this * request (which usually means blaming the owner of the location listener). * Sets the work source to use for power blame for this location request. Defaults to an * empty WorkSource, which implies the system is free to assign power blame as it determines * best for this request (which usually means blaming the owner of the location listener). * * <p>Permissions enforcement occurs when resulting location request is actually used, not * when this method is invoked. Loading Loading @@ -1108,7 +1111,7 @@ public final class LocationRequest implements Parcelable { mHiddenFromAppOps, mLocationSettingsIgnored, mLowPower, mWorkSource); new WorkSource(mWorkSource)); } } } non-updatable-api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4111,7 +4111,7 @@ package android.location { method @Deprecated @NonNull public String getProvider(); method public int getQuality(); method @Deprecated public float getSmallestDisplacement(); method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading Loading
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4171,7 +4171,7 @@ package android.location { method @Deprecated @NonNull public String getProvider(); method public int getQuality(); method @Deprecated public float getSmallestDisplacement(); method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading
api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -1729,7 +1729,7 @@ package android.location { } public final class LocationRequest implements android.os.Parcelable { method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading
location/java/android/location/LocationManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,16 @@ import java.util.function.Consumer; @RequiresFeature(PackageManager.FEATURE_LOCATION) public class LocationManager { /** * For apps targeting Android S and above, LocationRequest system APIs may not be used with * PendingIntent location requests. * * @hide */ @ChangeId @EnabledAfter(targetSdkVersion = Build.VERSION_CODES.R) public static final long PREVENT_PENDING_INTENT_SYSTEM_API_USAGE = 169887240L; /** * For apps targeting Android S and above, location clients may receive historical locations * (from before the present time) under some circumstances. Loading
location/java/android/location/LocationRequest.java +12 −9 Original line number Diff line number Diff line Loading @@ -250,7 +250,7 @@ public final class LocationRequest implements Parcelable { boolean hiddenFromAppOps, boolean locationSettingsIgnored, boolean lowPower, @Nullable WorkSource workSource) { WorkSource workSource) { Preconditions.checkArgument(intervalMillis != PASSIVE_INTERVAL || quality == POWER_NONE); Preconditions.checkArgument(minUpdateIntervalMillis <= intervalMillis); Loading @@ -265,7 +265,7 @@ public final class LocationRequest implements Parcelable { mHideFromAppOps = hiddenFromAppOps; mLowPower = lowPower; mLocationSettingsIgnored = locationSettingsIgnored; mWorkSource = workSource; mWorkSource = Objects.requireNonNull(workSource); } /** Loading Loading @@ -645,12 +645,15 @@ public final class LocationRequest implements Parcelable { @SystemApi @Deprecated public void setWorkSource(@Nullable WorkSource workSource) { if (workSource == null) { workSource = new WorkSource(); } mWorkSource = workSource; } /** * Returns the work source used for power blame for this request. If null, the system is free to * assign power blame as it deems most appropriate. * Returns the work source used for power blame for this request. If empty, the system is free * to assign power blame as it deems most appropriate. * * @return the work source used for power blame for this request * Loading @@ -658,7 +661,7 @@ public final class LocationRequest implements Parcelable { */ @TestApi @SystemApi public @Nullable WorkSource getWorkSource() { public @NonNull WorkSource getWorkSource() { return mWorkSource; } Loading Loading @@ -1062,9 +1065,9 @@ public final class LocationRequest implements Parcelable { } /** * Sets the work source to use for power blame for this location request. Defaults to null, * which implies the system is free to assign power blame as it determines best for this * request (which usually means blaming the owner of the location listener). * Sets the work source to use for power blame for this location request. Defaults to an * empty WorkSource, which implies the system is free to assign power blame as it determines * best for this request (which usually means blaming the owner of the location listener). * * <p>Permissions enforcement occurs when resulting location request is actually used, not * when this method is invoked. Loading Loading @@ -1108,7 +1111,7 @@ public final class LocationRequest implements Parcelable { mHiddenFromAppOps, mLocationSettingsIgnored, mLowPower, mWorkSource); new WorkSource(mWorkSource)); } } }
non-updatable-api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4111,7 +4111,7 @@ package android.location { method @Deprecated @NonNull public String getProvider(); method public int getQuality(); method @Deprecated public float getSmallestDisplacement(); method @Nullable public android.os.WorkSource getWorkSource(); method @NonNull public android.os.WorkSource getWorkSource(); method public boolean isHiddenFromAppOps(); method public boolean isLocationSettingsIgnored(); method public boolean isLowPower(); Loading