diff options
6 files changed, 25 insertions, 13 deletions
diff --git a/api/current.txt b/api/current.txt index 3d6d41c..d3996e4 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12476,16 +12476,17 @@ package android.hardware.hdmi { field public static final int MESSAGE_FEATURE_ABORT = 0; // 0x0 field public static final int MESSAGE_GET_CEC_VERSION = 159; // 0x9f field public static final int MESSAGE_GET_MENU_LANGUAGE = 145; // 0x91 - field public static final int MESSAGE_GET_OSD_NAME = 70; // 0x46 field public static final int MESSAGE_GIVE_AUDIO_STATUS = 113; // 0x71 field public static final int MESSAGE_GIVE_DECK_STATUS = 26; // 0x1a field public static final int MESSAGE_GIVE_DEVICE_POWER_STATUS = 143; // 0x8f field public static final int MESSAGE_GIVE_DEVICE_VENDOR_ID = 140; // 0x8c + field public static final int MESSAGE_GIVE_OSD_NAME = 70; // 0x46 field public static final int MESSAGE_GIVE_PHYSICAL_ADDRESS = 131; // 0x83 field public static final int MESSAGE_GIVE_SYSTEM_AUDIO_MODE_STATUS = 125; // 0x7d field public static final int MESSAGE_GIVE_TUNER_DEVICE_STATUS = 8; // 0x8 field public static final int MESSAGE_IMAGE_VIEW_ON = 4; // 0x4 field public static final int MESSAGE_INACTIVE_SOURCE = 157; // 0x9d + field public static final int MESSAGE_INITIATE_ARC = 192; // 0xc0 field public static final int MESSAGE_MENU_REQUEST = 141; // 0x8d field public static final int MESSAGE_MENU_STATUS = 142; // 0x8e field public static final int MESSAGE_PLAY = 65; // 0x41 @@ -12493,10 +12494,14 @@ package android.hardware.hdmi { field public static final int MESSAGE_RECORD_ON = 9; // 0x9 field public static final int MESSAGE_RECORD_STATUS = 10; // 0xa field public static final int MESSAGE_RECORD_TV_SCREEN = 15; // 0xf + field public static final int MESSAGE_REPORT_ARC_INITIATED = 193; // 0xc1 + field public static final int MESSAGE_REPORT_ARC_TERMINATED = 194; // 0xc2 field public static final int MESSAGE_REPORT_AUDIO_STATUS = 122; // 0x7a field public static final int MESSAGE_REPORT_PHYSICAL_ADDRESS = 132; // 0x84 field public static final int MESSAGE_REPORT_POWER_STATUS = 144; // 0x90 field public static final int MESSAGE_REQUEST_ACTIVE_SOURCE = 133; // 0x85 + field public static final int MESSAGE_REQUEST_ARC_INITIATION = 195; // 0xc3 + field public static final int MESSAGE_REQUEST_ARC_TERMINATION = 196; // 0xc4 field public static final int MESSAGE_ROUTING_CHANGE = 128; // 0x80 field public static final int MESSAGE_ROUTING_INFORMATION = 129; // 0x81 field public static final int MESSAGE_SELECT_ANALOG_SERVICE = 146; // 0x92 @@ -12514,6 +12519,7 @@ package android.hardware.hdmi { field public static final int MESSAGE_STANDBY = 54; // 0x36 field public static final int MESSAGE_SYSTEM_AUDIO_MODE_REQUEST = 112; // 0x70 field public static final int MESSAGE_SYSTEM_AUDIO_MODE_STATUS = 126; // 0x7e + field public static final int MESSAGE_TERMINATE_ARC = 197; // 0xc5 field public static final int MESSAGE_TEXT_VIEW_ON = 13; // 0xd field public static final int MESSAGE_TIMER_CLEARED_STATUS = 67; // 0x43 field public static final int MESSAGE_TIMER_STATUS = 53; // 0x35 diff --git a/core/java/android/hardware/hdmi/HdmiCec.java b/core/java/android/hardware/hdmi/HdmiCec.java index 7213c78..9193f89 100644 --- a/core/java/android/hardware/hdmi/HdmiCec.java +++ b/core/java/android/hardware/hdmi/HdmiCec.java @@ -120,7 +120,7 @@ public final class HdmiCec { public static final int MESSAGE_TIMER_CLEARED_STATUS = 0x043; public static final int MESSAGE_USER_CONTROL_PRESSED = 0x44; public static final int MESSAGE_USER_CONTROL_RELEASED = 0x45; - public static final int MESSAGE_GET_OSD_NAME = 0x46; + public static final int MESSAGE_GIVE_OSD_NAME = 0x46; public static final int MESSAGE_SET_OSD_NAME = 0x47; public static final int MESSAGE_SET_OSD_STRING = 0x64; public static final int MESSAGE_SET_TIMER_PROGRAM_TITLE = 0x67; @@ -158,6 +158,12 @@ public final class HdmiCec { public static final int MESSAGE_VENDOR_COMMAND_WITH_ID = 0xA0; public static final int MESSAGE_CLEAR_EXTERNAL_TIMER = 0xA1; public static final int MESSAGE_SET_EXTERNAL_TIMER = 0xA2; + public static final int MESSAGE_INITIATE_ARC = 0xC0; + public static final int MESSAGE_REPORT_ARC_INITIATED = 0xC1; + public static final int MESSAGE_REPORT_ARC_TERMINATED = 0xC2; + public static final int MESSAGE_REQUEST_ARC_INITIATION = 0xC3; + public static final int MESSAGE_REQUEST_ARC_TERMINATION = 0xC4; + public static final int MESSAGE_TERMINATE_ARC = 0xC5; public static final int MESSAGE_ABORT = 0xFF; public static final int UNKNOWN_VENDOR_ID = 0xFFFFFF; diff --git a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java index fc6183c..6d2b83b 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecMessageBuilder.java @@ -58,14 +58,14 @@ public class HdmiCecMessageBuilder { } /** - * Build <Get Osd Name> command. + * Build <Give Osd Name> command. * * @param src source address of command * @param dest destination address of command * @return newly created {@link HdmiCecMessage} */ - static HdmiCecMessage buildGetOsdNameCommand(int src, int dest) { - return buildCommand(src, dest, HdmiCec.MESSAGE_GET_OSD_NAME); + static HdmiCecMessage buildGiveOsdNameCommand(int src, int dest) { + return buildCommand(src, dest, HdmiCec.MESSAGE_GIVE_OSD_NAME); } /** diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java index c122645..ed48c12 100644 --- a/services/core/java/com/android/server/hdmi/HdmiControlService.java +++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java @@ -127,8 +127,8 @@ public final class HdmiControlService extends SystemService { case HdmiCec.MESSAGE_GET_MENU_LANGUAGE: handleGetMenuLanguage(message); return true; - case HdmiCec.MESSAGE_GET_OSD_NAME: - handleGetOsdName(message); + case HdmiCec.MESSAGE_GIVE_OSD_NAME: + handleGiveOsdName(message); return true; case HdmiCec.MESSAGE_GIVE_PHYSICAL_ADDRESS: handleGivePhysicalAddress(message); @@ -170,7 +170,7 @@ public final class HdmiControlService extends SystemService { sendCecCommand(cecMessage); } - private void handleGetOsdName(HdmiCecMessage message) { + private void handleGiveOsdName(HdmiCecMessage message) { // TODO: read device name from settings or property. String name = HdmiCec.getDefaultDeviceName(message.getDestination()); HdmiCecMessage cecMessage = HdmiCecMessageBuilder.buildSetOsdNameCommand( diff --git a/services/core/java/com/android/server/hdmi/NewDeviceAction.java b/services/core/java/com/android/server/hdmi/NewDeviceAction.java index 98da280..e0bc718 100644 --- a/services/core/java/com/android/server/hdmi/NewDeviceAction.java +++ b/services/core/java/com/android/server/hdmi/NewDeviceAction.java @@ -71,7 +71,7 @@ final class NewDeviceAction extends FeatureAction { @Override public boolean start() { sendCommand( - HdmiCecMessageBuilder.buildGetOsdNameCommand(mSourceAddress, + HdmiCecMessageBuilder.buildGiveOsdNameCommand(mSourceAddress, mDeviceLogicalAddress)); mState = STATE_WAITING_FOR_SET_OSD_NAME; addTimer(mState, TIMEOUT_MS); diff --git a/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp b/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp index 6e03993..1d111a1 100644 --- a/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp +++ b/services/core/jni/com_android_server_hdmi_HdmiCecService.cpp @@ -142,7 +142,7 @@ private: // Handles incoming <Request Active Source> message. If one of logical // devices is active, it should reply with <Active Source> message. void handleRequestActiveSource(); - void handleGetOsdName(const cec_message_t& msg); + void handleGiveOsdName(const cec_message_t& msg); void handleGiveDeviceVendorID(const cec_message_t& msg); void handleGetCECVersion(const cec_message_t& msg); void handleGetMenuLanguage(const cec_message_t& msg); @@ -555,8 +555,8 @@ void HdmiCecHandler::processIncomingMessage(const cec_message_t& msg) { sendReportPhysicalAddress(msg.destination); } else if (opcode == CEC_MESSAGE_REQUEST_ACTIVE_SOURCE) { handleRequestActiveSource(); - } else if (opcode == CEC_MESSAGE_GET_OSD_NAME) { - handleGetOsdName(msg); + } else if (opcode == CEC_MESSAGE_GIVE_OSD_NAME) { + handleGiveOsdName(msg); } else if (opcode == CEC_MESSAGE_GIVE_DEVICE_VENDOR_ID) { handleGiveDeviceVendorID(msg); } else if (opcode == CEC_MESSAGE_GET_CEC_VERSION) { @@ -631,7 +631,7 @@ void HdmiCecHandler::handleRequestActiveSource() { checkAndClearExceptionFromCallback(env, __FUNCTION__); } -void HdmiCecHandler::handleGetOsdName(const cec_message_t& msg) { +void HdmiCecHandler::handleGiveOsdName(const cec_message_t& msg) { if (!mOsdName.empty()) { sendSetOsdName(msg.destination, msg.initiator, mOsdName.c_str(), mOsdName.length()); } |