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

Commit 456a44c3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8372459 from 56becd9a to tm-release

Change-Id: I687788d827db1ff0210261e21dd403ab7206e54f
parents ac6ebd17 56becd9a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2030,7 +2030,9 @@ bool SensorService::hasPermissionForSensor(const Sensor& sensor) {
    // Runtime permissions can't use the cache as they may change.
    if (sensor.isRequiredPermissionRuntime()) {
        hasPermission = checkPermission(String16(requiredPermission),
                IPCThreadState::self()->getCallingPid(), IPCThreadState::self()->getCallingUid());
                IPCThreadState::self()->getCallingPid(),
                IPCThreadState::self()->getCallingUid(),
                /*logPermissionFailure=*/ false);
    } else {
        hasPermission = PermissionCache::checkCallingPermission(String16(requiredPermission));
    }
@@ -2211,7 +2213,8 @@ bool SensorService::isRateCappedBasedOnPermission(const String16& opPackageName)
    int targetSdk = getTargetSdkVersion(opPackageName);
    bool hasSamplingRatePermission = checkPermission(sAccessHighSensorSamplingRatePermission,
            IPCThreadState::self()->getCallingPid(),
            IPCThreadState::self()->getCallingUid());
            IPCThreadState::self()->getCallingUid(),
            /*logPermissionFailure=*/ false);
    if (targetSdk < __ANDROID_API_S__ ||
            (targetSdk >= __ANDROID_API_S__ && hasSamplingRatePermission)) {
        return false;