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

Commit 379254d5 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by android-build-merger
Browse files

Merge "Camera: fix camera facing override logic" am: 853f568b

am: f02844c4

Change-Id: I0f136beed5de56795e20b14bbe2e64c4290d0e99
parents fc707ea9 f02844c4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -470,8 +470,8 @@ Status CameraService::getCameraInfo(int cameraId,
        // CameraInfo is for android.hardware.Camera which does not
        // support external camera facing. The closest approximation would be
        // front camera.
        if (cameraInfo->orientation == CAMERA_FACING_EXTERNAL) {
            cameraInfo->orientation = CAMERA_FACING_FRONT;
        if (cameraInfo->facing == CAMERA_FACING_EXTERNAL) {
            cameraInfo->facing = CAMERA_FACING_FRONT;
        }
    }
    return rc;
@@ -2556,7 +2556,8 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) {
                write(fd, result.string(), result.size());
            } else {
                result.appendFormat("  Facing: %s\n",
                        info.facing == CAMERA_FACING_BACK ? "BACK" : "FRONT");
                        info.facing == CAMERA_FACING_BACK ? "BACK" :
                                info.facing == CAMERA_FACING_FRONT ? "FRONT" : "EXTERNAL");
                result.appendFormat("  Orientation: %d\n", info.orientation);
                int deviceVersion;
                if (mModule->getModuleApiVersion() < CAMERA_MODULE_API_VERSION_2_0) {