Merge "Merge "Allow network stack UID caller to retrieve cell identity" into rvc-dev am: 855eb749ed am: 4f7fa277ab am: b8b8f1323b" into rvc-qpr-dev-plus-aosp am: f31ee636c9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12226436

Change-Id: I6e8c3a67a6356ea179abd45e49b2725813cbdbdd
This commit is contained in:
Automerger Merge Worker
2020-07-24 22:49:16 +00:00

View File

@@ -306,11 +306,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;
}