Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e09cce99 authored by Robert Wu's avatar Robert Wu Committed by Android (Google) Code Review
Browse files

Merge "Fix incrementing with getDeviceIds" into main

parents 51f1cc2e 36281e9e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -598,7 +598,7 @@ static jintArray android_media_AudioRecord_getRoutedDeviceIds(JNIEnv *env, jobje
    }
    jint *values = env->GetIntArrayElements(result, 0);
    for (unsigned int i = 0; i < deviceIds.size(); i++) {
        values[i++] = static_cast<jint>(deviceIds[i]);
        values[i] = static_cast<jint>(deviceIds[i]);
    }
    env->ReleaseIntArrayElements(result, values, 0);
    return result;
+1 −1
Original line number Diff line number Diff line
@@ -1204,7 +1204,7 @@ static jintArray android_media_AudioTrack_getRoutedDeviceIds(JNIEnv *env, jobjec
    }
    jint *values = env->GetIntArrayElements(result, 0);
    for (unsigned int i = 0; i < deviceIds.size(); i++) {
        values[i++] = static_cast<jint>(deviceIds[i]);
        values[i] = static_cast<jint>(deviceIds[i]);
    }
    env->ReleaseIntArrayElements(result, values, 0);
    return result;
+1 −1
Original line number Diff line number Diff line
@@ -1378,7 +1378,7 @@ static jintArray android_media_MediaPlayer_getRoutedDeviceIds(JNIEnv *env, jobje
    }
    jint* values = env->GetIntArrayElements(result, 0);
    for (unsigned int i = 0; i < deviceIds.size(); i++) {
        values[i++] = static_cast<jint>(deviceIds[i]);
        values[i] = static_cast<jint>(deviceIds[i]);
    }
    env->ReleaseIntArrayElements(result, values, 0);
    return result;
+1 −1
Original line number Diff line number Diff line
@@ -743,7 +743,7 @@ android_media_MediaRecorder_getRoutedDeviceIds(JNIEnv *env, jobject thiz)
    }
    jint* values = env->GetIntArrayElements(result, 0);
    for (unsigned int i = 0; i < deviceIds.size(); i++) {
        values[i++] = static_cast<jint>(deviceIds[i]);
        values[i] = static_cast<jint>(deviceIds[i]);
    }
    env->ReleaseIntArrayElements(result, values, 0);
    return result;