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

Commit 6eb16d47 authored by Avichal Rakesh's avatar Avichal Rakesh Committed by Android (Google) Code Review
Browse files

Merge changes from topic "camera_device_setup" into main

* changes:
  cameraservice: remove unnecessary permission checks
  camera: Add flag for CameraDeviceSetup
parents 7862c6c6 d82a71e1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -105,3 +105,10 @@ flag {
     description: "Enable returning graphics buffers to buffer queues without holding the in-flight mutex"
     bug: "315526878"
}

flag {
     namespace: "camera_platform"
     name: "camera_device_setup"
     description: "Create an intermediate Camera Device class for limited CameraDevice access."
     bug: "320741775"
}
+0 −14
Original line number Diff line number Diff line
@@ -906,13 +906,6 @@ Status CameraService::createDefaultRequest(const std::string& unresolvedCameraId
                "request for system only device %s: ", cameraId.c_str());
    }

    // Check for camera permissions
    if (!hasCameraPermissions()) {
        return STATUS_ERROR(ERROR_PERMISSION_DENIED,
                "android.permission.CAMERA needed to call"
                "createDefaultRequest");
    }

    CameraMetadata metadata;
    status_t err = mCameraProviderManager->createDefaultRequest(cameraId, tempId, &metadata);
    if (err == OK) {
@@ -961,13 +954,6 @@ Status CameraService::isSessionConfigurationWithParametersSupported(
                cameraId.c_str());
    }

    // Check for camera permissions
    if (!hasCameraPermissions()) {
        return STATUS_ERROR(ERROR_PERMISSION_DENIED,
                "android.permission.CAMERA needed to call"
                "isSessionConfigurationWithParametersSupported");
    }

    *supported = false;
    status_t ret = mCameraProviderManager->isSessionConfigurationSupported(cameraId.c_str(),
            sessionConfiguration, /*mOverrideForPerfClass*/false, /*checkSessionParams*/true,