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

Commit 0b094277 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

DO NOT MERGE: Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
parent 0431f4ad
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -444,6 +444,12 @@ status_t CameraService::getCameraInfo(int cameraId,
        mModule->getCameraInfo(cameraId, &info));
    cameraInfo->facing = info.facing;
    cameraInfo->orientation = info.orientation;
    // 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;
    }
    return rc;
}