OSDN Git Service

Add the system feature for HDMI-CEC.
authorYuncheol Heo <ycheo@google.com>
Thu, 10 Jul 2014 11:49:27 +0000 (20:49 +0900)
committerYuncheol Heo <ycheo@google.com>
Sat, 12 Jul 2014 02:13:48 +0000 (11:13 +0900)
Change-Id: I2a985cedf49d50649c89f2ac5fbb80a81300156d

core/java/android/content/pm/PackageManager.java
services/java/com/android/server/SystemServer.java

index 7e783eb..03d4701 100644 (file)
@@ -1454,6 +1454,14 @@ public abstract class PackageManager {
     public static final String FEATURE_ETHERNET = "android.hardware.ethernet";
 
     /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: This device supports HDMI-CEC.
+     * @hide
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_HDMI_CEC = "android.hardware.hdmi.cec";
+
+    /**
      * Action to external storage service to clean out removed apps.
      * @hide
      */
index e0ebd54..8d38827 100644 (file)
@@ -910,7 +910,9 @@ public final class SystemServer {
 
             mSystemServiceManager.startService(MediaSessionService.class);
 
-            mSystemServiceManager.startService(HdmiControlService.class);
+            if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_HDMI_CEC)) {
+                mSystemServiceManager.startService(HdmiControlService.class);
+            }
 
             mSystemServiceManager.startService(TvInputManagerService.class);