From 7f95a00ec0ed9d48579e758249e7ffb06371b2b8 Mon Sep 17 00:00:00 2001 From: Todd Kennedy Date: Wed, 22 Apr 2015 14:28:25 -0700 Subject: Add hardware feature describing a car We need to define a hardware feature for when Android is running embedded on a vehicle's headunit. This is not applicable when running Android on a phone and projecting onto a headunit. Bug: 20016089 Change-Id: I70e94564f7493afe70a49bf582a627c5ea9f0a60 --- api/current.txt | 1 + api/system-current.txt | 1 + core/java/android/content/pm/PackageManager.java | 15 +++++++++++++++ 3 files changed, 17 insertions(+) diff --git a/api/current.txt b/api/current.txt index baadf5d..92bc275 100644 --- a/api/current.txt +++ b/api/current.txt @@ -9311,6 +9311,7 @@ package android.content.pm { field public static final java.lang.String FEATURE_APP_WIDGETS = "android.software.app_widgets"; field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency"; field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output"; + field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive"; field public static final java.lang.String FEATURE_BACKUP = "android.software.backup"; field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth"; field public static final java.lang.String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le"; diff --git a/api/system-current.txt b/api/system-current.txt index d3be68b..fbce46b 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -9570,6 +9570,7 @@ package android.content.pm { field public static final java.lang.String FEATURE_APP_WIDGETS = "android.software.app_widgets"; field public static final java.lang.String FEATURE_AUDIO_LOW_LATENCY = "android.hardware.audio.low_latency"; field public static final java.lang.String FEATURE_AUDIO_OUTPUT = "android.hardware.audio.output"; + field public static final java.lang.String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive"; field public static final java.lang.String FEATURE_BACKUP = "android.software.backup"; field public static final java.lang.String FEATURE_BLUETOOTH = "android.hardware.bluetooth"; field public static final java.lang.String FEATURE_BLUETOOTH_LE = "android.hardware.bluetooth_le"; diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java index a0cec50..e4108b1 100644 --- a/core/java/android/content/pm/PackageManager.java +++ b/core/java/android/content/pm/PackageManager.java @@ -1574,6 +1574,21 @@ public abstract class PackageManager { /** * Feature for {@link #getSystemAvailableFeatures} and * {@link #hasSystemFeature}: This is a device dedicated to showing UI + * on a vehicle headunit. A headunit here is defined to be inside a + * vehicle that may or may not be moving. A headunit uses either a + * primary display in the center console and/or additional displays in + * the instrument cluster or elsewhere in the vehicle. Headunit display(s) + * have limited size and resolution. The user will likely be focused on + * driving so limiting driver distraction is a primary concern. User input + * can be a variety of hard buttons, touch, rotary controllers and even mouse- + * like interfaces. + */ + @SdkConstant(SdkConstantType.FEATURE) + public static final String FEATURE_AUTOMOTIVE = "android.hardware.type.automotive"; + + /** + * Feature for {@link #getSystemAvailableFeatures} and + * {@link #hasSystemFeature}: This is a device dedicated to showing UI * on a television. Television here is defined to be a typical living * room television experience: displayed on a big screen, where the user * is sitting far away from it, and the dominant form of input will be -- cgit v1.1