Loading core/res/res/values/config.xml +0 −13 Original line number Diff line number Diff line Loading @@ -470,19 +470,6 @@ provide full support for multiple displays. --> <integer name="config_undockedHdmiRotation">-1</integer> <!-- HDMI-CEC logical device types allowed on the system. Logical device types are defined in HDMI-CEC standard 1.4 as follows: 0 TV 1 Recording Device 2 Reserved 3 Tuner 4 Playback 5 Audio System 6 Pure CEC Switch 7 Video Processor --> <integer-array name="config_hdmiCecLogicalDeviceType"> </integer-array> <!-- Control the default UI mode type to use when there is no other type override happening. One of the following values (See Configuration.java): 1 UI_MODE_TYPE_NORMAL Loading core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -1328,7 +1328,6 @@ <java-symbol type="anim" name="voice_activity_open_exit" /> <java-symbol type="anim" name="voice_activity_open_enter" /> <java-symbol type="array" name="config_hdmiCecLogicalDeviceType" /> <java-symbol type="array" name="config_keyboardTapVibePattern" /> <java-symbol type="array" name="config_longPressVibePattern" /> <java-symbol type="array" name="config_safeModeDisabledVibePattern" /> Loading services/core/java/com/android/server/hdmi/Constants.java +5 −0 Original line number Diff line number Diff line Loading @@ -265,5 +265,10 @@ final class Constants { static final int MHL_CBUS_MODE_ECBUS_S = 2; static final int MHL_CBUS_MODE_ECBUS_D = 3; // Property name for the local device configurations. // TODO(OEM): OEM should provide this property, and the value is the comma separated integer // values which denotes the device type in HDMI Spec 1.4. static final String PROPERTY_DEVICE_TYPE = "ro.hdmi.device_type"; private Constants() { /* cannot be instantiated */ } } services/core/java/com/android/server/hdmi/HdmiControlService.java +18 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.hdmi; import static com.android.server.hdmi.Constants.DISABLED; import static com.android.server.hdmi.Constants.ENABLED; import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_DEVICE_OFF; import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_WAKEUP; import static com.android.server.hdmi.Constants.OPTION_CEC_ENABLE; import static com.android.server.hdmi.Constants.OPTION_CEC_SERVICE_CONTROL; Loading @@ -33,8 +32,8 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.database.ContentObserver; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.HdmiControlManager; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.HdmiHotplugEvent; import android.hardware.hdmi.HdmiPortInfo; import android.hardware.hdmi.IHdmiControlCallback; Loading @@ -55,8 +54,10 @@ import android.os.Looper; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings.Global; import android.text.TextUtils; import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -244,11 +245,24 @@ public final class HdmiControlService extends SystemService { public HdmiControlService(Context context) { super(context); mLocalDevices = HdmiUtils.asImmutableList(getContext().getResources().getIntArray( com.android.internal.R.array.config_hdmiCecLogicalDeviceType)); mLocalDevices = getIntList(SystemProperties.get(Constants.PROPERTY_DEVICE_TYPE)); mSettingsObserver = new SettingsObserver(mHandler); } private static List<Integer> getIntList(String string) { ArrayList<Integer> list = new ArrayList<>(); TextUtils.SimpleStringSplitter splitter = new TextUtils.SimpleStringSplitter(','); splitter.setString(string); for (String item : splitter) { try { list.add(Integer.parseInt(item)); } catch (NumberFormatException e) { Slog.w(TAG, "Can't parseInt: " + item); } } return Collections.unmodifiableList(list); } @Override public void onStart() { mIoThread.start(); Loading Loading
core/res/res/values/config.xml +0 −13 Original line number Diff line number Diff line Loading @@ -470,19 +470,6 @@ provide full support for multiple displays. --> <integer name="config_undockedHdmiRotation">-1</integer> <!-- HDMI-CEC logical device types allowed on the system. Logical device types are defined in HDMI-CEC standard 1.4 as follows: 0 TV 1 Recording Device 2 Reserved 3 Tuner 4 Playback 5 Audio System 6 Pure CEC Switch 7 Video Processor --> <integer-array name="config_hdmiCecLogicalDeviceType"> </integer-array> <!-- Control the default UI mode type to use when there is no other type override happening. One of the following values (See Configuration.java): 1 UI_MODE_TYPE_NORMAL Loading
core/res/res/values/symbols.xml +0 −1 Original line number Diff line number Diff line Loading @@ -1328,7 +1328,6 @@ <java-symbol type="anim" name="voice_activity_open_exit" /> <java-symbol type="anim" name="voice_activity_open_enter" /> <java-symbol type="array" name="config_hdmiCecLogicalDeviceType" /> <java-symbol type="array" name="config_keyboardTapVibePattern" /> <java-symbol type="array" name="config_longPressVibePattern" /> <java-symbol type="array" name="config_safeModeDisabledVibePattern" /> Loading
services/core/java/com/android/server/hdmi/Constants.java +5 −0 Original line number Diff line number Diff line Loading @@ -265,5 +265,10 @@ final class Constants { static final int MHL_CBUS_MODE_ECBUS_S = 2; static final int MHL_CBUS_MODE_ECBUS_D = 3; // Property name for the local device configurations. // TODO(OEM): OEM should provide this property, and the value is the comma separated integer // values which denotes the device type in HDMI Spec 1.4. static final String PROPERTY_DEVICE_TYPE = "ro.hdmi.device_type"; private Constants() { /* cannot be instantiated */ } }
services/core/java/com/android/server/hdmi/HdmiControlService.java +18 −4 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ package com.android.server.hdmi; import static com.android.server.hdmi.Constants.DISABLED; import static com.android.server.hdmi.Constants.ENABLED; import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_DEVICE_OFF; import static com.android.server.hdmi.Constants.OPTION_CEC_AUTO_WAKEUP; import static com.android.server.hdmi.Constants.OPTION_CEC_ENABLE; import static com.android.server.hdmi.Constants.OPTION_CEC_SERVICE_CONTROL; Loading @@ -33,8 +32,8 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.database.ContentObserver; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.HdmiControlManager; import android.hardware.hdmi.HdmiDeviceInfo; import android.hardware.hdmi.HdmiHotplugEvent; import android.hardware.hdmi.HdmiPortInfo; import android.hardware.hdmi.IHdmiControlCallback; Loading @@ -55,8 +54,10 @@ import android.os.Looper; import android.os.PowerManager; import android.os.RemoteException; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.provider.Settings.Global; import android.text.TextUtils; import android.util.ArraySet; import android.util.Slog; import android.util.SparseArray; Loading Loading @@ -244,11 +245,24 @@ public final class HdmiControlService extends SystemService { public HdmiControlService(Context context) { super(context); mLocalDevices = HdmiUtils.asImmutableList(getContext().getResources().getIntArray( com.android.internal.R.array.config_hdmiCecLogicalDeviceType)); mLocalDevices = getIntList(SystemProperties.get(Constants.PROPERTY_DEVICE_TYPE)); mSettingsObserver = new SettingsObserver(mHandler); } private static List<Integer> getIntList(String string) { ArrayList<Integer> list = new ArrayList<>(); TextUtils.SimpleStringSplitter splitter = new TextUtils.SimpleStringSplitter(','); splitter.setString(string); for (String item : splitter) { try { list.add(Integer.parseInt(item)); } catch (NumberFormatException e) { Slog.w(TAG, "Can't parseInt: " + item); } } return Collections.unmodifiableList(list); } @Override public void onStart() { mIoThread.start(); Loading