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

Commit 9b5a6e9a authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
parent 4178befd
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -463,6 +463,12 @@ Status CameraService::getCameraInfo(int cameraId,
    if (rc.isOk()) {
        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;
}