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

Commit a039adba authored by Ted Wang's avatar Ted Wang Committed by Gerrit Code Review
Browse files

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

parents 5383e469 a004c787
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);
                }
            }
        }