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

Commit b3d3f629 authored by Jan Sebechlebsky's avatar Jan Sebechlebsky
Browse files

Fix undefined port id value in

AudioPolicyManagerTestMMapPlaybackRerouting

Although this is an output parameter, AudioPolicyManager::getOutputForAttr
verifies that initial value is AUDIO_PORT_HANDLE_NONE.
Because the field was not explicitly initialized in the test,
it contains undefined data and might cause tests to fail randomly.

Bug: 290129288
Test: atest audiopolicymanager_tests
Change-Id: I8662816c45d179305dcc27041dbb6b1d9afcc5e1
parent 27007e85
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1905,7 +1905,7 @@ class AudioPolicyManagerTestMMapPlaybackRerouting
    audio_io_handle_t mOutput;
    audio_io_handle_t mOutput;
    audio_stream_type_t mStream = AUDIO_STREAM_DEFAULT;
    audio_stream_type_t mStream = AUDIO_STREAM_DEFAULT;
    audio_port_handle_t mSelectedDeviceId = AUDIO_PORT_HANDLE_NONE;
    audio_port_handle_t mSelectedDeviceId = AUDIO_PORT_HANDLE_NONE;
    audio_port_handle_t mPortId;
    audio_port_handle_t mPortId = AUDIO_PORT_HANDLE_NONE;
    AudioPolicyInterface::output_type_t mOutputType;
    AudioPolicyInterface::output_type_t mOutputType;
    audio_attributes_t attr = AUDIO_ATTRIBUTES_INITIALIZER;
    audio_attributes_t attr = AUDIO_ATTRIBUTES_INITIALIZER;
    bool mIsSpatialized;
    bool mIsSpatialized;