summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2014-09-04 11:29:01 -0700
committerDavid Christie <dnchrist@google.com>2014-09-04 20:53:21 +0000
commitc20b795cf05b48fe5e024c19dab9c7e4b18cd10f (patch)
tree428ea0d77719c9f13acb134ee89e6488a2f3059c /location
parent833dcd4bea5cadccaa55f9a06942bb36d01d73ac (diff)
downloadframeworks_base-c20b795cf05b48fe5e024c19dab9c7e4b18cd10f.zip
frameworks_base-c20b795cf05b48fe5e024c19dab9c7e4b18cd10f.tar.gz
frameworks_base-c20b795cf05b48fe5e024c19dab9c7e4b18cd10f.tar.bz2
Add @SystemApi annotations to methods used by GmsCore.
-Currently these methods are called using reflection for location. Bug: 17371392 Change-Id: I6546f5b485415beff69164ba0d526757ee831f69
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/Location.java4
-rw-r--r--location/java/android/location/LocationRequest.java12
2 files changed, 16 insertions, 0 deletions
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index bdd1195..fcf222b 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -16,6 +16,7 @@
package android.location;
+import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -771,6 +772,7 @@ public class Location implements Parcelable {
* @see #makeComplete
* @hide
*/
+ @SystemApi
public boolean isComplete() {
if (mProvider == null) return false;
if (!mHasAccuracy) return false;
@@ -788,6 +790,7 @@ public class Location implements Parcelable {
* @see #isComplete
* @hide
*/
+ @SystemApi
public void makeComplete() {
if (mProvider == null) mProvider = "?";
if (!mHasAccuracy) {
@@ -957,6 +960,7 @@ public class Location implements Parcelable {
* @param isFromMockProvider true if this Location came from a mock provider, false otherwise
* @hide
*/
+ @SystemApi
public void setIsFromMockProvider(boolean isFromMockProvider) {
mIsFromMockProvider = isFromMockProvider;
}
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index c9162fe..271f2bb 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -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;
}