Merge "HDMI: Ignore <Set Menu Language> from non-TV devices" into main
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
index a23c08a..d876a38 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java
@@ -198,7 +198,7 @@
addValidationInfo(Constants.MESSAGE_CEC_VERSION,
oneByteValidator, ADDR_NOT_UNREGISTERED, ADDR_DIRECT);
addValidationInfo(Constants.MESSAGE_SET_MENU_LANGUAGE,
- new AsciiValidator(3), ADDR_NOT_UNREGISTERED, ADDR_BROADCAST);
+ new AsciiValidator(3), ADDR_TV, ADDR_BROADCAST);
ParameterValidator statusRequestValidator = new MinimumOneByteRangeValidator(0x01, 0x03);
addValidationInfo(Constants.MESSAGE_DECK_CONTROL,
diff --git a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
index 0aa72d0..98e119c 100644
--- a/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
+++ b/services/tests/servicestests/src/com/android/server/hdmi/HdmiCecMessageValidatorTest.java
@@ -184,13 +184,13 @@
@Test
public void isValid_setMenuLanguage() {
- assertMessageValidity("4F:32:53:50:41").isEqualTo(OK);
+ assertMessageValidity("0F:32:53:50:41").isEqualTo(OK);
assertMessageValidity("0F:32:45:4E:47:8C:49:D3:48").isEqualTo(OK);
- assertMessageValidity("40:32:53:50:41").isEqualTo(ERROR_DESTINATION);
- assertMessageValidity("F0:32").isEqualTo(ERROR_SOURCE);
- assertMessageValidity("4F:32:45:55").isEqualTo(ERROR_PARAMETER_SHORT);
- assertMessageValidity("4F:32:19:7F:83").isEqualTo(ERROR_PARAMETER);
+ assertMessageValidity("04:32:53:50:41").isEqualTo(ERROR_DESTINATION);
+ assertMessageValidity("40:32").isEqualTo(ERROR_SOURCE);
+ assertMessageValidity("0F:32:45:55").isEqualTo(ERROR_PARAMETER_SHORT);
+ assertMessageValidity("0F:32:19:7F:83").isEqualTo(ERROR_PARAMETER);
}
@Test