summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-26 07:14:46 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-26 07:14:46 +0000
commitd147c5fe681990ea4c8e9bc215bbb066e2e563e8 (patch)
treebf68ccf40ab53880e99bd1427e50e2ad2fb59b73
parente5736050c6771ce58c54be118dcf13d3edb61630 (diff)
parent567b963f653abd6c2f0ea0706b43672c4cb0625c (diff)
downloadplatform_frameworks_wilhelm-android11-mainline-release.tar.gz
platform_frameworks_wilhelm-android11-mainline-release.tar.bz2
platform_frameworks_wilhelm-android11-mainline-release.zip
Snap for 6431658 from 567b963f653abd6c2f0ea0706b43672c4cb0625c to mainline-releaseandroid-mainline-11.0.0_r1android11-mainline-release
Change-Id: I4cd2391bf81024096d2a880dc5d33e5ed57e5b0e
-rw-r--r--src/android/AudioPlayer_to_android.cpp4
-rw-r--r--src/android/AudioRecorder_to_android.cpp3
-rw-r--r--src/android/android_defs.h2
3 files changed, 9 insertions, 0 deletions
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp
index d8940b8..9dc0a8a 100644
--- a/src/android/AudioPlayer_to_android.cpp
+++ b/src/android/AudioPlayer_to_android.cpp
@@ -1695,6 +1695,10 @@ SLresult android_audioPlayer_realize(CAudioPlayer *pAudioPlayer, SLboolean async
(void *) pAudioPlayer, // user
notificationFrames, // see comment above
pAudioPlayer->mSessionId);
+
+ // Set it here so it can be logged by the destructor if the open failed.
+ pat->setCallerName(ANDROID_OPENSLES_CALLER_NAME);
+
android::status_t status = pat->initCheck();
if (status != android::NO_ERROR) {
// AudioTracks are meant to be refcounted, so their dtor is protected.
diff --git a/src/android/AudioRecorder_to_android.cpp b/src/android/AudioRecorder_to_android.cpp
index 4e2f31d..2595112 100644
--- a/src/android/AudioRecorder_to_android.cpp
+++ b/src/android/AudioRecorder_to_android.cpp
@@ -703,6 +703,9 @@ SLresult android_audioRecorder_realize(CAudioRecorder* ar, SLboolean async) {
// transfer type
policy); // audio_input_flags_t
+ // Set it here so it can be logged by the destructor if the open failed.
+ ar->mAudioRecord->setCallerName(ANDROID_OPENSLES_CALLER_NAME);
+
android::status_t status = ar->mAudioRecord->initCheck();
if (android::NO_ERROR != status) {
SL_LOGE("android_audioRecorder_realize(%p) error creating AudioRecord object; status %d",
diff --git a/src/android/android_defs.h b/src/android/android_defs.h
index 8b28983..daa7b70 100644
--- a/src/android/android_defs.h
+++ b/src/android/android_defs.h
@@ -221,5 +221,7 @@ union DataLocator2 {
ANDROID_PERFORMANCE_MODE_NONE | \
ANDROID_PERFORMANCE_MODE_POWER_SAVING)
+// This is used for exact matching by MediaMetrics. So do not change it.
+#define ANDROID_OPENSLES_CALLER_NAME "opensles"
} // namespace android