am 2ab6d9ff: CEC: Do not send <Active Source> when TV wakes up by one touch play

* commit '2ab6d9fff36836c71bc0ee4afa25c11b48a9bd99':
  CEC: Do not send <Active Source> when TV wakes up by one touch play
This commit is contained in:
Jinsuk Kim
2015-01-16 08:23:05 +00:00
committed by Android Git Automerger
2 changed files with 11 additions and 1 deletions

View File

@@ -76,6 +76,15 @@ final class DelayedMessageBuffer {
}
}
boolean isBuffered(int opcode) {
for (HdmiCecMessage message : mBuffer) {
if (message.getOpcode() == opcode) {
return true;
}
}
return false;
}
void processAllMessages() {
// Use the copied buffer.
ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<HdmiCecMessage>(mBuffer);

View File

@@ -1427,7 +1427,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
} else {
int activePath = mService.getPhysicalAddress();
setActivePath(activePath);
if (!routingForBootup) {
if (!routingForBootup
&& !mDelayedMessageBuffer.isBuffered(Constants.MESSAGE_ACTIVE_SOURCE)) {
mService.sendCecCommand(HdmiCecMessageBuilder.buildActiveSource(mAddress,
activePath));
}