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

Commit dbf235b0 authored by Yuchen Liu's avatar Yuchen Liu Committed by Android (Google) Code Review
Browse files

Merge "Type conversion test for MULTICHANNEL_GROUP" into main

parents 5b411ac1 eb46dd8a
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 =