Add @SystemApi annotations to methods used by GmsCore.
-Currently these methods are called using reflection for location. Bug: 17371392 Change-Id: I6546f5b485415beff69164ba0d526757ee831f69
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.SystemApi;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
@@ -84,6 +85,7 @@ import android.util.TimeUtils;
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public final class LocationRequest implements Parcelable {
|
||||
/**
|
||||
* Used with {@link #setQuality} to request the most accurate locations available.
|
||||
@@ -166,6 +168,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public static LocationRequest createFromDeprecatedProvider(String provider, long minTime,
|
||||
float minDistance, boolean singleShot) {
|
||||
if (minTime < 0) minTime = 0;
|
||||
@@ -191,6 +194,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public static LocationRequest createFromDeprecatedCriteria(Criteria criteria, long minTime,
|
||||
float minDistance, boolean singleShot) {
|
||||
if (minTime < 0) minTime = 0;
|
||||
@@ -475,6 +479,7 @@ public final class LocationRequest implements Parcelable {
|
||||
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public LocationRequest setProvider(String provider) {
|
||||
checkProvider(provider);
|
||||
mProvider = provider;
|
||||
@@ -482,11 +487,13 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public String getProvider() {
|
||||
return mProvider;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public LocationRequest setSmallestDisplacement(float meters) {
|
||||
checkDisplacement(meters);
|
||||
mSmallestDisplacement = meters;
|
||||
@@ -494,6 +501,7 @@ public final class LocationRequest implements Parcelable {
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public float getSmallestDisplacement() {
|
||||
return mSmallestDisplacement;
|
||||
}
|
||||
@@ -508,11 +516,13 @@ public final class LocationRequest implements Parcelable {
|
||||
* @param workSource WorkSource defining power blame for this location request.
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setWorkSource(WorkSource workSource) {
|
||||
mWorkSource = workSource;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public WorkSource getWorkSource() {
|
||||
return mWorkSource;
|
||||
}
|
||||
@@ -531,11 +541,13 @@ public final class LocationRequest implements Parcelable {
|
||||
* @see android.app.AppOpsManager
|
||||
* @hide
|
||||
*/
|
||||
@SystemApi
|
||||
public void setHideFromAppOps(boolean hideFromAppOps) {
|
||||
mHideFromAppOps = hideFromAppOps;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
@SystemApi
|
||||
public boolean getHideFromAppOps() {
|
||||
return mHideFromAppOps;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user