summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2020-07-24 22:25:38 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-07-24 22:25:38 +0000
commit5c8a0bbc4ee71bbfd3cb84d93d6497599cfc0722 (patch)
treea774e8e20e4ca176b5d97da89289f729ba573c31
parentad662c89bee4785480488fc11f44ddfa2106164c (diff)
parent4f7fa277ab4ab84c35968ab34a4464602a674011 (diff)
Merge "Allow network stack UID caller to retrieve cell identity" into rvc-dev am: 855eb749ed am: 4f7fa277ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12226436 Change-Id: I681c8ea85626773c3d5cb74807d846a951b743ae
-rw-r--r--telephony/common/android/telephony/LocationAccessPolicy.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/telephony/common/android/telephony/LocationAccessPolicy.java b/telephony/common/android/telephony/LocationAccessPolicy.java
index 3048ad7c1fb0..1c7a700a96ef 100644
--- a/telephony/common/android/telephony/LocationAccessPolicy.java
+++ b/telephony/common/android/telephony/LocationAccessPolicy.java
@@ -260,11 +260,12 @@ public final class LocationAccessPolicy {
/** Check if location permissions have been granted */
public static LocationPermissionResult checkLocationPermission(
Context context, LocationPermissionQuery query) {
- // Always allow the phone process and system server to access location. This avoid
- // breaking legacy code that rely on public-facing APIs to access cell location, and
- // it doesn't create an info leak risk because the cell location is stored in the phone
+ // Always allow the phone process, system server, and network stack to access location.
+ // This avoid breaking legacy code that rely on public-facing APIs to access cell location,
+ // and it doesn't create an info leak risk because the cell location is stored in the phone
// process anyway, and the system server already has location access.
if (query.callingUid == Process.PHONE_UID || query.callingUid == Process.SYSTEM_UID
+ || query.callingUid == Process.NETWORK_STACK_UID
|| query.callingUid == Process.ROOT_UID) {
return LocationPermissionResult.ALLOWED;
}