From 9131da28e17856fa583d42ea23da211f7689487f Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 8 May 2014 11:39:53 -0700 Subject: Add android.hardware.camera.external feature. This feature will be listed by Android devices that allow for an external camera to be connected to it. Such camera devices may not always be available or connected. Also clarify that android.hardware.camera.any also encompasses devices that list android.hardware.camera.external. Change-Id: I57497758877e4286c1f0116961731d483b56808f --- api/current.txt | 1 + core/java/android/content/pm/PackageManager.java | 10 +++++++++- docs/html/guide/topics/manifest/uses-feature-element.jd | 11 ++++++++--- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/api/current.txt b/api/current.txt index 1c9f871c30e4..07c05a7ff5d3 100644 --- a/api/current.txt +++ b/api/current.txt @@ -8038,6 +8038,7 @@ package android.content.pm { field public static final java.lang.String FEATURE_CAMERA = "android.hardware.camera"; field public static final java.lang.String FEATURE_CAMERA_ANY = "android.hardware.camera.any"; field public static final java.lang.String FEATURE_CAMERA_AUTOFOCUS = "android.hardware.camera.autofocus"; + field public static final java.lang.String FEATURE_CAMERA_EXTERNAL = "android.hardware.camera.external"; field public static final java.lang.String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash"; field public static final java.lang.String FEATURE_CAMERA_FRONT = "android.hardware.camera.front"; field public static final java.lang.String FEATURE_CONSUMER_IR = "android.hardware.consumerir"; diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index 1a003ff34132..d47e83a00647 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -936,11 +936,19 @@ public abstract class PackageManager { /** * Feature for {@link #getSystemAvailableFeatures} and * {@link #hasSystemFeature}: The device has at least one camera pointing in - * some direction. + * some direction, or can support an external camera being connected to it. */ @SdkConstant(SdkConstantType.FEATURE) public static final String FEATURE_CAMERA_ANY = "android.hardware.camera.any"; + /** + * Feature for {@link #getSystemAvailableFeatures} and + * {@link #hasSystemFeature}: The device can support having an external camera connected to it. + * The external camera may not always be connected or available to applications to use. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_CAMERA_EXTERNAL = "android.hardware.camera.external"; + /** * Feature for {@link #getSystemAvailableFeatures} and * {@link #hasSystemFeature}: The device's camera supports flash. diff --git a/docs/html/guide/topics/manifest/uses-feature-element.jd b/docs/html/guide/topics/manifest/uses-feature-element.jd index 4057736c2715..6143b4b6a61d 100644 --- a/docs/html/guide/topics/manifest/uses-feature-element.jd +++ b/docs/html/guide/topics/manifest/uses-feature-element.jd @@ -584,9 +584,14 @@ is sensitive to delays or lag in sound input or output. android.hardware.camera.any - The application uses at least one camera facing in any direction. Use this -in preference to android.hardware.camera if a back-facing camera is -not required. + The application uses at least one camera facing in any direction, or an +external camera device if one is connected. Use this in preference to +android.hardware.camera if a back-facing camera is not required. + + + + android.hardware.camera.external + The application uses an external camera device if one is connected. -- cgit v1.2.3-59-g8ed1b