Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced"

This commit is contained in:
Eric Laurent
2021-05-12 12:25:23 +00:00
committed by Gerrit Code Review

View File

@@ -5860,6 +5860,10 @@ public class AudioService extends IAudioService.Stub
if (index == -1) {
continue;
}
if (mPublicStreamType == AudioSystem.STREAM_SYSTEM_ENFORCED
&& mCameraSoundForced) {
index = mIndexMax;
}
if (DEBUG_VOL) {
Log.v(TAG, "readSettings: found stored index " + getValidIndex(index)
+ " for group " + mAudioVolumeGroup.name() + ", device: " + name);