HDMICEC: Remove local device Audio System from mLocalDevicesTypes
When CEC is initialized on the DUT, the list mLocalDevicesTypes is used to get the types of local devices to be allocated. Using this list inside the HdmiControlService's constructor for unit tests was introduced by the change ag/20257160. A local device of type Audio System shouldn't be allocated for each tests, the <Report Features> tests being the only tests requiring this. This change impacts the Dynamic Soundbar mode's unit tests where it is expected for a local device Audio System to be included or removed from the network after CEC initialization. Bug: 256567948 Test: make && atest HdmiControlServiceTest Change-Id: I16535b1ce077b38411f31bfc41d18e7734fcedac
This commit is contained in:
@@ -92,7 +92,6 @@ public class HdmiControlServiceTest {
|
||||
|
||||
HdmiCecConfig hdmiCecConfig = new FakeHdmiCecConfig(mContextSpy);
|
||||
mLocalDeviceTypes.add(HdmiDeviceInfo.DEVICE_PLAYBACK);
|
||||
mLocalDeviceTypes.add(DEVICE_AUDIO_SYSTEM);
|
||||
|
||||
mHdmiControlServiceSpy = spy(new HdmiControlService(mContextSpy, mLocalDeviceTypes,
|
||||
new FakeAudioDeviceVolumeManagerWrapper()));
|
||||
@@ -480,6 +479,7 @@ public class HdmiControlServiceTest {
|
||||
HdmiControlManager.CEC_SETTING_NAME_HDMI_CEC_VERSION,
|
||||
HdmiControlManager.HDMI_CEC_VERSION_2_0);
|
||||
mHdmiControlServiceSpy.setControlEnabled(HdmiControlManager.HDMI_CEC_CONTROL_ENABLED);
|
||||
mHdmiControlServiceSpy.allocateLogicalAddress(mLocalDevices, INITIATED_BY_ENABLE_CEC);
|
||||
mTestLooper.dispatchAll();
|
||||
|
||||
mNativeWrapper.onCecMessage(HdmiCecMessageBuilder.buildGiveFeatures(Constants.ADDR_TV,
|
||||
@@ -501,6 +501,7 @@ public class HdmiControlServiceTest {
|
||||
HdmiControlManager.CEC_SETTING_NAME_HDMI_CEC_VERSION,
|
||||
HdmiControlManager.HDMI_CEC_VERSION_1_4_B);
|
||||
mHdmiControlServiceSpy.setControlEnabled(HdmiControlManager.HDMI_CEC_CONTROL_ENABLED);
|
||||
mHdmiControlServiceSpy.allocateLogicalAddress(mLocalDevices, INITIATED_BY_ENABLE_CEC);
|
||||
mTestLooper.dispatchAll();
|
||||
|
||||
HdmiCecMessage reportFeatures = ReportFeaturesMessage.build(
|
||||
@@ -517,6 +518,7 @@ public class HdmiControlServiceTest {
|
||||
HdmiControlManager.CEC_SETTING_NAME_HDMI_CEC_VERSION,
|
||||
HdmiControlManager.HDMI_CEC_VERSION_2_0);
|
||||
mHdmiControlServiceSpy.setControlEnabled(HdmiControlManager.HDMI_CEC_CONTROL_ENABLED);
|
||||
mHdmiControlServiceSpy.allocateLogicalAddress(mLocalDevices, INITIATED_BY_ENABLE_CEC);
|
||||
mTestLooper.dispatchAll();
|
||||
|
||||
HdmiCecMessage reportFeatures = ReportFeaturesMessage.build(
|
||||
|
||||
Reference in New Issue
Block a user