summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk4
-rw-r--r--api/current.txt272
-rw-r--r--core/java/android/app/ContextImpl.java2
-rw-r--r--core/java/android/content/Context.java2
-rw-r--r--core/java/android/hardware/ICameraService.aidl4
-rw-r--r--core/java/android/hardware/camera2/CameraAccessException.java (renamed from core/java/android/hardware/photography/CameraAccessException.java)2
-rw-r--r--core/java/android/hardware/camera2/CameraDevice.java (renamed from core/java/android/hardware/photography/CameraDevice.java)2
-rw-r--r--core/java/android/hardware/camera2/CameraManager.java (renamed from core/java/android/hardware/photography/CameraManager.java)12
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.aidl (renamed from core/java/android/hardware/photography/CameraMetadata.aidl)2
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java (renamed from core/java/android/hardware/photography/CameraMetadata.java)10
-rw-r--r--core/java/android/hardware/camera2/CameraProperties.java (renamed from core/java/android/hardware/photography/CameraProperties.java)2
-rw-r--r--core/java/android/hardware/camera2/CameraPropertiesKeys.java (renamed from core/java/android/hardware/photography/CameraPropertiesKeys.java)24
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.aidl (renamed from core/java/android/hardware/photography/CaptureRequest.aidl)2
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.java (renamed from core/java/android/hardware/photography/CaptureRequest.java)2
-rw-r--r--core/java/android/hardware/camera2/CaptureRequestKeys.java (renamed from core/java/android/hardware/photography/CaptureRequestKeys.java)8
-rw-r--r--core/java/android/hardware/camera2/CaptureResult.java (renamed from core/java/android/hardware/photography/CaptureResult.java)2
-rw-r--r--core/java/android/hardware/camera2/CaptureResultKeys.java (renamed from core/java/android/hardware/photography/CaptureResultKeys.java)8
-rw-r--r--core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl (renamed from core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl)6
-rw-r--r--core/java/android/hardware/camera2/ICameraDeviceUser.aidl (renamed from core/java/android/hardware/photography/ICameraDeviceUser.aidl)8
-rw-r--r--core/java/android/hardware/camera2/Rational.java (renamed from core/java/android/hardware/photography/Rational.java)2
-rw-r--r--core/java/android/hardware/camera2/Size.java (renamed from core/java/android/hardware/photography/Size.java)2
-rw-r--r--core/java/android/hardware/camera2/impl/CameraDevice.java (renamed from core/java/android/hardware/photography/impl/CameraDevice.java)22
-rw-r--r--core/java/android/hardware/camera2/impl/MetadataMarshalClass.java (renamed from core/java/android/hardware/photography/impl/MetadataMarshalClass.java)10
-rw-r--r--core/java/android/hardware/camera2/impl/MetadataMarshalRect.java (renamed from core/java/android/hardware/photography/impl/MetadataMarshalRect.java)4
-rw-r--r--core/java/android/hardware/camera2/impl/MetadataMarshalSize.java (renamed from core/java/android/hardware/photography/impl/MetadataMarshalSize.java)6
-rw-r--r--core/java/android/hardware/camera2/impl/MetadataMarshalString.java (renamed from core/java/android/hardware/photography/impl/MetadataMarshalString.java)4
-rw-r--r--core/java/android/hardware/camera2/impl/package.html (renamed from core/java/android/hardware/photography/impl/package.html)0
-rw-r--r--core/java/android/hardware/camera2/package.html (renamed from core/java/android/hardware/photography/package.html)20
-rw-r--r--core/java/android/hardware/camera2/utils/CameraBinderDecorator.java (renamed from core/java/android/hardware/photography/utils/CameraBinderDecorator.java)10
-rw-r--r--core/java/android/hardware/camera2/utils/CameraRuntimeException.java (renamed from core/java/android/hardware/photography/utils/CameraRuntimeException.java)4
-rw-r--r--core/java/android/hardware/camera2/utils/Decorator.java (renamed from core/java/android/hardware/photography/utils/Decorator.java)4
-rw-r--r--core/java/android/hardware/camera2/utils/UncheckedThrow.java (renamed from core/java/android/hardware/photography/utils/UncheckedThrow.java)2
-rw-r--r--core/java/android/hardware/camera2/utils/package.html (renamed from core/java/android/hardware/photography/utils/package.html)0
-rw-r--r--core/jni/Android.mk2
-rw-r--r--core/jni/AndroidRuntime.cpp4
-rw-r--r--core/jni/android_hardware_camera2_CameraMetadata.cpp (renamed from core/jni/android_hardware_photography_CameraMetadata.cpp)4
-rw-r--r--graphics/java/android/graphics/ImageFormat.java18
-rw-r--r--media/java/android/media/Image.java4
-rw-r--r--media/java/android/media/ImageReader.java2
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java6
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java12
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java8
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java10
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java4
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java6
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java4
-rw-r--r--media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java2
47 files changed, 275 insertions, 275 deletions
diff --git a/Android.mk b/Android.mk
index f5b1cd9..74cf824 100644
--- a/Android.mk
+++ b/Android.mk
@@ -121,8 +121,8 @@ LOCAL_SRC_FILES += \
core/java/android/hardware/ICameraClient.aidl \
core/java/android/hardware/IProCameraUser.aidl \
core/java/android/hardware/IProCameraCallbacks.aidl \
- core/java/android/hardware/photography/ICameraDeviceUser.aidl \
- core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl \
+ core/java/android/hardware/camera2/ICameraDeviceUser.aidl \
+ core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl \
core/java/android/hardware/ISerialManager.aidl \
core/java/android/hardware/display/IDisplayManager.aidl \
core/java/android/hardware/display/IDisplayManagerCallback.aidl \
diff --git a/api/current.txt b/api/current.txt
index d61f0d2..b9f9804c 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10648,6 +10648,142 @@ package android.hardware {
}
+package android.hardware.camera2 {
+
+ public class CameraAccessException extends android.util.AndroidException {
+ ctor public CameraAccessException(int);
+ ctor public CameraAccessException(int, java.lang.String);
+ ctor public CameraAccessException(int, java.lang.String, java.lang.Throwable);
+ ctor public CameraAccessException(int, java.lang.Throwable);
+ method public final int getReason();
+ field public static final int CAMERA_DISABLED = 3; // 0x3
+ field public static final int CAMERA_DISCONNECTED = 4; // 0x4
+ field public static final int CAMERA_IN_USE = 1; // 0x1
+ field public static final int MAX_CAMERAS_IN_USE = 2; // 0x2
+ }
+
+ public abstract interface CameraDevice implements java.lang.AutoCloseable {
+ method public abstract void capture(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void captureBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void close() throws java.lang.Exception;
+ method public abstract void configureOutputs(java.util.List<android.view.Surface>) throws android.hardware.camera2.CameraAccessException;
+ method public abstract android.hardware.camera2.CaptureRequest createCaptureRequest(int) throws android.hardware.camera2.CameraAccessException;
+ method public abstract android.hardware.camera2.CameraProperties getProperties() throws android.hardware.camera2.CameraAccessException;
+ method public abstract void setErrorListener(android.hardware.camera2.CameraDevice.ErrorListener);
+ method public abstract void setRepeatingBurst(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void setRepeatingRequest(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener) throws android.hardware.camera2.CameraAccessException;
+ method public abstract void stopRepeating() throws android.hardware.camera2.CameraAccessException;
+ method public abstract void waitUntilIdle() throws android.hardware.camera2.CameraAccessException;
+ field public static final int TEMPLATE_MANUAL = 5; // 0x5
+ field public static final int TEMPLATE_PREVIEW = 1; // 0x1
+ field public static final int TEMPLATE_RECORD = 3; // 0x3
+ field public static final int TEMPLATE_STILL_CAPTURE = 2; // 0x2
+ field public static final int TEMPLATE_VIDEO_SNAPSHOT = 4; // 0x4
+ }
+
+ public static abstract interface CameraDevice.CaptureListener {
+ method public abstract void onCaptureComplete(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest, android.hardware.camera2.CaptureResult);
+ method public abstract void onCaptureFailed(android.hardware.camera2.CameraDevice, android.hardware.camera2.CaptureRequest);
+ }
+
+ public static abstract interface CameraDevice.ErrorListener {
+ method public abstract void onCameraDeviceError(android.hardware.camera2.CameraDevice, int);
+ field public static final int DEVICE_DISCONNECTED = 1; // 0x1
+ field public static final int DEVICE_ERROR = 2; // 0x2
+ field public static final int SERVICE_ERROR = 3; // 0x3
+ }
+
+ public final class CameraManager {
+ method public android.hardware.camera2.CameraProperties getCameraProperties(java.lang.String) throws android.hardware.camera2.CameraAccessException;
+ method public java.lang.String[] getDeviceIdList() throws android.hardware.camera2.CameraAccessException;
+ method public android.hardware.camera2.CameraDevice openCamera(java.lang.String) throws android.hardware.camera2.CameraAccessException;
+ method public void registerCameraListener(android.hardware.camera2.CameraManager.CameraListener);
+ method public void unregisterCameraListener(android.hardware.camera2.CameraManager.CameraListener);
+ }
+
+ public static abstract interface CameraManager.CameraListener {
+ method public abstract void onCameraAvailable(java.lang.String);
+ method public abstract void onCameraUnavailable(java.lang.String);
+ }
+
+ public class CameraMetadata implements java.lang.AutoCloseable android.os.Parcelable {
+ ctor public CameraMetadata();
+ method public void close() throws java.lang.Exception;
+ method public int describeContents();
+ method public T get(android.hardware.camera2.CameraMetadata.Key<T>);
+ method public void readFromParcel(android.os.Parcel);
+ method public void set(android.hardware.camera2.CameraMetadata.Key<T>, T);
+ method public void writeToParcel(android.os.Parcel, int);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ }
+
+ public static class CameraMetadata.Key {
+ ctor public CameraMetadata.Key(java.lang.String, java.lang.Class<T>);
+ method public final boolean equals(java.lang.Object);
+ method public final java.lang.String getName();
+ method public final int hashCode();
+ }
+
+ public final class CameraProperties extends android.hardware.camera2.CameraMetadata {
+ ctor public CameraProperties();
+ field public static final android.hardware.camera2.CameraMetadata.Key INFO_IDENTIFIER;
+ field public static final android.hardware.camera2.CameraMetadata.Key INFO_MODEL;
+ field public static final android.hardware.camera2.CameraMetadata.Key INFO_REMOVABLE;
+ field public static final android.hardware.camera2.CameraMetadata.Key INFO_SUPPORTED_HARDWARE_LEVEL;
+ field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; // 0x1
+ field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; // 0x0
+ field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_FORMATS;
+ field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_JPEG_SIZES;
+ field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_SIZES;
+ field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_RAW_SIZES;
+ field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_ACTIVE_ARRAY_SIZE;
+ field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_PIXEL_ARRAY_SIZE;
+ }
+
+ public final class CaptureRequest extends android.hardware.camera2.CameraMetadata implements android.os.Parcelable {
+ method public void addTarget(android.view.Surface);
+ method public void removeTarget(android.view.Surface);
+ field public static final android.os.Parcelable.Creator CREATOR;
+ field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_EXPOSURE_TIME;
+ field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_SENSITIVITY;
+ }
+
+ public final class CaptureResult extends android.hardware.camera2.CameraMetadata {
+ field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AE_STATE;
+ field public static final int CONTROL_AE_STATE_CONVERGED = 2; // 0x2
+ field public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; // 0x4
+ field public static final int CONTROL_AE_STATE_INACTIVE = 0; // 0x0
+ field public static final int CONTROL_AE_STATE_LOCKED = 3; // 0x3
+ field public static final int CONTROL_AE_STATE_PRECAPTURE = 5; // 0x5
+ field public static final int CONTROL_AE_STATE_SEARCHING = 1; // 0x1
+ field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_TIMESTAMP;
+ field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_DETECTED_FACES;
+ }
+
+ public static class CaptureResult.Face {
+ ctor public CaptureResult.Face();
+ method public android.graphics.Rect getBounds();
+ method public int getId();
+ method public android.graphics.Point getLeftEye();
+ method public android.graphics.Point getMouth();
+ method public android.graphics.Point getRightEye();
+ method public int getScore();
+ }
+
+ public final class Rational {
+ ctor public Rational(int, int);
+ method public int getDenominator();
+ method public int getNumerator();
+ }
+
+ public final class Size {
+ ctor public Size(int, int);
+ method public final int getHeight();
+ method public final int getWidth();
+ }
+
+}
+
package android.hardware.display {
public final class DisplayManager {
@@ -10750,142 +10886,6 @@ package android.hardware.location {
}
-package android.hardware.photography {
-
- public class CameraAccessException extends android.util.AndroidException {
- ctor public CameraAccessException(int);
- ctor public CameraAccessException(int, java.lang.String);
- ctor public CameraAccessException(int, java.lang.String, java.lang.Throwable);
- ctor public CameraAccessException(int, java.lang.Throwable);
- method public final int getReason();
- field public static final int CAMERA_DISABLED = 3; // 0x3
- field public static final int CAMERA_DISCONNECTED = 4; // 0x4
- field public static final int CAMERA_IN_USE = 1; // 0x1
- field public static final int MAX_CAMERAS_IN_USE = 2; // 0x2
- }
-
- public abstract interface CameraDevice implements java.lang.AutoCloseable {
- method public abstract void capture(android.hardware.photography.CaptureRequest, android.hardware.photography.CameraDevice.CaptureListener) throws android.hardware.photography.CameraAccessException;
- method public abstract void captureBurst(java.util.List<android.hardware.photography.CaptureRequest>, android.hardware.photography.CameraDevice.CaptureListener) throws android.hardware.photography.CameraAccessException;
- method public abstract void close() throws java.lang.Exception;
- method public abstract void configureOutputs(java.util.List<android.view.Surface>) throws android.hardware.photography.CameraAccessException;
- method public abstract android.hardware.photography.CaptureRequest createCaptureRequest(int) throws android.hardware.photography.CameraAccessException;
- method public abstract android.hardware.photography.CameraProperties getProperties() throws android.hardware.photography.CameraAccessException;
- method public abstract void setErrorListener(android.hardware.photography.CameraDevice.ErrorListener);
- method public abstract void setRepeatingBurst(java.util.List<android.hardware.photography.CaptureRequest>, android.hardware.photography.CameraDevice.CaptureListener) throws android.hardware.photography.CameraAccessException;
- method public abstract void setRepeatingRequest(android.hardware.photography.CaptureRequest, android.hardware.photography.CameraDevice.CaptureListener) throws android.hardware.photography.CameraAccessException;
- method public abstract void stopRepeating() throws android.hardware.photography.CameraAccessException;
- method public abstract void waitUntilIdle() throws android.hardware.photography.CameraAccessException;
- field public static final int TEMPLATE_MANUAL = 5; // 0x5
- field public static final int TEMPLATE_PREVIEW = 1; // 0x1
- field public static final int TEMPLATE_RECORD = 3; // 0x3
- field public static final int TEMPLATE_STILL_CAPTURE = 2; // 0x2
- field public static final int TEMPLATE_VIDEO_SNAPSHOT = 4; // 0x4
- }
-
- public static abstract interface CameraDevice.CaptureListener {
- method public abstract void onCaptureComplete(android.hardware.photography.CameraDevice, android.hardware.photography.CaptureRequest, android.hardware.photography.CaptureResult);
- method public abstract void onCaptureFailed(android.hardware.photography.CameraDevice, android.hardware.photography.CaptureRequest);
- }
-
- public static abstract interface CameraDevice.ErrorListener {
- method public abstract void onCameraDeviceError(android.hardware.photography.CameraDevice, int);
- field public static final int DEVICE_DISCONNECTED = 1; // 0x1
- field public static final int DEVICE_ERROR = 2; // 0x2
- field public static final int SERVICE_ERROR = 3; // 0x3
- }
-
- public final class CameraManager {
- method public android.hardware.photography.CameraProperties getCameraProperties(java.lang.String) throws android.hardware.photography.CameraAccessException;
- method public java.lang.String[] getDeviceIdList() throws android.hardware.photography.CameraAccessException;
- method public android.hardware.photography.CameraDevice openCamera(java.lang.String) throws android.hardware.photography.CameraAccessException;
- method public void registerCameraListener(android.hardware.photography.CameraManager.CameraListener);
- method public void unregisterCameraListener(android.hardware.photography.CameraManager.CameraListener);
- }
-
- public static abstract interface CameraManager.CameraListener {
- method public abstract void onCameraAvailable(java.lang.String);
- method public abstract void onCameraUnavailable(java.lang.String);
- }
-
- public class CameraMetadata implements java.lang.AutoCloseable android.os.Parcelable {
- ctor public CameraMetadata();
- method public void close() throws java.lang.Exception;
- method public int describeContents();
- method public T get(android.hardware.photography.CameraMetadata.Key<T>);
- method public void readFromParcel(android.os.Parcel);
- method public void set(android.hardware.photography.CameraMetadata.Key<T>, T);
- method public void writeToParcel(android.os.Parcel, int);
- field public static final android.os.Parcelable.Creator CREATOR;
- }
-
- public static class CameraMetadata.Key {
- ctor public CameraMetadata.Key(java.lang.String, java.lang.Class<T>);
- method public final boolean equals(java.lang.Object);
- method public final java.lang.String getName();
- method public final int hashCode();
- }
-
- public final class CameraProperties extends android.hardware.photography.CameraMetadata {
- ctor public CameraProperties();
- field public static final android.hardware.photography.CameraMetadata.Key INFO_IDENTIFIER;
- field public static final android.hardware.photography.CameraMetadata.Key INFO_MODEL;
- field public static final android.hardware.photography.CameraMetadata.Key INFO_REMOVABLE;
- field public static final android.hardware.photography.CameraMetadata.Key INFO_SUPPORTED_HARDWARE_LEVEL;
- field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; // 0x1
- field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; // 0x0
- field public static final android.hardware.photography.CameraMetadata.Key SCALER_AVAILABLE_FORMATS;
- field public static final android.hardware.photography.CameraMetadata.Key SCALER_AVAILABLE_JPEG_SIZES;
- field public static final android.hardware.photography.CameraMetadata.Key SCALER_AVAILABLE_PROCESSED_SIZES;
- field public static final android.hardware.photography.CameraMetadata.Key SCALER_AVAILABLE_RAW_SIZES;
- field public static final android.hardware.photography.CameraMetadata.Key SENSOR_ACTIVE_ARRAY_SIZE;
- field public static final android.hardware.photography.CameraMetadata.Key SENSOR_PIXEL_ARRAY_SIZE;
- }
-
- public final class CaptureRequest extends android.hardware.photography.CameraMetadata implements android.os.Parcelable {
- method public void addTarget(android.view.Surface);
- method public void removeTarget(android.view.Surface);
- field public static final android.os.Parcelable.Creator CREATOR;
- field public static final android.hardware.photography.CameraMetadata.Key SENSOR_EXPOSURE_TIME;
- field public static final android.hardware.photography.CameraMetadata.Key SENSOR_SENSITIVITY;
- }
-
- public final class CaptureResult extends android.hardware.photography.CameraMetadata {
- field public static final android.hardware.photography.CameraMetadata.Key CONTROL_AE_STATE;
- field public static final int CONTROL_AE_STATE_CONVERGED = 2; // 0x2
- field public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4; // 0x4
- field public static final int CONTROL_AE_STATE_INACTIVE = 0; // 0x0
- field public static final int CONTROL_AE_STATE_LOCKED = 3; // 0x3
- field public static final int CONTROL_AE_STATE_PRECAPTURE = 5; // 0x5
- field public static final int CONTROL_AE_STATE_SEARCHING = 1; // 0x1
- field public static final android.hardware.photography.CameraMetadata.Key SENSOR_TIMESTAMP;
- field public static final android.hardware.photography.CameraMetadata.Key STATISTICS_DETECTED_FACES;
- }
-
- public static class CaptureResult.Face {
- ctor public CaptureResult.Face();
- method public android.graphics.Rect getBounds();
- method public int getId();
- method public android.graphics.Point getLeftEye();
- method public android.graphics.Point getMouth();
- method public android.graphics.Point getRightEye();
- method public int getScore();
- }
-
- public final class Rational {
- ctor public Rational(int, int);
- method public int getDenominator();
- method public int getNumerator();
- }
-
- public final class Size {
- ctor public Size(int, int);
- method public final int getHeight();
- method public final int getWidth();
- }
-
-}
-
package android.hardware.usb {
public class UsbAccessory implements android.os.Parcelable {
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index eeee57d..ab11903 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -50,7 +50,7 @@ import android.graphics.drawable.Drawable;
import android.hardware.ISerialManager;
import android.hardware.SerialManager;
import android.hardware.SystemSensorManager;
-import android.hardware.photography.CameraManager;
+import android.hardware.camera2.CameraManager;
import android.hardware.display.DisplayManager;
import android.hardware.input.InputManager;
import android.hardware.usb.IUsbManager;
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index aa326ad..0b1127c 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2292,7 +2292,7 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
- * {@link android.hardware.photography.CameraManager} for interacting with
+ * {@link android.hardware.camera2.CameraManager} for interacting with
* camera devices.
*
* @see #getSystemService
diff --git a/core/java/android/hardware/ICameraService.aidl b/core/java/android/hardware/ICameraService.aidl
index 2d0c099..81e564e 100644
--- a/core/java/android/hardware/ICameraService.aidl
+++ b/core/java/android/hardware/ICameraService.aidl
@@ -20,8 +20,8 @@ import android.hardware.ICamera;
import android.hardware.ICameraClient;
import android.hardware.IProCameraUser;
import android.hardware.IProCameraCallbacks;
-import android.hardware.photography.ICameraDeviceUser;
-import android.hardware.photography.ICameraDeviceCallbacks;
+import android.hardware.camera2.ICameraDeviceUser;
+import android.hardware.camera2.ICameraDeviceCallbacks;
import android.hardware.ICameraServiceListener;
import android.hardware.CameraInfo;
diff --git a/core/java/android/hardware/photography/CameraAccessException.java b/core/java/android/hardware/camera2/CameraAccessException.java
index fac5086..0089f26 100644
--- a/core/java/android/hardware/photography/CameraAccessException.java
+++ b/core/java/android/hardware/camera2/CameraAccessException.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.util.AndroidException;
diff --git a/core/java/android/hardware/photography/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java
index 0852025..422d827 100644
--- a/core/java/android/hardware/photography/CameraDevice.java
+++ b/core/java/android/hardware/camera2/CameraDevice.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.view.Surface;
diff --git a/core/java/android/hardware/photography/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index c1c9435..0f7c930 100644
--- a/core/java/android/hardware/photography/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -14,14 +14,14 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.content.Context;
import android.hardware.ICameraService;
import android.hardware.ICameraServiceListener;
import android.hardware.IProCameraUser;
-import android.hardware.photography.utils.CameraBinderDecorator;
-import android.hardware.photography.utils.CameraRuntimeException;
+import android.hardware.camera2.utils.CameraBinderDecorator;
+import android.hardware.camera2.utils.CameraRuntimeException;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
@@ -42,7 +42,7 @@ import java.util.HashSet;
* <pre>CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE);</pre>
*
* <p>For more details about communicating with camera devices, read the Camera
- * developer guide or the {@link android.hardware.photography photography}
+ * developer guide or the {@link android.hardware.camera2 camera2}
* package documentation.</p>
*/
public final class CameraManager {
@@ -190,8 +190,8 @@ public final class CameraManager {
ICameraDeviceUser cameraUser;
- android.hardware.photography.impl.CameraDevice device =
- new android.hardware.photography.impl.CameraDevice(cameraId);
+ android.hardware.camera2.impl.CameraDevice device =
+ new android.hardware.camera2.impl.CameraDevice(cameraId);
cameraUser = mCameraService.connectDevice(device.getCallbacks(),
Integer.parseInt(cameraId),
diff --git a/core/java/android/hardware/photography/CameraMetadata.aidl b/core/java/android/hardware/camera2/CameraMetadata.aidl
index b4dc9ac..71dd471 100644
--- a/core/java/android/hardware/photography/CameraMetadata.aidl
+++ b/core/java/android/hardware/camera2/CameraMetadata.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
/** @hide */
parcelable CameraMetadata;
diff --git a/core/java/android/hardware/photography/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index c024c05..e7f34d8 100644
--- a/core/java/android/hardware/photography/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
-import android.hardware.photography.impl.MetadataMarshalClass;
-import android.hardware.photography.impl.MetadataMarshalRect;
-import android.hardware.photography.impl.MetadataMarshalSize;
-import android.hardware.photography.impl.MetadataMarshalString;
+import android.hardware.camera2.impl.MetadataMarshalClass;
+import android.hardware.camera2.impl.MetadataMarshalRect;
+import android.hardware.camera2.impl.MetadataMarshalSize;
+import android.hardware.camera2.impl.MetadataMarshalString;
import android.os.Parcelable;
import android.os.Parcel;
import android.util.Log;
diff --git a/core/java/android/hardware/photography/CameraProperties.java b/core/java/android/hardware/camera2/CameraProperties.java
index 2ed4e3a..89e1f2a 100644
--- a/core/java/android/hardware/photography/CameraProperties.java
+++ b/core/java/android/hardware/camera2/CameraProperties.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.graphics.Rect;
diff --git a/core/java/android/hardware/photography/CameraPropertiesKeys.java b/core/java/android/hardware/camera2/CameraPropertiesKeys.java
index db8ab44..41b31ff 100644
--- a/core/java/android/hardware/photography/CameraPropertiesKeys.java
+++ b/core/java/android/hardware/camera2/CameraPropertiesKeys.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
/**
* ! Do not edit this file directly !
@@ -71,8 +71,8 @@ public final class CameraPropertiesKeys {
}
public static final class Jpeg {
- public static final Key<android.hardware.photography.Size[]> AVAILABLE_THUMBNAIL_SIZES =
- new Key<android.hardware.photography.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.photography.Size[].class);
+ public static final Key<android.hardware.camera2.Size[]> AVAILABLE_THUMBNAIL_SIZES =
+ new Key<android.hardware.camera2.Size[]>("android.jpeg.availableThumbnailSizes", android.hardware.camera2.Size[].class);
}
@@ -90,8 +90,8 @@ public final class CameraPropertiesKeys {
new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
public static final Key<Float> MINIMUM_FOCUS_DISTANCE =
new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
- public static final Key<android.hardware.photography.Size> SHADING_MAP_SIZE =
- new Key<android.hardware.photography.Size>("android.lens.info.shadingMapSize", android.hardware.photography.Size.class);
+ public static final Key<android.hardware.camera2.Size> SHADING_MAP_SIZE =
+ new Key<android.hardware.camera2.Size>("android.lens.info.shadingMapSize", android.hardware.camera2.Size.class);
}
public static final class FacingKey extends Key<Lens.FacingKey.Enum> {
@@ -161,14 +161,14 @@ public final class CameraPropertiesKeys {
new AvailableFormatsKey("android.scaler.availableFormats");
public static final Key<long[]> AVAILABLE_JPEG_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
- public static final Key<android.hardware.photography.Size[]> AVAILABLE_JPEG_SIZES =
- new Key<android.hardware.photography.Size[]>("android.scaler.availableJpegSizes", android.hardware.photography.Size[].class);
+ public static final Key<android.hardware.camera2.Size[]> AVAILABLE_JPEG_SIZES =
+ new Key<android.hardware.camera2.Size[]>("android.scaler.availableJpegSizes", android.hardware.camera2.Size[].class);
public static final Key<Float> AVAILABLE_MAX_DIGITAL_ZOOM =
new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
public static final Key<long[]> AVAILABLE_PROCESSED_MIN_DURATIONS =
new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
- public static final Key<android.hardware.photography.Size[]> AVAILABLE_PROCESSED_SIZES =
- new Key<android.hardware.photography.Size[]>("android.scaler.availableProcessedSizes", android.hardware.photography.Size[].class);
+ public static final Key<android.hardware.camera2.Size[]> AVAILABLE_PROCESSED_SIZES =
+ new Key<android.hardware.camera2.Size[]>("android.scaler.availableProcessedSizes", android.hardware.camera2.Size[].class);
}
@@ -182,8 +182,8 @@ public final class CameraPropertiesKeys {
new Key<long[]>("android.sensor.info.exposureTimeRange", long[].class);
public static final Key<Long> MAX_FRAME_DURATION =
new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
- public static final Key<android.hardware.photography.Size> PHYSICAL_SIZE =
- new Key<android.hardware.photography.Size>("android.sensor.info.physicalSize", android.hardware.photography.Size.class);
+ public static final Key<android.hardware.camera2.Size> PHYSICAL_SIZE =
+ new Key<android.hardware.camera2.Size>("android.sensor.info.physicalSize", android.hardware.camera2.Size.class);
}
public static final Key<Rational> BASE_GAIN_FACTOR =
new Key<Rational>("android.sensor.baseGainFactor", Rational.class);
diff --git a/core/java/android/hardware/photography/CaptureRequest.aidl b/core/java/android/hardware/camera2/CaptureRequest.aidl
index 64fb6f2..0b7d5ba 100644
--- a/core/java/android/hardware/photography/CaptureRequest.aidl
+++ b/core/java/android/hardware/camera2/CaptureRequest.aidl
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
/** @hide */
parcelable CaptureRequest;
diff --git a/core/java/android/hardware/photography/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index d4a7a3c..15ba12c 100644
--- a/core/java/android/hardware/photography/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/core/java/android/hardware/photography/CaptureRequestKeys.java b/core/java/android/hardware/camera2/CaptureRequestKeys.java
index ca6d487..17de8f0 100644
--- a/core/java/android/hardware/photography/CaptureRequestKeys.java
+++ b/core/java/android/hardware/camera2/CaptureRequestKeys.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
/**
* ! Do not edit this file directly !
@@ -449,8 +449,8 @@ public final class CaptureRequestKeys {
new Key<Byte>("android.jpeg.quality", byte.class);
public static final Key<Byte> THUMBNAIL_QUALITY =
new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
- public static final Key<android.hardware.photography.Size> THUMBNAIL_SIZE =
- new Key<android.hardware.photography.Size>("android.jpeg.thumbnailSize", android.hardware.photography.Size.class);
+ public static final Key<android.hardware.camera2.Size> THUMBNAIL_SIZE =
+ new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
}
diff --git a/core/java/android/hardware/photography/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 2fdd466..11c991a 100644
--- a/core/java/android/hardware/photography/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.graphics.Point;
import android.graphics.Rect;
diff --git a/core/java/android/hardware/photography/CaptureResultKeys.java b/core/java/android/hardware/camera2/CaptureResultKeys.java
index 4931564..dd3ed83 100644
--- a/core/java/android/hardware/photography/CaptureResultKeys.java
+++ b/core/java/android/hardware/camera2/CaptureResultKeys.java
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
-import static android.hardware.photography.CameraMetadata.Key;
+import static android.hardware.camera2.CameraMetadata.Key;
/**
* ! Do not edit this file directly !
@@ -310,8 +310,8 @@ public final class CaptureResultKeys {
new Key<Byte>("android.jpeg.quality", byte.class);
public static final Key<Byte> THUMBNAIL_QUALITY =
new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
- public static final Key<android.hardware.photography.Size> THUMBNAIL_SIZE =
- new Key<android.hardware.photography.Size>("android.jpeg.thumbnailSize", android.hardware.photography.Size.class);
+ public static final Key<android.hardware.camera2.Size> THUMBNAIL_SIZE =
+ new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
}
diff --git a/core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
index c506800..9f569cb 100644
--- a/core/java/android/hardware/photography/ICameraDeviceCallbacks.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceCallbacks.aidl
@@ -14,15 +14,15 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
/** @hide */
interface ICameraDeviceCallbacks
{
/**
- * Keep up-to-date with frameworks/av/include/camera/photography/ICameraDeviceCallbacks.h
+ * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceCallbacks.h
*/
void notifyCallback(int msgType, int ext1, int ext2);
diff --git a/core/java/android/hardware/photography/ICameraDeviceUser.aidl b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
index 571f50a..5a9b72f 100644
--- a/core/java/android/hardware/photography/ICameraDeviceUser.aidl
+++ b/core/java/android/hardware/camera2/ICameraDeviceUser.aidl
@@ -14,17 +14,17 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
import android.view.Surface;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.CaptureRequest;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CaptureRequest;
/** @hide */
interface ICameraDeviceUser
{
/**
- * Keep up-to-date with frameworks/av/include/camera/photography/ICameraDeviceUser.h
+ * Keep up-to-date with frameworks/av/include/camera/camera2/ICameraDeviceUser.h
*/
void disconnect();
diff --git a/core/java/android/hardware/photography/Rational.java b/core/java/android/hardware/camera2/Rational.java
index 66e533e..7ccc555 100644
--- a/core/java/android/hardware/photography/Rational.java
+++ b/core/java/android/hardware/camera2/Rational.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
/**
* The rational data type used by CameraMetadata keys. Contains a pair of ints representing the
diff --git a/core/java/android/hardware/photography/Size.java b/core/java/android/hardware/camera2/Size.java
index 499fd56..45aaeae 100644
--- a/core/java/android/hardware/photography/Size.java
+++ b/core/java/android/hardware/camera2/Size.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography;
+package android.hardware.camera2;
/**
* A simple immutable class for describing the dimensions of camera image
diff --git a/core/java/android/hardware/photography/impl/CameraDevice.java b/core/java/android/hardware/camera2/impl/CameraDevice.java
index 5cb7525..9587680 100644
--- a/core/java/android/hardware/photography/impl/CameraDevice.java
+++ b/core/java/android/hardware/camera2/impl/CameraDevice.java
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-package android.hardware.photography.impl;
-
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.CaptureResult;
-import android.hardware.photography.ICameraDeviceUser;
-import android.hardware.photography.ICameraDeviceCallbacks;
-import android.hardware.photography.CameraAccessException;
-import android.hardware.photography.CameraProperties;
-import android.hardware.photography.CaptureRequest;
-import android.hardware.photography.utils.CameraRuntimeException;
+package android.hardware.camera2.impl;
+
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CaptureResult;
+import android.hardware.camera2.ICameraDeviceUser;
+import android.hardware.camera2.ICameraDeviceCallbacks;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.CameraProperties;
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.utils.CameraRuntimeException;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
@@ -37,7 +37,7 @@ import java.util.Stack;
/**
* HAL2.1+ implementation of CameraDevice Use CameraManager#open to instantiate
*/
-public class CameraDevice implements android.hardware.photography.CameraDevice {
+public class CameraDevice implements android.hardware.camera2.CameraDevice {
private final String TAG;
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalClass.java b/core/java/android/hardware/camera2/impl/MetadataMarshalClass.java
index a70784d..a934d75 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalClass.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalClass.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
import java.nio.ByteBuffer;
@@ -26,7 +26,7 @@ public interface MetadataMarshalClass<T> {
* @param value the value of type T that we wish to write into the byte buffer
* @param buffer the byte buffer into which the marshalled object will be written
* @param nativeType the native type, e.g.
- * {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
+ * {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
* Guaranteed to be one for which isNativeTypeSupported returns true.
* @param sizeOnly if this is true, don't write to the byte buffer. calculate the size only.
* @return the size that needs to be written to the byte buffer
@@ -37,7 +37,7 @@ public interface MetadataMarshalClass<T> {
* Unmarshal a new object instance from the byte buffer.
* @param buffer the byte buffer, from which we will read the object
* @param nativeType the native type, e.g.
- * {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
+ * {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}.
* Guaranteed to be one for which isNativeTypeSupported returns true.
* @return a new instance of type T read from the byte buffer
*/
@@ -50,7 +50,7 @@ public interface MetadataMarshalClass<T> {
* will are likely to only support one type.
*
* @param nativeType the native type, e.g.
- * {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}
+ * {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}
* @return true if it supports, false otherwise
*/
boolean isNativeTypeSupported(int nativeType);
@@ -60,7 +60,7 @@ public interface MetadataMarshalClass<T> {
/**
* How many bytes T will take up if marshalled to/from nativeType
* @param nativeType the native type, e.g.
- * {@link android.hardware.photography.CameraMetadata#TYPE_BYTE TYPE_BYTE}
+ * {@link android.hardware.camera2.CameraMetadata#TYPE_BYTE TYPE_BYTE}
* @return a size in bytes, or NATIVE_SIZE_DYNAMIC if the size is dynamic
*/
int getNativeSize(int nativeType);
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalRect.java b/core/java/android/hardware/camera2/impl/MetadataMarshalRect.java
index d6636ac..384223c 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalRect.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalRect.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
import android.graphics.Rect;
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
import java.nio.ByteBuffer;
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalSize.java b/core/java/android/hardware/camera2/impl/MetadataMarshalSize.java
index 430219c..793bba7 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalSize.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalSize.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.Size;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.Size;
import java.nio.ByteBuffer;
diff --git a/core/java/android/hardware/photography/impl/MetadataMarshalString.java b/core/java/android/hardware/camera2/impl/MetadataMarshalString.java
index 81123ee..50b3347 100644
--- a/core/java/android/hardware/photography/impl/MetadataMarshalString.java
+++ b/core/java/android/hardware/camera2/impl/MetadataMarshalString.java
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.hardware.photography.impl;
+package android.hardware.camera2.impl;
-import android.hardware.photography.CameraMetadata;
+import android.hardware.camera2.CameraMetadata;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
diff --git a/core/java/android/hardware/photography/impl/package.html b/core/java/android/hardware/camera2/impl/package.html
index 783d0a1..783d0a1 100644
--- a/core/java/android/hardware/photography/impl/package.html
+++ b/core/java/android/hardware/camera2/impl/package.html
diff --git a/core/java/android/hardware/photography/package.html b/core/java/android/hardware/camera2/package.html
index 578bdf5..e9d9cea 100644
--- a/core/java/android/hardware/photography/package.html
+++ b/core/java/android/hardware/camera2/package.html
@@ -14,7 +14,7 @@
-->
<HTML>
<BODY>
-<p>The android.hardware.photography package provides an interface to
+<p>The android.hardware.camera2 package provides an interface to
individual camera devices connected to an Android device. It replaces
the deprecated {@link android.hardware.Camera} class.</p>
@@ -28,18 +28,18 @@ having multiple requests in flight is required to maintain full
framerate on most Android devices.</p>
<p>To enumerate, query, and open available camera devices, obtain a
-{@link android.hardware.photography.CameraManager} instance.</p>
+{@link android.hardware.camera2.CameraManager} instance.</p>
-<p>Individual {@link android.hardware.photography.CameraDevice
+<p>Individual {@link android.hardware.camera2.CameraDevice
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.photography.CameraProperties} object.</p>
+{@link android.hardware.camera2.CameraProperties} 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
device, with {@link
-android.hardware.photography.CameraDevice#configureOutputs}. Each
+android.hardware.camera2.CameraDevice#configureOutputs}. Each
Surface has to be pre-configured with an appropriate size and format
(if applicable) to match the sizes and formats available from the
camera device. A target Surface can be obtained from a variety of
@@ -50,19 +50,19 @@ android.media.MediaCodec}, and {@link android.media.ImageReader}.
</p>
<p>The application then needs to construct a {@link
-android.hardware.photography.CaptureRequest}, which defines all the
+android.hardware.camera2.CaptureRequest}, which defines all the
capture parameters needed by a camera device to capture a single
image. The request also lists which of the configured output Surfaces
should be used as targets for this capture. The CameraDevice has a
-{@link android.hardware.photography.CameraDevice#createCaptureRequest
+{@link android.hardware.camera2.CameraDevice#createCaptureRequest
convenience factory method} for creating a request for a given use
case which is optimized for the Android device the application is
running on.</p>
<p>Once the request has been set up, it can be handed to the
CameraDevice either for a one-shot {@link
-android.hardware.photography.CameraDevice#capture} or for an endlessly
-{@link android.hardware.photography.CameraDevice#setRepeatingRequest
+android.hardware.camera2.CameraDevice#capture} or for an endlessly
+{@link android.hardware.camera2.CameraDevice#setRepeatingRequest
repeating} use. Both methods also accept a list of requests to use as
a burst capture / repeating burst. Repeating requests have a lower
priority than captures, so a request submitted
@@ -71,7 +71,7 @@ configured will be captured as soon as the current repeat (burst)
capture completes.</p>
<p>After processing a request, the camera device will produce a {@link
-android.hardware.photography.CaptureResult} object, which contains
+android.hardware.camera2.CaptureResult} object, which contains
information about the state of the camera device at time of capture,
and the final settings used. These may vary somewhat from the request,
if rounding or resolving contradictory parameters was necessary. The
diff --git a/core/java/android/hardware/photography/utils/CameraBinderDecorator.java b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
index 1a44b97f..586c759 100644
--- a/core/java/android/hardware/photography/utils/CameraBinderDecorator.java
+++ b/core/java/android/hardware/camera2/utils/CameraBinderDecorator.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
-import static android.hardware.photography.CameraAccessException.CAMERA_DISABLED;
-import static android.hardware.photography.CameraAccessException.CAMERA_DISCONNECTED;
-import static android.hardware.photography.CameraAccessException.CAMERA_IN_USE;
+import static android.hardware.camera2.CameraAccessException.CAMERA_DISABLED;
+import static android.hardware.camera2.CameraAccessException.CAMERA_DISCONNECTED;
+import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
import android.os.DeadObjectException;
import android.os.RemoteException;
@@ -28,7 +28,7 @@ import java.lang.reflect.Method;
/**
* Translate camera service status_t return values into exceptions.
*
- * @see android.hardware.photography.utils.CameraBinderDecorator#newInstance
+ * @see android.hardware.camera2.utils.CameraBinderDecorator#newInstance
* @hide
*/
public class CameraBinderDecorator {
diff --git a/core/java/android/hardware/photography/utils/CameraRuntimeException.java b/core/java/android/hardware/camera2/utils/CameraRuntimeException.java
index 25dfc62..9ed88a9 100644
--- a/core/java/android/hardware/photography/utils/CameraRuntimeException.java
+++ b/core/java/android/hardware/camera2/utils/CameraRuntimeException.java
@@ -1,6 +1,6 @@
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
-import android.hardware.photography.CameraAccessException;
+import android.hardware.camera2.CameraAccessException;
/**
* @hide
diff --git a/core/java/android/hardware/photography/utils/Decorator.java b/core/java/android/hardware/camera2/utils/Decorator.java
index ed05dd2..5826497 100644
--- a/core/java/android/hardware/photography/utils/Decorator.java
+++ b/core/java/android/hardware/camera2/utils/Decorator.java
@@ -1,12 +1,12 @@
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
import java.lang.reflect.*;
/**
* This is an implementation of the 'decorator' design pattern using Java's proxy mechanism.
*
- * @see android.hardware.photography.utils.Decorator#newInstance
+ * @see android.hardware.camera2.utils.Decorator#newInstance
*
* @hide
*/
diff --git a/core/java/android/hardware/photography/utils/UncheckedThrow.java b/core/java/android/hardware/camera2/utils/UncheckedThrow.java
index 8eed6b1..8224fed 100644
--- a/core/java/android/hardware/photography/utils/UncheckedThrow.java
+++ b/core/java/android/hardware/camera2/utils/UncheckedThrow.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package android.hardware.photography.utils;
+package android.hardware.camera2.utils;
/**
* @hide
diff --git a/core/java/android/hardware/photography/utils/package.html b/core/java/android/hardware/camera2/utils/package.html
index 783d0a1..783d0a1 100644
--- a/core/java/android/hardware/photography/utils/package.html
+++ b/core/java/android/hardware/camera2/utils/package.html
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 84c28e6..4fc885c 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -130,7 +130,7 @@ LOCAL_SRC_FILES:= \
android_media_RemoteDisplay.cpp \
android_media_ToneGenerator.cpp \
android_hardware_Camera.cpp \
- android_hardware_photography_CameraMetadata.cpp \
+ android_hardware_camera2_CameraMetadata.cpp \
android_hardware_SensorManager.cpp \
android_hardware_SerialPort.cpp \
android_hardware_UsbDevice.cpp \
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 71395c7..91fdcc2 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -76,7 +76,7 @@ extern int register_android_opengl_jni_GLES20(JNIEnv* env);
extern int register_android_opengl_jni_GLES30(JNIEnv* env);
extern int register_android_hardware_Camera(JNIEnv *env);
-extern int register_android_hardware_photography_CameraMetadata(JNIEnv *env);
+extern int register_android_hardware_camera2_CameraMetadata(JNIEnv *env);
extern int register_android_hardware_SensorManager(JNIEnv *env);
extern int register_android_hardware_SerialPort(JNIEnv *env);
extern int register_android_hardware_UsbDevice(JNIEnv *env);
@@ -1190,7 +1190,7 @@ static const RegJNIRec gRegJNI[] = {
REG_JNI(register_android_os_MemoryFile),
REG_JNI(register_com_android_internal_os_ZygoteInit),
REG_JNI(register_android_hardware_Camera),
- REG_JNI(register_android_hardware_photography_CameraMetadata),
+ REG_JNI(register_android_hardware_camera2_CameraMetadata),
REG_JNI(register_android_hardware_SensorManager),
REG_JNI(register_android_hardware_SerialPort),
REG_JNI(register_android_hardware_UsbDevice),
diff --git a/core/jni/android_hardware_photography_CameraMetadata.cpp b/core/jni/android_hardware_camera2_CameraMetadata.cpp
index 5190a37..852c4d4 100644
--- a/core/jni/android_hardware_photography_CameraMetadata.cpp
+++ b/core/jni/android_hardware_camera2_CameraMetadata.cpp
@@ -38,7 +38,7 @@
#endif
// fully-qualified class name
-#define CAMERA_METADATA_CLASS_NAME "android/hardware/photography/CameraMetadata"
+#define CAMERA_METADATA_CLASS_NAME "android/hardware/camera2/CameraMetadata"
using namespace android;
@@ -418,7 +418,7 @@ static int find_fields(JNIEnv *env, field *fields, int count)
}
// Get all the required offsets in java class and register native functions
-int register_android_hardware_photography_CameraMetadata(JNIEnv *env)
+int register_android_hardware_camera2_CameraMetadata(JNIEnv *env)
{
// Register native functions
return AndroidRuntime::registerNativeMethods(env,
diff --git a/graphics/java/android/graphics/ImageFormat.java b/graphics/java/android/graphics/ImageFormat.java
index d64006d..7f2d9c1 100644
--- a/graphics/java/android/graphics/ImageFormat.java
+++ b/graphics/java/android/graphics/ImageFormat.java
@@ -90,13 +90,13 @@ public class ImageFormat {
* <pre> y_size = stride * height </pre>
*
* <p>For example, the {@link android.media.Image} object can provide data
- * in this format from a {@link android.hardware.photography.CameraDevice}
+ * in this format from a {@link android.hardware.camera2.CameraDevice}
* through a {@link android.media.ImageReader} object if this format is
- * supported by {@link android.hardware.photography.CameraDevice}.</p>
+ * supported by {@link android.hardware.camera2.CameraDevice}.</p>
*
* @see android.media.Image
* @see android.media.ImageReader
- * @see android.hardware.photography.CameraDevice
+ * @see android.hardware.camera2.CameraDevice
*
* @hide
*/
@@ -120,13 +120,13 @@ public class ImageFormat {
* <pre> y_size = stride * height </pre>
*
* <p>For example, the {@link android.media.Image} object can provide data
- * in this format from a {@link android.hardware.photography.CameraDevice}
+ * in this format from a {@link android.hardware.camera2.CameraDevice}
* through a {@link android.media.ImageReader} object if this format is
- * supported by {@link android.hardware.photography.CameraDevice}.</p>
+ * supported by {@link android.hardware.camera2.CameraDevice}.</p>
*
* @see android.media.Image
* @see android.media.ImageReader
- * @see android.hardware.photography.CameraDevice
+ * @see android.hardware.camera2.CameraDevice
*
* @hide
*/
@@ -172,12 +172,12 @@ public class ImageFormat {
* for each plane.</p>
*
* <p>For example, the {@link android.media.Image} object can provide data
- * in this format from a {@link android.hardware.photography.CameraDevice}
+ * in this format from a {@link android.hardware.camera2.CameraDevice}
* through a {@link android.media.ImageReader} object.</p>
*
* @see android.media.Image
* @see android.media.ImageReader
- * @see android.hardware.photography.CameraDevice
+ * @see android.hardware.camera2.CameraDevice
*/
public static final int YUV_420_888 = 0x23;
@@ -189,7 +189,7 @@ public class ImageFormat {
* <p>The layout of the color mosaic, the maximum and minimum encoding
* values of the raw pixel data, the color space of the image, and all other
* needed information to interpret a raw sensor image must be queried from
- * the {@link android.hardware.photography.CameraDevice} which produced the
+ * the {@link android.hardware.camera2.CameraDevice} which produced the
* image.</p>
*/
public static final int RAW_SENSOR = 0x20;
diff --git a/media/java/android/media/Image.java b/media/java/android/media/Image.java
index f55756c..d06eeb31 100644
--- a/media/java/android/media/Image.java
+++ b/media/java/android/media/Image.java
@@ -23,7 +23,7 @@ import java.lang.AutoCloseable;
/**
* <p>A single complete image buffer to use with a media source such as a
* {@link MediaCodec} or a
- * {@link android.hardware.photography.CameraDevice}.</p>
+ * {@link android.hardware.camera2.CameraDevice}.</p>
*
* <p>This class allows for efficient direct application access to the pixel
* data of the Image through one or more
@@ -80,7 +80,7 @@ public interface Image extends AutoCloseable {
* <td>A single plane of raw sensor image data, with 16 bits per color
* sample. The details of the layout need to be queried from the source of
* the raw sensor data, such as
- * {@link android.hardware.photography.CameraDevice}.
+ * {@link android.hardware.camera2.CameraDevice}.
* </td>
* </tr>
* </table>
diff --git a/media/java/android/media/ImageReader.java b/media/java/android/media/ImageReader.java
index 8f09b54..90e01de 100644
--- a/media/java/android/media/ImageReader.java
+++ b/media/java/android/media/ImageReader.java
@@ -32,7 +32,7 @@ import java.nio.ByteOrder;
*
* <p>Several Android media API classes accept Surface objects as targets to
* render to, including {@link MediaPlayer}, {@link MediaCodec},
- * {@link android.hardware.photography.CameraDevice}, and
+ * {@link android.hardware.camera2.CameraDevice}, and
* {@link android.renderscript.Allocation RenderScript Allocations}. The image
* sizes and formats that can be used with each source vary, and should be
* checked in the documentation for the specific API.</p>
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
index bc3adc9..4053666 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java
@@ -22,9 +22,9 @@ import android.hardware.ICameraClient;
import android.hardware.ICameraServiceListener;
import android.hardware.IProCameraCallbacks;
import android.hardware.IProCameraUser;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.ICameraDeviceCallbacks;
-import android.hardware.photography.ICameraDeviceUser;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.ICameraDeviceCallbacks;
+import android.hardware.camera2.ICameraDeviceUser;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
index a9a0757..acd76d5 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java
@@ -17,18 +17,18 @@
package com.android.mediaframeworktest.integration;
import android.graphics.SurfaceTexture;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.CameraPropertiesKeys;
-import android.hardware.photography.CaptureRequest;
-import android.hardware.photography.ICameraDeviceCallbacks;
-import android.hardware.photography.ICameraDeviceUser;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.CameraPropertiesKeys;
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.ICameraDeviceCallbacks;
+import android.hardware.camera2.ICameraDeviceUser;
import android.os.RemoteException;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
import android.view.Surface;
-import static android.hardware.photography.CameraDevice.TEMPLATE_PREVIEW;
+import static android.hardware.camera2.CameraDevice.TEMPLATE_PREVIEW;
import com.android.mediaframeworktest.MediaFrameworkIntegrationTestRunner;
import com.android.mediaframeworktest.integration.CameraBinderTest.DummyBase;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
index 131441b..ecf01d9 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java
@@ -20,11 +20,11 @@ import android.os.Parcel;
import android.test.suitebuilder.annotation.SmallTest;
import android.graphics.ImageFormat;
import android.graphics.Rect;
-import android.hardware.photography.CameraMetadata;
-import android.hardware.photography.Rational;
-import android.hardware.photography.Size;
+import android.hardware.camera2.CameraMetadata;
+import android.hardware.camera2.Rational;
+import android.hardware.camera2.Size;
-import static android.hardware.photography.CameraMetadata.*;
+import static android.hardware.camera2.CameraMetadata.*;
import java.lang.reflect.Array;
import java.nio.ByteBuffer;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java
index 7c48992..727af78 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java
@@ -16,17 +16,17 @@
package com.android.mediaframeworktest.unit;
-import android.hardware.photography.CameraAccessException;
-import android.hardware.photography.utils.CameraBinderDecorator;
-import android.hardware.photography.utils.CameraRuntimeException;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.utils.CameraBinderDecorator;
+import android.hardware.camera2.utils.CameraRuntimeException;
import android.os.DeadObjectException;
import android.os.RemoteException;
import android.os.TransactionTooLargeException;
import android.test.suitebuilder.annotation.SmallTest;
import static org.mockito.Mockito.*;
-import static android.hardware.photography.utils.CameraBinderDecorator.*;
-import static android.hardware.photography.CameraAccessException.*;
+import static android.hardware.camera2.utils.CameraBinderDecorator.*;
+import static android.hardware.camera2.CameraAccessException.*;
import junit.framework.Assert;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java
index bae17fa..c3b6006 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java
@@ -17,8 +17,8 @@
package com.android.mediaframeworktest.unit;
import android.test.suitebuilder.annotation.SmallTest;
-import android.hardware.photography.utils.*;
-import android.hardware.photography.utils.Decorator.DecoratorListener;
+import android.hardware.camera2.utils.*;
+import android.hardware.camera2.utils.Decorator.DecoratorListener;
import junit.framework.Assert;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java
index 8c2dd4d..02c9f2a 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java
@@ -16,9 +16,9 @@
package com.android.mediaframeworktest.unit;
-import android.hardware.photography.CameraAccessException;
-import android.hardware.photography.utils.CameraRuntimeException;
-import android.hardware.photography.utils.UncheckedThrow;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.utils.CameraRuntimeException;
+import android.hardware.camera2.utils.UncheckedThrow;
import android.test.suitebuilder.annotation.SmallTest;
import junit.framework.Assert;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java
index cbe123c..b648763 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java
@@ -16,8 +16,8 @@
package com.android.mediaframeworktest.unit;
-import android.hardware.photography.CameraAccessException;
-import android.hardware.photography.utils.UncheckedThrow;
+import android.hardware.camera2.CameraAccessException;
+import android.hardware.camera2.utils.UncheckedThrow;
import android.test.suitebuilder.annotation.SmallTest;
import junit.framework.Assert;
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java
index c15d030..926719c 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java
@@ -17,7 +17,7 @@
package com.android.mediaframeworktest.unit;
import android.test.suitebuilder.annotation.SmallTest;
-import android.hardware.photography.Rational;
+import android.hardware.camera2.Rational;
/**
* <pre>