diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2014-07-10 17:29:38 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2014-07-17 10:58:16 -0700 |
commit | 611fecec08eb9efeb4393b986d590369df5c812f (patch) | |
tree | 1bc565f11704de5eaabc3b671449577ee52ec8b9 /core/java | |
parent | ef7d656d44ae92f1b525cf05947f8f857cfff2bd (diff) | |
download | frameworks_base-611fecec08eb9efeb4393b986d590369df5c812f.zip frameworks_base-611fecec08eb9efeb4393b986d590369df5c812f.tar.gz frameworks_base-611fecec08eb9efeb4393b986d590369df5c812f.tar.bz2 |
Add PackageManager features for differentiating camera2 devices
Also rename DNG capability to RAW.
Bug: 15415688
Change-Id: I1ea9f65b03c4fa06a5004f9d1d485935742001c8
Diffstat (limited to 'core/java')
3 files changed, 50 insertions, 9 deletions
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 37df29a..ee7810d 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -1033,6 +1033,45 @@ public abstract class PackageManager { public static final String FEATURE_CAMERA_FRONT = "android.hardware.camera.front"; /** + * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: At least one + * of the cameras on the device supports the + * {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL full hardware} + * capability level. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CAMERA_LEVEL_FULL = "android.hardware.camera.level.full"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: At least one + * of the cameras on the device supports the + * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR manual sensor} + * capability level. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_SENSOR = + "android.hardware.camera.capability.manual_sensor"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: At least one + * of the cameras on the device supports the + * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING manual post-processing} + * capability level. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CAMERA_CAPABILITY_MANUAL_POST_PROCESSING = + "android.hardware.camera.capability.manual_post_processing"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}: At least one + * of the cameras on the device supports the + * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW RAW} + * capability level. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CAMERA_CAPABILITY_RAW = + "android.hardware.camera.capability.raw"; + + /** * Feature for {@link #getSystemAvailableFeatures} and * {@link #hasSystemFeature}: The device is capable of communicating with * consumer IR devices. diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 4976a48..ff86120 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -887,7 +887,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING - * @see #REQUEST_AVAILABLE_CAPABILITIES_DNG + * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW */ public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = new Key<int[]>("android.request.availableCapabilities", int[].class); @@ -1068,17 +1068,17 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * <tr> * <td align="left">RAW_OPAQUE</td> * <td align="left">RAW16</td> - * <td align="left">DNG</td> + * <td align="left">RAW</td> * </tr> * <tr> * <td align="left">RAW16</td> * <td align="left">YUV_420_888</td> - * <td align="left">DNG</td> + * <td align="left">RAW</td> * </tr> * <tr> * <td align="left">RAW16</td> * <td align="left">JPEG</td> - * <td align="left">DNG</td> + * <td align="left">RAW</td> * </tr> * </tbody> * </table> diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 36b1089..63130a7 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -387,8 +387,11 @@ public abstract class CameraMetadata<TKey> { public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; /** - * <p>The camera device supports outputting RAW buffers that can be - * saved offline into a DNG format.</p> + * <p>The camera device supports outputting RAW buffers and + * metadata for interpreting them.</p> + * <p>Devices supporting the RAW capability allow both for + * saving DNG files, and for direct application processing of + * raw sensor images.</p> * <ul> * <li>RAW_SENSOR is supported as an output format.</li> * <li>The maximum available resolution for RAW_SENSOR streams @@ -403,7 +406,7 @@ public abstract class CameraMetadata<TKey> { * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ - public static final int REQUEST_AVAILABLE_CAPABILITIES_DNG = 3; + public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; /** * <p>The camera device supports the Zero Shutter Lag use case.</p> @@ -1186,8 +1189,7 @@ public abstract class CameraMetadata<TKey> { * image while recording video) use case.</p> * <p>The camera device should take the highest-quality image * possible (given the other settings) without disrupting the - * frame rate of video recording.<br /> - * </p> + * frame rate of video recording. </p> * @see CaptureRequest#CONTROL_CAPTURE_INTENT */ public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4; |