summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2013-08-16 23:37:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-08-16 23:37:48 +0000
commit0ef054b5f15b2486e2bc002cfc7b9af6dc8c2d2b (patch)
treed5c06d7d3e08841154c673a8385ceed1678dc109
parent0c5b96b1cd6c0d7523e0653682a146dfbc9ad659 (diff)
parent3e32bdd41832d383b03f928cfd2341b9693dc78b (diff)
downloadframeworks_base-0ef054b5f15b2486e2bc002cfc7b9af6dc8c2d2b.zip
frameworks_base-0ef054b5f15b2486e2bc002cfc7b9af6dc8c2d2b.tar.gz
frameworks_base-0ef054b5f15b2486e2bc002cfc7b9af6dc8c2d2b.tar.bz2
Merge "Add comments to new hidden API in LocationRequest. Document their purpose and permissions required in case this is unhidden in a different code line." into klp-dev
-rw-r--r--location/java/android/location/LocationRequest.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index 507baeb..c9162fe 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -498,7 +498,16 @@ public final class LocationRequest implements Parcelable {
return mSmallestDisplacement;
}
- /** @hide */
+ /**
+ * Sets the WorkSource to use for power blaming of this location request.
+ *
+ * <p>No permissions are required to make this call, however the LocationManager
+ * will throw a SecurityException when requesting location updates if the caller
+ * doesn't have the {@link android.Manifest.permission#UPDATE_DEVICE_STATS} permission.
+ *
+ * @param workSource WorkSource defining power blame for this location request.
+ * @hide
+ */
public void setWorkSource(WorkSource workSource) {
mWorkSource = workSource;
}
@@ -508,7 +517,20 @@ public final class LocationRequest implements Parcelable {
return mWorkSource;
}
- /** @hide */
+ /**
+ * Sets whether or not this location request should be hidden from AppOps.
+ *
+ * <p>Hiding a location request from AppOps will remove user visibility in the UI as to this
+ * request's existence. It does not affect power blaming in the Battery page.
+ *
+ * <p>No permissions are required to make this call, however the LocationManager
+ * will throw a SecurityException when requesting location updates if the caller
+ * doesn't have the {@link android.Manifest.permission#UPDATE_APP_OPS_STATS} permission.
+ *
+ * @param hideFromAppOps If true AppOps won't keep track of this location request.
+ * @see android.app.AppOpsManager
+ * @hide
+ */
public void setHideFromAppOps(boolean hideFromAppOps) {
mHideFromAppOps = hideFromAppOps;
}