summaryrefslogtreecommitdiffstats
path: root/location/java
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-10-16 16:08:48 -0700
committerVictoria Lease <violets@google.com>2012-10-18 09:13:39 -0700
commit37425c3475877f2fdadb78f669ec57fecf82dca7 (patch)
tree73b33ba2de97ecbb1505d6568f6d329424cbac26 /location/java
parenta4c356cad7de0ef30faeaeadacd21b6eae913541 (diff)
downloadframeworks_base-37425c3475877f2fdadb78f669ec57fecf82dca7.zip
frameworks_base-37425c3475877f2fdadb78f669ec57fecf82dca7.tar.gz
frameworks_base-37425c3475877f2fdadb78f669ec57fecf82dca7.tar.bz2
LocationManager permissions cleanup
This commit is the result of a comprehensive permissions review for MR1 release. It addresses a number of deviations from spec and from MR0's behavior, bringing MR1 into sync with both. It also cleans up the concept of "location resolution permission", representing it internally as an enumerated access level to reduce reliance on cumbersome string manipulation. There's a function to convert the enum int into a permission string where needed, too. Additionally, this confines caller-identity-sensitive calls to the hopefully-obviously-named "getCallerAllowedResolutionLevel()". This should make it much easier to prove correctness with respect to accidentally calling functions that depend upon the caller's identity after identity has already been shed by Binder.clearCallingIdentity(). Change-Id: I446169aee8fb2fde26ac6d04b479b40253782acb
Diffstat (limited to 'location/java')
-rw-r--r--location/java/android/location/LocationRequest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/location/java/android/location/LocationRequest.java b/location/java/android/location/LocationRequest.java
index cb291ea..6871ee2 100644
--- a/location/java/android/location/LocationRequest.java
+++ b/location/java/android/location/LocationRequest.java
@@ -221,6 +221,18 @@ public final class LocationRequest implements Parcelable {
/** @hide */
public LocationRequest() { }
+ /** @hide */
+ public LocationRequest(LocationRequest src) {
+ mQuality = src.mQuality;
+ mInterval = src.mInterval;
+ mFastestInterval = src.mFastestInterval;
+ mExplicitFastestInterval = src.mExplicitFastestInterval;
+ mExpireAt = src.mExpireAt;
+ mNumUpdates = src.mNumUpdates;
+ mSmallestDisplacement = src.mSmallestDisplacement;
+ mProvider = src.mProvider;
+ }
+
/**
* Set the quality of the request.
*