diff options
author | Yuncheol Heo <ycheo@google.com> | 2014-09-12 07:17:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-12 07:17:32 +0000 |
commit | 753fcc8a8a25b2a8625957b2edcad0af77dfd5e5 (patch) | |
tree | be897c9158affc5076f342558a9a9bbcd479606e /services | |
parent | a871d7e0030a73daf24329ff7e0b8e36fb89412a (diff) | |
parent | 184b124ec22a796327642e3546d366179e693f07 (diff) | |
download | frameworks_base-753fcc8a8a25b2a8625957b2edcad0af77dfd5e5.zip frameworks_base-753fcc8a8a25b2a8625957b2edcad0af77dfd5e5.tar.gz frameworks_base-753fcc8a8a25b2a8625957b2edcad0af77dfd5e5.tar.bz2 |
Merge "Handle <Menu Status> message." into lmp-dev
Diffstat (limited to 'services')
3 files changed, 17 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java index c00c5d0..2f36181 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java @@ -263,7 +263,9 @@ abstract class HdmiCecLocalDevice { case Constants.MESSAGE_GIVE_DEVICE_POWER_STATUS: return handleGiveDevicePowerStatus(message); case Constants.MESSAGE_MENU_REQUEST: - return handleGiveDeviceMenuStatus(message); + return handleMenuRequest(message); + case Constants.MESSAGE_MENU_STATUS: + return handleMenuStatus(message); case Constants.MESSAGE_VENDOR_COMMAND: return handleVendorCommand(message); case Constants.MESSAGE_VENDOR_COMMAND_WITH_ID: @@ -503,13 +505,17 @@ abstract class HdmiCecLocalDevice { return true; } - protected boolean handleGiveDeviceMenuStatus(HdmiCecMessage message) { + protected boolean handleMenuRequest(HdmiCecMessage message) { // Always report menu active to receive Remote Control. mService.sendCecCommand(HdmiCecMessageBuilder.buildReportMenuStatus( mAddress, message.getSource(), Constants.MENU_STATE_ACTIVATED)); return true; } + protected boolean handleMenuStatus(HdmiCecMessage message) { + return false; + } + protected boolean handleVendorCommand(HdmiCecMessage message) { mService.invokeVendorCommandListeners(mDeviceType, message.getSource(), message.getParams(), false); diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java index 58ccbdb..c9b7b45 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java @@ -1646,6 +1646,12 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice { } @Override + protected boolean handleMenuStatus(HdmiCecMessage message) { + // Do nothing and just return true not to prevent from responding <Feature Abort>. + return true; + } + + @Override protected void dump(final IndentingPrintWriter pw) { super.dump(pw); pw.println("mArcEstablished: " + mArcEstablished); diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java index 7c42d30..d703989 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageValidator.java @@ -145,7 +145,9 @@ public final class HdmiCecMessageValidator { addValidationInfo(Constants.MESSAGE_SET_OSD_STRING, maxLengthValidator, DEST_DIRECT); addValidationInfo(Constants.MESSAGE_SET_OSD_NAME, maxLengthValidator, DEST_DIRECT); - // TODO: Handle messages for the Device Menu Control. + // Messages for the Device Menu Control. + addValidationInfo(Constants.MESSAGE_MENU_REQUEST, oneByteValidator, DEST_DIRECT); + addValidationInfo(Constants.MESSAGE_MENU_STATUS, oneByteValidator, DEST_DIRECT); // Messages for the Remote Control Passthrough. // TODO: Parse the first parameter and determine if it can have the next parameter. |