Loading core/jni/android_media_AudioProductStrategies.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ static jint convertAudioProductStrategiesFromNative( // Audio Attributes Group array int attrGroupIndex = 0; std::map<int /**attributesGroupIndex*/, std::vector<AudioAttributes> > groups; for (const auto &attr : strategy.getAudioAttributes()) { std::map<int /**attributesGroupIndex*/, std::vector<VolumeGroupAttributes> > groups; for (const auto &attr : strategy.getVolumeGroupAttributes()) { int groupId = attr.getGroupId(); int streamType = attr.getStreamType(); const auto &iter = std::find_if(begin(groups), end(groups), Loading @@ -108,17 +108,17 @@ static jint convertAudioProductStrategiesFromNative( jAudioAttributesGroups = env->NewObjectArray(numAttributesGroups, gAudioAttributesGroupClass, NULL); for (const auto &iter : groups) { std::vector<AudioAttributes> audioAttributesGroups = iter.second; jint numAttributes = audioAttributesGroups.size(); jint jGroupId = audioAttributesGroups.front().getGroupId(); jint jLegacyStreamType = audioAttributesGroups.front().getStreamType(); std::vector<VolumeGroupAttributes> volumeGroupAttributes = iter.second; jint numAttributes = volumeGroupAttributes.size(); jint jGroupId = volumeGroupAttributes.front().getGroupId(); jint jLegacyStreamType = volumeGroupAttributes.front().getStreamType(); jStatus = JNIAudioAttributeHelper::getJavaArray(env, &jAudioAttributes, numAttributes); if (jStatus != (jint)AUDIO_JAVA_SUCCESS) { goto exit; } for (size_t j = 0; j < static_cast<size_t>(numAttributes); j++) { auto attributes = audioAttributesGroups[j].getAttributes(); auto attributes = volumeGroupAttributes[j].getAttributes(); jStatus = JNIAudioAttributeHelper::nativeToJava(env, &jAudioAttribute, attributes); if (jStatus != AUDIO_JAVA_SUCCESS) { Loading Loading
core/jni/android_media_AudioProductStrategies.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ static jint convertAudioProductStrategiesFromNative( // Audio Attributes Group array int attrGroupIndex = 0; std::map<int /**attributesGroupIndex*/, std::vector<AudioAttributes> > groups; for (const auto &attr : strategy.getAudioAttributes()) { std::map<int /**attributesGroupIndex*/, std::vector<VolumeGroupAttributes> > groups; for (const auto &attr : strategy.getVolumeGroupAttributes()) { int groupId = attr.getGroupId(); int streamType = attr.getStreamType(); const auto &iter = std::find_if(begin(groups), end(groups), Loading @@ -108,17 +108,17 @@ static jint convertAudioProductStrategiesFromNative( jAudioAttributesGroups = env->NewObjectArray(numAttributesGroups, gAudioAttributesGroupClass, NULL); for (const auto &iter : groups) { std::vector<AudioAttributes> audioAttributesGroups = iter.second; jint numAttributes = audioAttributesGroups.size(); jint jGroupId = audioAttributesGroups.front().getGroupId(); jint jLegacyStreamType = audioAttributesGroups.front().getStreamType(); std::vector<VolumeGroupAttributes> volumeGroupAttributes = iter.second; jint numAttributes = volumeGroupAttributes.size(); jint jGroupId = volumeGroupAttributes.front().getGroupId(); jint jLegacyStreamType = volumeGroupAttributes.front().getStreamType(); jStatus = JNIAudioAttributeHelper::getJavaArray(env, &jAudioAttributes, numAttributes); if (jStatus != (jint)AUDIO_JAVA_SUCCESS) { goto exit; } for (size_t j = 0; j < static_cast<size_t>(numAttributes); j++) { auto attributes = audioAttributesGroups[j].getAttributes(); auto attributes = volumeGroupAttributes[j].getAttributes(); jStatus = JNIAudioAttributeHelper::nativeToJava(env, &jAudioAttribute, attributes); if (jStatus != AUDIO_JAVA_SUCCESS) { Loading