Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb46dd8a authored by yucliu's avatar yucliu
Browse files

Type conversion test for MULTICHANNEL_GROUP

Add Java/Aidl device type conversion test for new device type
DEVICE_OUT_MULTICHANNEL_GROUP.

Flag: TEST_ONLY
Bug: 346839248
Test: unit test
Change-Id: I1cad8a670781ff62ffd7d94f7361b1b929bcd0df
parent 93a9c9f2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -471,6 +471,19 @@ public final class AidlConversionUnitTests {
        assertEquals(AudioDeviceType.OUT_DEFAULT, port.ext.getDevice().device.type.type);
    }

    @Test
    public void testAudioDeviceAttributesConversion_MultichannelGroup() {
        AudioDeviceAttributes attributes =
                new AudioDeviceAttributes(AudioSystem.DEVICE_OUT_MULTICHANNEL_GROUP, "myAddress");
        AudioPort port = AidlConversion.api2aidl_AudioDeviceAttributes_AudioPort(attributes);
        assertEquals("", port.name);
        assertEquals(0, port.extraAudioDescriptors.length);
        assertEquals("myAddress", port.ext.getDevice().device.address.getId());
        assertEquals(AudioDeviceDescription.CONNECTION_VIRTUAL,
                port.ext.getDevice().device.type.connection);
        assertEquals(AudioDeviceType.OUT_MULTICHANNEL_GROUP, port.ext.getDevice().device.type.type);
    }

    @Test
    public void testAudioDeviceAttributesConversion() {
        AudioDescriptor audioDescriptor1 =