CEC: Add implementation of SYSTEM_CEC_CONTROL option to default HdmiCec
SYSTEM_CEC_CONTROL is updated when system goes into or comes out of
standby mode.
When set to true, Android system is handling CEC commands.
When set to false, microprocessor is handling CEC commands.
Bug: 185434120
Test: manual
Change-Id: I0fbb13a65639508634c6c163b5eaed1885f9e127
diff --git a/tv/cec/1.0/default/HdmiCecDefault.h b/tv/cec/1.0/default/HdmiCecDefault.h
index 6b850ac..81229d3 100644
--- a/tv/cec/1.0/default/HdmiCecDefault.h
+++ b/tv/cec/1.0/default/HdmiCecDefault.h
@@ -56,7 +56,10 @@
private:
void event_thread();
static int getOpcode(cec_msg message);
+ static int getFirstParam(cec_msg message);
static bool isWakeupMessage(cec_msg message);
+ static bool isTransferableInSleep(cec_msg message);
+ static bool isPowerUICommand(cec_msg message);
thread mEventThread;
@@ -67,6 +70,13 @@
* <Text View On>. True by default after initialization.
*/
bool mWakeupEnabled;
+ /*
+ * Updated when system goes into or comes out of standby mode.
+ * When set to true, Android system is handling CEC commands.
+ * When set to false, microprocessor is handling CEC commands.
+ * True by default after initialization.
+ */
+ bool mCecControlEnabled;
sp<IHdmiCecCallback> mCallback;
int mCecFd;