Merge "audio:fix STREAM_SYSTEM_ENFORCED index when camera sound forced" am: 74e618ff8b am: 432f868e78 am: c80912849e

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1702488

Change-Id: I2f2e239ace616bf28efb4949c53dceab09e7ad14
This commit is contained in:
Eric Laurent
2021-05-12 13:19:19 +00:00
committed by Automerger Merge Worker

View File

@@ -6535,6 +6535,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