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

Commit a5ba50f8 authored by Trevor Knight's avatar Trevor Knight
Browse files

Fix test failing with NPE due to null List


Bug: 379356781
Change-Id: Icb3205a4f8a886fe6c881f92f3cf617ace98736e
Flag: android.media.audio.speaker_layout_api
Test: atest AudioDeviceInfoTest
parent 280d19b9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.os.Build;

import com.android.aconfig.annotations.VisibleForTesting;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@@ -68,14 +69,14 @@ public class AudioDevicePort extends AudioPort {
        return new AudioDevicePort(
                new AudioHandle(/* id= */ 0),
                /* name= */ "testAudioDevicePort",
                /* profiles= */ null,
                /* profiles= */ new ArrayList<>(),
                /* gains= */ null,
                /* type= */ AudioManager.DEVICE_OUT_SPEAKER,
                /* address= */ "testAddress",
                /* speakerLayoutChannelMask= */ speakerLayoutChannelMask,
                /* encapsulationModes= */ null,
                /* encapsulationMetadataTypes= */ null,
                /* descriptors= */ null);
                /* descriptors= */ new ArrayList<>());
    }

    private final int mType;