diff options
| author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-25 23:09:48 +0000 |
|---|---|---|
| committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-25 23:09:48 +0000 |
| commit | 369b8631bd795c81f80d2ae8f6b1485c6ca5ad85 (patch) | |
| tree | bf68ccf40ab53880e99bd1427e50e2ad2fb59b73 | |
| parent | da449a63b031a656e19307fe927ffd507e2fcf80 (diff) | |
| parent | 4b182d70a8fbbd7e8d0405bfe0c0f1c8885bbf14 (diff) | |
| download | platform_frameworks_wilhelm-android11-gsi.tar.gz platform_frameworks_wilhelm-android11-gsi.tar.bz2 platform_frameworks_wilhelm-android11-gsi.zip | |
Snap for 6431357 from 4b182d70a8fbbd7e8d0405bfe0c0f1c8885bbf14 to rvc-releaseandroid-vts-11.0_r1android-cts-11.0_r1android-11.0.0_r3android-11.0.0_r2android-11.0.0_r17android-11.0.0_r1android11-tests-releaseandroid11-releaseandroid11-gsi
Change-Id: I138a72e7a8e859cff6547069f20817cbfd9db6b4
| -rw-r--r-- | src/android/AudioPlayer_to_android.cpp | 4 | ||||
| -rw-r--r-- | src/android/AudioRecorder_to_android.cpp | 3 | ||||
| -rw-r--r-- | src/android/android_defs.h | 2 |
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 |
