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

Commit f804d003 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix native Audio Mix conversion for exclusion rules" into main

parents 5b2da773 84f9371e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2318,7 +2318,7 @@ static jint nativeAudioMixToJavaAudioMixingRule(JNIEnv *env, const AudioMix &nAu
        jobject jAudioAttributes = NULL;
        jobject jMixMatchCriterion = NULL;
        jobject jValueInteger = NULL;
        switch (criteria.mRule) {
        switch (criteria.mRule & ~RULE_EXCLUSION_MASK) {
            case RULE_MATCH_UID:
                jValueInteger = env->NewObject(gIntegerClass, gIntegerCstor, criteria.mValue.mUid);
                jMixMatchCriterion = env->NewObject(gAudioMixMatchCriterionClass,
@@ -2355,6 +2355,9 @@ static jint nativeAudioMixToJavaAudioMixingRule(JNIEnv *env, const AudioMix &nAu
                                                    gAudioMixMatchCriterionAttrCstor,
                                                    jAudioAttributes, criteria.mRule);
                break;
            default:
                ALOGE("Invalid rule type: %d ", criteria.mRule);
                return AUDIO_JAVA_BAD_VALUE;
        }
        env->CallBooleanMethod(jAudioMixMatchCriterionList, gArrayListMethods.add,
                               jMixMatchCriterion);