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

Commit 42092d70 authored by Ruben Brunk's avatar Ruben Brunk Committed by Android (Google) Code Review
Browse files

Merge "DO NOT MERGE: camera2: Disallow connectDevice for all old HALs." into lmp-preview-dev

parents 3416f9ac 8129e799
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -852,13 +852,12 @@ status_t CameraService::connectDevice(

        switch(deviceVersion) {
          case CAMERA_DEVICE_API_VERSION_1_0:
            ALOGW("Camera using old HAL version: %d", deviceVersion);
            return -EOPNOTSUPP;
           // TODO: don't allow 2.0  Only allow 2.1 and higher
          case CAMERA_DEVICE_API_VERSION_2_0:
          case CAMERA_DEVICE_API_VERSION_2_1:
          case CAMERA_DEVICE_API_VERSION_3_0:
          case CAMERA_DEVICE_API_VERSION_3_1:
            ALOGW("Camera using old HAL version: %d", deviceVersion);
            return -EOPNOTSUPP;
          case CAMERA_DEVICE_API_VERSION_3_2:
            client = new CameraDeviceClient(this, cameraCb, String16(),
                    cameraId, facing, callingPid, USE_CALLING_UID, getpid());