diff options
| author | 2013-07-25 17:12:05 -0700 | |
|---|---|---|
| committer | 2013-07-30 11:37:31 -0700 | |
| commit | 2f1a2e423e0fbb64467d6fcfa4e82c6384f31210 (patch) | |
| tree | 84d91887a953c9a0bf5ca6d1ca112c8ab82bc08f | |
| parent | 39dd5a62ae4348e941c8351635e61dc065b2ced7 (diff) | |
Camera2 API: Rename package to android.hardware.camera2
Change-Id: I77b7939e199f9fe8e12a59393c24cff08097448c
| -rw-r--r-- | Android.mk | 4 | ||||
| -rw-r--r-- | api/current.txt | 272 | ||||
| -rw-r--r-- | core/java/android/app/ContextImpl.java | 2 | ||||
| -rw-r--r-- | core/java/android/content/Context.java | 2 | ||||
| -rw-r--r-- | core/java/android/hardware/ICameraService.aidl | 4 | ||||
| -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.mk | 2 | ||||
| -rw-r--r-- | core/jni/AndroidRuntime.cpp | 4 | ||||
| -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.java | 18 | ||||
| -rw-r--r-- | media/java/android/media/Image.java | 4 | ||||
| -rw-r--r-- | media/java/android/media/ImageReader.java | 2 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraBinderTest.java | 6 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/integration/CameraDeviceBinderTest.java | 12 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraMetadataTest.java | 8 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsBinderDecoratorTest.java | 10 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsDecoratorTest.java | 4 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsRuntimeExceptionTest.java | 6 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/CameraUtilsUncheckedThrowTest.java | 4 | ||||
| -rw-r--r-- | media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/RationalTest.java | 2 |
47 files changed, 275 insertions, 275 deletions
diff --git a/Android.mk b/Android.mk index f5b1cd996344..74cf8244223e 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 d61f0d2108b0..b9f9804caaa8 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 eeee57d12af9..ab1190334eb0 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 aa326adb498f..0b1127c98ad5 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 2d0c09945482..81e564e16401 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 fac5086faa5c..0089f26af325 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 0852025486ce..422d82781ad3 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 c1c9435d76db..0f7c93095300 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 b4dc9ac418dc..71dd47117840 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 c024c054678e..e7f34d808769 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 2ed4e3a986c0..89e1f2a33294 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 db8ab441ba17..41b31fffb869 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 64fb6f270927..0b7d5ba243ae 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 d4a7a3c1d84e..15ba12c32e5b 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 ca6d487753b3..17de8f09a5d7 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 2fdd4664beba..11c991a8379d 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 493156491fa6..dd3ed830928e 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 c50680046058..9f569cb1edb8 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 571f50adace5..5a9b72f65b7a 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 66e533e53bc3..7ccc5556a8a3 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 499fd5648578..45aaeaef45a2 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 5cb75250d377..9587680a41d9 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 a70784dac5ed..a934d752e763 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 d6636acfef15..384223c337b6 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 430219c71a1c..793bba730732 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 81123ee7534e..50b33472a559 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 783d0a1b54d5..783d0a1b54d5 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 578bdf5cd5dd..e9d9ceab099a 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 1a44b97f8e43..586c759a5e15 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 25dfc621bf5a..9ed88a9e1c55 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 ed05dd21b9eb..582649712f91 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 8eed6b1b5847..8224fedba071 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 783d0a1b54d5..783d0a1b54d5 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 84c28e6423e0..4fc885c509da 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 71395c717e45..91fdcc2cf180 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 5190a375b7ac..852c4d4293e3 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 d64006d16049..7f2d9c1ea307 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 f55756c62a32..d06eeb31c561 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 8f09b54bdad0..90e01def9c5b 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 bc3adc92a2e1..4053666661be 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 a9a0757e2cd9..acd76d5e1921 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 131441bc4e63..ecf01d91211f 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 7c489921812d..727af781bd04 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 bae17fa72741..c3b60065916c 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 8c2dd4daf727..02c9f2af11ad 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 cbe123c94e3c..b648763db9e9 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 c15d030335cb..926719c691a1 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> |