Fix for AudioPlaybackConfiguration object leak
AudioPlaybackConfiguration object is created for each
OpenSLES players. Then if the type of player is
AUDIOPLAYER_FROM_URIFD, it can not be noticed when the app
using OpenSLES is forcibly terminated. Because IPlayer is
passed to NULL and it not receive binderDied.
Test: manual
Bug: 77827195
Change-Id: Idd18838b75c40243afdd3f85f2970ec07510d3a0
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index cdc1767..e361dcb 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -1802,7 +1802,8 @@
} else {
pAudioPlayer->mPIId = pAudioPlayer->mObject.mEngine->mAudioManager->trackPlayer(
android::PLAYER_TYPE_SLES_AUDIOPLAYER_URI_FD,
- usageForStreamType(pAudioPlayer->mStreamType), AUDIO_CONTENT_TYPE_UNKNOWN, 0);
+ usageForStreamType(pAudioPlayer->mStreamType), AUDIO_CONTENT_TYPE_UNKNOWN,
+ pAudioPlayer->mTrackPlayer);
}
}
break;