Fix SystemAudioAutoInitiationAction not started
[Description]
revert part of solution in
55bc36d33c
On Android R, TV's power status is TRANSIENT_TO_STANDBY
by default, in this case, device information related actions
should be started as well, that's why we allow
SystemAudioAutoInitiationAction and NewDeviceAction to be started
When TV boot up, SystemAudioAutoInitiationAction
is not started if power statusof HdmiControlService is not ON
This happens if onNewAvrAdded is called before
SystemService.PHASE_BOOT_COMPLETED
Bug: 194429425
Test:
Build PASS
Boot with ARC device plugged PASS
Change-Id: I79cd1d4f5a180a052be49df186505e579f7d1339
This commit is contained in:
@@ -619,10 +619,8 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
}
|
||||
}
|
||||
|
||||
if (!mService.isPowerStandbyOrTransient()) {
|
||||
addAndStartAction(new NewDeviceAction(this, activeSource.logicalAddress,
|
||||
activeSource.physicalAddress, deviceType));
|
||||
}
|
||||
addAndStartAction(new NewDeviceAction(this, activeSource.logicalAddress,
|
||||
activeSource.physicalAddress, deviceType));
|
||||
}
|
||||
|
||||
private boolean handleNewDeviceAtTheTailOfActivePath(int path) {
|
||||
@@ -798,14 +796,12 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
|
||||
@ServiceThreadOnly
|
||||
void onNewAvrAdded(HdmiDeviceInfo avr) {
|
||||
assertRunOnServiceThread();
|
||||
if (!mService.isPowerStandbyOrTransient()) {
|
||||
addAndStartAction(new SystemAudioAutoInitiationAction(this, avr.getLogicalAddress()));
|
||||
if (!isDirectConnectAddress(avr.getPhysicalAddress())) {
|
||||
startArcAction(false);
|
||||
} else if (isConnected(avr.getPortId()) && isArcFeatureEnabled(avr.getPortId())
|
||||
&& !hasAction(SetArcTransmissionStateAction.class)) {
|
||||
startArcAction(true);
|
||||
}
|
||||
addAndStartAction(new SystemAudioAutoInitiationAction(this, avr.getLogicalAddress()));
|
||||
if (!isDirectConnectAddress(avr.getPhysicalAddress())) {
|
||||
startArcAction(false);
|
||||
} else if (isConnected(avr.getPortId()) && isArcFeatureEnabled(avr.getPortId())
|
||||
&& !hasAction(SetArcTransmissionStateAction.class)) {
|
||||
startArcAction(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user