CEC: Do not send <Active Source> when TV wakes up by one touch play
TV should respect the device that wakes up TV by one touch play to keep its active source status by not sending <Active Source>. Bug: 19039773 Change-Id: I0b27e95dcf986df90b25cc2a1891acd82940f13e
This commit is contained in:
@@ -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() {
|
void processAllMessages() {
|
||||||
// Use the copied buffer.
|
// Use the copied buffer.
|
||||||
ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<HdmiCecMessage>(mBuffer);
|
ArrayList<HdmiCecMessage> copiedBuffer = new ArrayList<HdmiCecMessage>(mBuffer);
|
||||||
|
|||||||
@@ -1427,7 +1427,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
|||||||
} else {
|
} else {
|
||||||
int activePath = mService.getPhysicalAddress();
|
int activePath = mService.getPhysicalAddress();
|
||||||
setActivePath(activePath);
|
setActivePath(activePath);
|
||||||
if (!routingForBootup) {
|
if (!routingForBootup
|
||||||
|
&& !mDelayedMessageBuffer.isBuffered(Constants.MESSAGE_ACTIVE_SOURCE)) {
|
||||||
mService.sendCecCommand(HdmiCecMessageBuilder.buildActiveSource(mAddress,
|
mService.sendCecCommand(HdmiCecMessageBuilder.buildActiveSource(mAddress,
|
||||||
activePath));
|
activePath));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user