summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-09-10 12:15:54 -0700
committerIgor Murashkin <iam@google.com>2013-09-21 21:01:32 -0700
commit68f40066c914aefc1f88819dd46dd1135fb9f5bc (patch)
treeeeb786c7f3ecae6d0179cdfa521ba2b92fe157b6 /core/java/android/hardware
parentca833c389b3cc2f95f27fe7782d0bebb8b36d660 (diff)
downloadframeworks_base-68f40066c914aefc1f88819dd46dd1135fb9f5bc.zip
frameworks_base-68f40066c914aefc1f88819dd46dd1135fb9f5bc.tar.gz
frameworks_base-68f40066c914aefc1f88819dd46dd1135fb9f5bc.tar.bz2
camera2: Rename CameraProperties to CameraCharacteristics
Bug: 10360518 Change-Id: I8667bdcc8c9528ace96dc675585f923004932641
Diffstat (limited to 'core/java/android/hardware')
-rw-r--r--core/java/android/hardware/camera2/CameraCharacteristics.java (renamed from core/java/android/hardware/camera2/CameraProperties.java)8
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java27
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java4
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java28
-rw-r--r--core/java/android/hardware/camera2/Face.java2
-rw-r--r--core/java/android/hardware/camera2/impl/CameraDevice.java6
-rw-r--r--core/java/android/hardware/camera2/impl/CameraMetadataNative.java2
-rw-r--r--core/java/android/hardware/camera2/package.html2
8 files changed, 43 insertions, 36 deletions
diff --git a/core/java/android/hardware/camera2/CameraProperties.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index a2faf09..85fa7d6 100644
--- a/core/java/android/hardware/camera2/CameraProperties.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -32,7 +32,7 @@ import java.util.List;
* @see CameraDevice
* @see CameraManager
*/
-public final class CameraProperties extends CameraMetadata {
+public final class CameraCharacteristics extends CameraMetadata {
private final CameraMetadataNative mProperties;
private List<Key<?>> mAvailableRequestKeys;
@@ -42,7 +42,7 @@ public final class CameraProperties extends CameraMetadata {
* Takes ownership of the passed-in properties object
* @hide
*/
- public CameraProperties(CameraMetadataNative properties) {
+ public CameraCharacteristics(CameraMetadataNative properties) {
mProperties = properties;
}
@@ -60,7 +60,7 @@ public final class CameraProperties extends CameraMetadata {
*
* <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
*
- * <p>Note that there is no {@code getAvailableCameraPropertiesKeys()} -- use
+ * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
* {@link #getKeys()} instead.</p>
*
* @return List of keys supported by this CameraDevice for CaptureRequests.
@@ -81,7 +81,7 @@ public final class CameraProperties extends CameraMetadata {
*
* <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
*
- * <p>Note that there is no {@code getAvailableCameraPropertiesKeys()} -- use
+ * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
* {@link #getKeys()} instead.</p>
*
* @return List of keys supported by this CameraDevice for CaptureResults.
diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index f5fb7ff..ec89041 100644
--- a/core/java/android/hardware/camera2/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -118,22 +118,22 @@ public interface CameraDevice extends AutoCloseable {
* this camera device.</p>
*
* <p>This ID can be used to query the camera device's {@link
- * CameraProperties fixed properties} with {@link
- * CameraManager#getCameraProperties}.</p>
+ * CameraCharacteristics fixed properties} with {@link
+ * CameraManager#getCameraCharacteristics}.</p>
*
* <p>This method can be called even if the device has been closed or has encountered
* a serious error.</p>
*
* @return the ID for this camera device
*
- * @see CameraManager#getCameraProperties
+ * @see CameraManager#getCameraCharacteristics
* @see CameraManager#getDeviceIdList
*/
public String getId();
/**
* Get the static properties for this camera. These are identical to the
- * properties returned by {@link CameraManager#getCameraProperties}.
+ * properties returned by {@link CameraManager#getCameraCharacteristics}.
*
* @return the static properties of the camera
*
@@ -141,10 +141,9 @@ public interface CameraDevice extends AutoCloseable {
* encountered a fatal error
* @throws IllegalStateException if the camera device has been closed
*
- * @see CameraManager#getCameraProperties
+ * @see CameraManager#getCameraCharacteristics
*/
- public CameraProperties getProperties() throws CameraAccessException;
-
+ public CameraCharacteristics getProperties() throws CameraAccessException;
/**
* <p>Set up a new output set of Surfaces for the camera device.</p>
*
@@ -165,7 +164,7 @@ public interface CameraDevice extends AutoCloseable {
* the size of the Surface with
* {@link android.view.SurfaceHolder#setFixedSize} to be one of the
* supported
- * {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* before calling {@link android.view.SurfaceHolder#getSurface}.</li>
*
* <li>For accessing through an OpenGL texture via a
@@ -173,14 +172,14 @@ public interface CameraDevice extends AutoCloseable {
* the SurfaceTexture with
* {@link android.graphics.SurfaceTexture#setDefaultBufferSize} to be one
* of the supported
- * {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* before creating a Surface from the SurfaceTexture with
* {@link Surface#Surface}.</li>
*
* <li>For recording with {@link android.media.MediaCodec}: Call
* {@link android.media.MediaCodec#createInputSurface} after configuring
* the media codec to use one of the
- * {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}
* </li>
*
* <li>For recording with {@link android.media.MediaRecorder}: TODO</li>
@@ -189,16 +188,16 @@ public interface CameraDevice extends AutoCloseable {
* Create a RenderScript
* {@link android.renderscript.Allocation Allocation} with a supported YUV
* type, the IO_INPUT flag, and one of the supported
- * {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}. Then
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed sizes}. Then
* obtain the Surface with
* {@link android.renderscript.Allocation#getSurface}.</li>
*
* <li>For access to uncompressed or JPEG data in the application: Create a
* {@link android.media.ImageReader} object with the desired
- * {@link CameraProperties#SCALER_AVAILABLE_FORMATS image format}, and a
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_FORMATS image format}, and a
* size from the matching
- * {@link CameraProperties#SCALER_AVAILABLE_PROCESSED_SIZES processed},
- * {@link CameraProperties#SCALER_AVAILABLE_JPEG_SIZES jpeg}. Then obtain
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_PROCESSED_SIZES processed},
+ * {@link CameraCharacteristics#SCALER_AVAILABLE_JPEG_SIZES jpeg}. Then obtain
* a Surface from it.</li>
*
* </ul>
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 29895ef..af0512e 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -166,7 +166,7 @@ public final class CameraManager {
* @see #getCameraIdList
* @see android.app.admin.DevicePolicyManager#setCameraDisabled
*/
- public CameraProperties getCameraProperties(String cameraId)
+ public CameraCharacteristics getCameraCharacteristics(String cameraId)
throws CameraAccessException {
synchronized (mLock) {
@@ -179,7 +179,7 @@ public final class CameraManager {
// TODO: implement and call a service function to get the capabilities on C++ side
// TODO: get properties from service
- return new CameraProperties(new CameraMetadataNative());
+ return new CameraCharacteristics(new CameraMetadataNative());
}
/**
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 7f4ba4f..b447494 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -40,11 +40,19 @@ import java.util.List;
*
* @see CameraDevice
* @see CameraManager
- * @see CameraProperties
+ * @see CameraCharacteristics
**/
public abstract class CameraMetadata {
/**
+ * Set a camera metadata field to a value. The field definitions can be
+ * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
+ * {@link CaptureRequest}.
+ *
+ * @param key The metadata field to write.
+ * @param value The value to set the field to, which must be of a matching
+ * type to the key.
+ *
* @hide
*/
protected CameraMetadata() {
@@ -54,7 +62,7 @@ public abstract class CameraMetadata {
* Get a camera metadata field value.
*
* <p>The field definitions can be
- * found in {@link CameraProperties}, {@link CaptureResult}, and
+ * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
* {@link CaptureRequest}.</p>
*
* <p>Querying the value for the same key more than once will return a value
@@ -195,43 +203,43 @@ public abstract class CameraMetadata {
*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
//
- // Enumeration values for CameraProperties#LENS_FACING
+ // Enumeration values for CameraCharacteristics#LENS_FACING
//
/**
- * @see CameraProperties#LENS_FACING
+ * @see CameraCharacteristics#LENS_FACING
*/
public static final int LENS_FACING_FRONT = 0;
/**
- * @see CameraProperties#LENS_FACING
+ * @see CameraCharacteristics#LENS_FACING
*/
public static final int LENS_FACING_BACK = 1;
//
- // Enumeration values for CameraProperties#LED_AVAILABLE_LEDS
+ // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
//
/**
* <p>
* android.led.transmit control is used
* </p>
- * @see CameraProperties#LED_AVAILABLE_LEDS
+ * @see CameraCharacteristics#LED_AVAILABLE_LEDS
* @hide
*/
public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
//
- // Enumeration values for CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL
+ // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
//
/**
- * @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL
+ * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
*/
public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
/**
- * @see CameraProperties#INFO_SUPPORTED_HARDWARE_LEVEL
+ * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
*/
public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
diff --git a/core/java/android/hardware/camera2/Face.java b/core/java/android/hardware/camera2/Face.java
index 6bfc535..ef068ca 100644
--- a/core/java/android/hardware/camera2/Face.java
+++ b/core/java/android/hardware/camera2/Face.java
@@ -128,7 +128,7 @@ public final class Face {
* Bounds of the face.
*
* <p>A rectangle relative to the sensor's
- * {@link CameraProperties#SENSOR_INFO_ACTIVE_ARRAY_SIZE}, with (0,0)
+ * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE}, with (0,0)
* representing the top-left corner of the active array rectangle.</p>
*
* <p>There is no constraints on the the Rectangle value other than it
diff --git a/core/java/android/hardware/camera2/impl/CameraDevice.java b/core/java/android/hardware/camera2/impl/CameraDevice.java
index c5983a1..f126472 100644
--- a/core/java/android/hardware/camera2/impl/CameraDevice.java
+++ b/core/java/android/hardware/camera2/impl/CameraDevice.java
@@ -20,7 +20,7 @@ import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraMetadata;
-import android.hardware.camera2.CameraProperties;
+import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CaptureRequest;
import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.ICameraDeviceCallbacks;
@@ -88,7 +88,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
}
@Override
- public CameraProperties getProperties() throws CameraAccessException {
+ public CameraCharacteristics getProperties() throws CameraAccessException {
CameraMetadataNative info = new CameraMetadataNative();
@@ -101,7 +101,7 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
return null;
}
- CameraProperties properties = new CameraProperties(info);
+ CameraCharacteristics properties = new CameraCharacteristics(info);
return properties;
}
diff --git a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
index c13438a..6d7b03e 100644
--- a/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
+++ b/core/java/android/hardware/camera2/impl/CameraMetadataNative.java
@@ -101,7 +101,7 @@ public class CameraMetadataNative extends CameraMetadata implements Parcelable {
/**
* Set a camera metadata field to a value. The field definitions can be
- * found in {@link CameraProperties}, {@link CaptureResult}, and
+ * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
* {@link CaptureRequest}.
*
* @param key The metadata field to write.
diff --git a/core/java/android/hardware/camera2/package.html b/core/java/android/hardware/camera2/package.html
index e9d9cea..9f6c2a9 100644
--- a/core/java/android/hardware/camera2/package.html
+++ b/core/java/android/hardware/camera2/package.html
@@ -34,7 +34,7 @@ framerate on most Android devices.</p>
CameraDevices} provide a set of static property information that
describes the hardware device and the available settings and output
parameters for the device. This information is provided through the
-{@link android.hardware.camera2.CameraProperties} object.</p>
+{@link android.hardware.camera2.CameraCharacteristics} object.</p>
<p>To capture or stream images from a camera device, the application
must first configure a set of output Surfaces for use with the camera