diff options
| -rw-r--r-- | core/java/android/hardware/Camera.java | 11 | ||||
| -rw-r--r-- | core/jni/android_hardware_Camera.cpp | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 931b5c913851..f08e1cc24b26 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -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)); diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp index d6f8dc45560c..61d5031e16ed 100644 --- a/core/jni/android_hardware_Camera.cpp +++ b/core/jni/android_hardware_Camera.cpp @@ -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; |