Skip to content
Commit 0bbdb71a authored by Jan Sebechlebsky's avatar Jan Sebechlebsky
Browse files

Fix MediaPlayer construction with AUDIO_SESSION_ALLOCATE.

When AUDIO_SESSION_ALLOCATE is used during construction, the media
player should allocate new unique session id. However, the previous
call to native_set_session id tried to acquire session_id with value 0,
which correspond to restricted OUTPUT_MIX session and caused failure
during initialization.

The topic also modifies the native initizalization code, so it's possible
to pass explicit session id during construction of native MediaPlayer
instance (prior to this change, the native constructor would always
allocate new session id from audio server, even though in some cases it
might have been immediately changed to exliplicitly requested session id).

Bug: 263373078
Bug: 263362598
Test: atest MediaPlayerUnitTest
Test: atest CtsMediaAudioTestCases CtsMediaPlayerTestCases

Change-Id: I92b085e23c72e0b9d21e12792bf67c2497aa0e25
parent 714a0f90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment