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

Commit 350822b9 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" into qt-dev

am: 16bc4e20

Change-Id: I0adfba6417e0f5ec3e89b62234d49aea35442e52
parents 42c6cd6b 16bc4e20
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);
                }
            }
        }