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

Commit 9c88a61b authored by Gurpreet Ghai's avatar Gurpreet Ghai Committed by Bruno Martins
Browse files

Audio: Do not disconnect profiles till Bluetooth Off

- Disconnecting and clearing Bluetooth Profiles during
  Turning Off State doesn't give chance to A2DP/AVRCP
  profiles to save and retain Audio related data like
  Volume level.
- This change ensures Audio Service only disconnect
  Bluetooth Profile on receiving Bluetooth Off state.

Change-Id: Ie99cb2b35b9ddc7e4f0d0f89407cda9641379fb8
CRs-Fixed: 2512169
parent 41ca6241
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -7949,8 +7949,7 @@ public class AudioService extends IAudioService.Stub
                        UserManager.DISALLOW_RECORD_AUDIO, false, userId);
            } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
                state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);
                if (state == BluetoothAdapter.STATE_OFF ||
                        state == BluetoothAdapter.STATE_TURNING_OFF) {
                if (state == BluetoothAdapter.STATE_OFF) {
                    mDeviceBroker.disconnectAllBluetoothProfiles();
                }
            } else if (action.equals(AudioEffect.ACTION_OPEN_AUDIO_EFFECT_CONTROL_SESSION) ||