summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-06-07 04:05:35 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-07 04:05:35 -0700
commita4a48a484fe862787cf2fbe1314deab8ac375951 (patch)
treeeafe490eb4ce35414011e8082a64d9a762769bd2
parent4da7b10c45dfa86be5636444b2c3caebc462659c (diff)
parentbde61a5731cdfef76a0691f8bd53b880606f5f6e (diff)
downloadframeworks_base-a4a48a484fe862787cf2fbe1314deab8ac375951.zip
frameworks_base-a4a48a484fe862787cf2fbe1314deab8ac375951.tar.gz
frameworks_base-a4a48a484fe862787cf2fbe1314deab8ac375951.tar.bz2
Merge "Improve android.hardware.Camera.Area javadoc."
-rw-r--r--core/java/android/hardware/Camera.java56
-rw-r--r--include/camera/CameraParameters.h4
2 files changed, 36 insertions, 24 deletions
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index d5c4ace..dea5133 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -16,22 +16,22 @@
package android.hardware;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.io.IOException;
-
-import android.util.Log;
-import android.view.Surface;
-import android.view.SurfaceHolder;
import android.graphics.ImageFormat;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
+import android.util.Log;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+
+import java.io.IOException;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.StringTokenizer;
/**
* The Camera class is used to set image capture settings, start/stop preview,
@@ -834,8 +834,6 @@ public class Camera {
* @param raw the callback for raw (uncompressed) image data, or null
* @param postview callback with postview image data, may be null
* @param jpeg the callback for JPEG image data, or null
- *
- * @see #addRawImageCallbackBuffer(byte[])
*/
public final void takePicture(ShutterCallback shutter, PictureCallback raw,
PictureCallback postview, PictureCallback jpeg) {
@@ -1084,10 +1082,14 @@ public class Camera {
};
/**
- * Area class for focus.
- *
- * @see #setFocusAreas(List)
- * @see #getFocusAreas()
+ * Area class for focus and metering.
+ *
+ * @see Parameters#setFocusAreas(List)
+ * @see Parameters#getFocusAreas()
+ * @see Parameters#getMaxNumFocusAreas()
+ * @see Parameters#setMeteringAreas(List)
+ * @see Parameters#getMeteringAreas()
+ * @see Parameters#getMaxNumMeteringAreas()
*/
public static class Area {
/**
@@ -1121,12 +1123,22 @@ public class Camera {
return weight == a.weight;
}
- /** rectangle of the area */
+ /**
+ * Rectangle of the area.
+ *
+ * @see Parameters#getFocusAreas()
+ * @see Parameters#getMeteringAreas()
+ */
public Rect rect;
- /** weight of the area */
+ /**
+ * Weight of the area.
+ *
+ * @see Parameters#getFocusAreas()
+ * @see Parameters#getMeteringAreas()
+ */
public int weight;
- };
+ }
/**
* Camera service settings.
@@ -2775,7 +2787,7 @@ public class Camera {
* The direction is not affected by the rotation or mirroring of
* {@link #setDisplayOrientation(int)}. Coordinates of the rectangle
* range from -1000 to 1000. (-1000, -1000) is the upper left point.
- * (1000, 1000) is the lower right point. The length and width of focus
+ * (1000, 1000) is the lower right point. The width and height of focus
* areas cannot be 0 or negative.
*
* The weight must range from 1 to 1000. The weight should be
@@ -2842,7 +2854,7 @@ public class Camera {
* sensor sees. The direction is not affected by the rotation or
* mirroring of {@link #setDisplayOrientation(int)}. Coordinates of the
* rectangle range from -1000 to 1000. (-1000, -1000) is the upper left
- * point. (1000, 1000) is the lower right point. The length and width of
+ * point. (1000, 1000) is the lower right point. The width and height of
* metering areas cannot be 0 or negative.
*
* The weight must range from 1 to 1000, and represents a weight for
@@ -3033,7 +3045,7 @@ public class Camera {
if (result.size() == 0) return null;
if (result.size() == 1) {
- Area area = (Area) result.get(0);
+ Area area = result.get(0);
Rect rect = area.rect;
if (rect.left == 0 && rect.top == 0 && rect.right == 0
&& rect.bottom == 0 && area.weight == 0) {
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 7992861..83d4f6d 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -263,7 +263,7 @@ public:
// direction is not affected by the rotation or mirroring of
// CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
// (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
- // point. The length and width of focus areas cannot be 0 or negative.
+ // point. The width and height of focus areas cannot be 0 or negative.
//
// The fifth element is the weight. Values for weight must range from 1 to
// 1000. The weight should be interpreted as a per-pixel weight - all
@@ -373,7 +373,7 @@ public:
// direction is not affected by the rotation or mirroring of
// CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
// from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
- // is the lower right point. The length and width of metering areas cannot
+ // is the lower right point. The width and height of metering areas cannot
// be 0 or negative.
//
// The fifth element is the weight. Values for weight must range from 1 to