Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f31ee636 authored by Automerger Merge Worker's avatar Automerger Merge Worker Committed by Android (Google) Code Review
Browse files

Merge "Merge "Allow network stack UID caller to retrieve cell identity" into...

Merge "Merge "Allow network stack UID caller to retrieve cell identity" into rvc-dev am: 855eb749 am: 4f7fa277 am: b8b8f132" into rvc-qpr-dev-plus-aosp
parents 3cb2fc00 b90e9d8a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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;
        }