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

Commit 9c2ce806 authored by Ted Wang's avatar Ted Wang Committed by android-build-merger
Browse files

Merge "Fix volume control failed when switching active a2dp device"

am: a039adba

Change-Id: I6c2c52ac0505471c498dabc7e70ad81a0e758e4b
parents 8503d448 a039adba
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -571,7 +571,7 @@ public class A2dpService extends ProfileService {
                if (previousActiveDevice != null) {
                    if (!mAudioManager.isStreamMute(AudioManager.STREAM_MUSIC)) {
                        mAudioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC,
                                                         AudioManager.ADJUST_MUTE, 0);
                                AudioManager.ADJUST_MUTE, AudioManager.FLAG_BLUETOOTH_ABS_VOLUME);
                        wasMuted = true;
                    }
                    mAudioManager.setBluetoothA2dpDeviceConnectionStateSuppressNoisyIntent(
@@ -595,7 +595,7 @@ public class A2dpService extends ProfileService {
                mAudioManager.handleBluetoothA2dpDeviceConfigChange(mActiveDevice);
                if (wasMuted) {
                    mAudioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC,
                                                     AudioManager.ADJUST_UNMUTE, 0);
                                AudioManager.ADJUST_MUTE, AudioManager.FLAG_BLUETOOTH_ABS_VOLUME);
                }
            }
        }