Merge "Use local status for convert profile" am: 7aab6bbe3d am: b9b3f78f04 am: 1e239a8a4d am: 44e565c255
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2218683 Change-Id: I1569df3d5c365a1c59f2776163d6ba3e125afd2a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -2937,13 +2937,14 @@ static jint android_media_AudioSystem_getDirectProfilesForAttributes(JNIEnv *env
|
||||
|
||||
for (const auto &audioProfile : audioProfiles) {
|
||||
jobject jAudioProfile;
|
||||
jStatus = convertAudioProfileFromNative(env, &jAudioProfile, &audioProfile, false);
|
||||
if (jStatus == AUDIO_JAVA_BAD_VALUE) {
|
||||
jint jConvertProfileStatus = convertAudioProfileFromNative(
|
||||
env, &jAudioProfile, &audioProfile, false);
|
||||
if (jConvertProfileStatus == AUDIO_JAVA_BAD_VALUE) {
|
||||
// skipping Java layer unsupported audio formats
|
||||
continue;
|
||||
}
|
||||
if (jStatus != AUDIO_JAVA_SUCCESS) {
|
||||
return jStatus;
|
||||
if (jConvertProfileStatus != AUDIO_JAVA_SUCCESS) {
|
||||
return jConvertProfileStatus;
|
||||
}
|
||||
env->CallBooleanMethod(jAudioProfilesList, gArrayListMethods.add, jAudioProfile);
|
||||
env->DeleteLocalRef(jAudioProfile);
|
||||
|
||||
Reference in New Issue
Block a user