Merge "Only send <Standby> to TV on sleep when active source" into rvc-dev am: b3898ee44e am: 63606f2025 am: 4dbacb2d18 am: 59d73f10c2

Change-Id: I35f1030731d767e047bb8e00545eb74495c1b914
This commit is contained in:
TreeHugger Robot
2020-05-25 20:52:33 +00:00
committed by Automerger Merge Worker

View File

@@ -163,12 +163,13 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource {
}
if (mIsActiveSource) {
mService.sendCecCommand(HdmiCecMessageBuilder.buildInactiveSource(
mAddress, mService.getPhysicalAddress()));
mAddress, mService.getPhysicalAddress()));
}
boolean wasActiveSource = mIsActiveSource;
// Invalidate the internal active source record when goes to standby
// This set will also update mIsActiveSource
mService.setActiveSource(Constants.ADDR_INVALID, Constants.INVALID_PHYSICAL_ADDRESS);
if (initiatedByCec || !mAutoTvOff) {
if (initiatedByCec || !mAutoTvOff || !wasActiveSource) {
return;
}
switch (standbyAction) {