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

Commit 564ae822 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

Camera: update API for external camera

Bug: 72261912
Change-Id: I27fa6f9afcac22c44b8705e17228e1894e2e578f
parent 250dfda1
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -242,6 +242,9 @@ public class Camera {

    /**
     * Returns the number of physical cameras available on this device.
     * The return value of this method might change dynamically if the device
     * supports external cameras and an external camera is connected or
     * disconnected.
     *
     * @return total number of accessible camera devices, or 0 if there are no
     *   cameras or an error was encountered enumerating them.
@@ -3542,8 +3545,8 @@ public class Camera {
        /**
         * Gets the horizontal angle of view in degrees.
         *
         * @return horizontal angle of view. This method will always return a
         *         valid value.
         * @return horizontal angle of view. Returns -1.0 when the device
         *         doesn't report view angle information.
         */
        public float getHorizontalViewAngle() {
            return Float.parseFloat(get(KEY_HORIZONTAL_VIEW_ANGLE));
@@ -3552,8 +3555,8 @@ public class Camera {
        /**
         * Gets the vertical angle of view in degrees.
         *
         * @return vertical angle of view. This method will always return a
         *         valid value.
         * @return vertical angle of view. Returns -1.0 when the device
         *         doesn't report view angle information.
         */
        public float getVerticalViewAngle() {
            return Float.parseFloat(get(KEY_VERTICAL_VIEW_ANGLE));
+1 −0
Original line number Diff line number Diff line
@@ -604,6 +604,7 @@ static jint android_hardware_Camera_native_setup(JNIEnv *env, jobject thiz,
    CameraInfo cameraInfo;
    status_t rc = Camera::getCameraInfo(cameraId, &cameraInfo);
    if (rc != NO_ERROR) {
        ALOGE("%s: getCameraInfo error: %d", __FUNCTION__, rc);
        return rc;
    }
    int defaultOrientation = 0;