Loading services/core/java/com/android/server/hdmi/Constants.java +3 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,9 @@ final class Constants { // True by default. static final String PROPERTY_WAKE_ON_HOTPLUG = "ro.hdmi.wake_on_hotplug"; // TODO(OEM): Set this to true to enable 'Set Menu Language' feature. False by default. static final String PROPERTY_SET_MENU_LANGUAGE = "ro.hdmi.set_menu_language"; // Set to false to allow playback device to go to suspend mode even // when it's an active source. True by default. static final String PROPERTY_KEEP_AWAKE = "persist.sys.hdmi.keep_awake"; Loading services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +7 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { private static final boolean WAKE_ON_HOTPLUG = SystemProperties.getBoolean(Constants.PROPERTY_WAKE_ON_HOTPLUG, true); private static final boolean SET_MENU_LANGUAGE = SystemProperties.getBoolean(Constants.PROPERTY_SET_MENU_LANGUAGE, false); private boolean mIsActiveSource = false; // Used to keep the device awake while it is the active source. For devices that Loading Loading @@ -316,6 +319,9 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { @ServiceThreadOnly protected boolean handleSetMenuLanguage(HdmiCecMessage message) { assertRunOnServiceThread(); if (!SET_MENU_LANGUAGE) { return false; } try { String iso3Language = new String(message.getParams(), 0, 3, "US-ASCII"); Loading Loading @@ -345,6 +351,7 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { Slog.w(TAG, "Can't handle <Set Menu Language> of " + iso3Language); return false; } catch (UnsupportedEncodingException e) { Slog.w(TAG, "Can't handle <Set Menu Language>", e); return false; } } Loading Loading
services/core/java/com/android/server/hdmi/Constants.java +3 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,9 @@ final class Constants { // True by default. static final String PROPERTY_WAKE_ON_HOTPLUG = "ro.hdmi.wake_on_hotplug"; // TODO(OEM): Set this to true to enable 'Set Menu Language' feature. False by default. static final String PROPERTY_SET_MENU_LANGUAGE = "ro.hdmi.set_menu_language"; // Set to false to allow playback device to go to suspend mode even // when it's an active source. True by default. static final String PROPERTY_KEEP_AWAKE = "persist.sys.hdmi.keep_awake"; Loading
services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +7 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,9 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { private static final boolean WAKE_ON_HOTPLUG = SystemProperties.getBoolean(Constants.PROPERTY_WAKE_ON_HOTPLUG, true); private static final boolean SET_MENU_LANGUAGE = SystemProperties.getBoolean(Constants.PROPERTY_SET_MENU_LANGUAGE, false); private boolean mIsActiveSource = false; // Used to keep the device awake while it is the active source. For devices that Loading Loading @@ -316,6 +319,9 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { @ServiceThreadOnly protected boolean handleSetMenuLanguage(HdmiCecMessage message) { assertRunOnServiceThread(); if (!SET_MENU_LANGUAGE) { return false; } try { String iso3Language = new String(message.getParams(), 0, 3, "US-ASCII"); Loading Loading @@ -345,6 +351,7 @@ final class HdmiCecLocalDevicePlayback extends HdmiCecLocalDevice { Slog.w(TAG, "Can't handle <Set Menu Language> of " + iso3Language); return false; } catch (UnsupportedEncodingException e) { Slog.w(TAG, "Can't handle <Set Menu Language>", e); return false; } } Loading