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

Commit 240b0860 authored by chenxin20's avatar chenxin20
Browse files

AudioService: fix voice volume adjustments



Even if the device does not support TelephonyManager (mPlatformType is not PLATFORM_VOICE), the app may still choose stream_voice_call to play sound. At this time, it is also necessary to determine whether stream_voice_call is active.

Change-Id: I88a925605e20e1fbc65974836a0f585b0e00bbcc
Signed-off-by: default avatarchenxin20 <chenxin20@xiaomi.com>
parent 7346cee3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7489,7 +7489,8 @@ public class AudioService extends IAudioService.Stub
                return AudioSystem.STREAM_RING;
            }
        default:
            if (isInCommunication()) {
            if (isInCommunication()
                    || mAudioSystem.isStreamActive(AudioManager.STREAM_VOICE_CALL, 0)) {
                if (!replaceStreamBtSco()
                        && mBtCommDeviceActive.get() == BT_COMM_DEVICE_ACTIVE_SCO) {
                    if (DEBUG_VOL) Log.v(TAG, "getActiveStreamType: Forcing STREAM_BLUETOOTH_SCO");