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

Commit d7ceb1c9 authored by Ugo Yu's avatar Ugo Yu Committed by android-build-merger
Browse files

Merge "SCO: Resume A2DP when call ended and SCO is not connected" am: da363a63 am: 5acc4b63

am: bc2e4817

Change-Id: I686bf7553b859ff9890576a63176cbc553b847ca
parents 4db37a6b bc2e4817
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1499,6 +1499,13 @@ public class HeadsetService extends ProfileService {
        doForEachConnectedStateMachine(
                stateMachine -> stateMachine.sendMessage(HeadsetStateMachine.CALL_STATE_CHANGED,
                        new HeadsetCallState(numActive, numHeld, callState, number, type)));
        mStateMachinesThread.getThreadHandler().post(() -> {
            if (callState == HeadsetHalConstants.CALL_STATE_IDLE
                    && !shouldCallAudioBeActive() && !isAudioOn()) {
                // Resume A2DP when call ended and SCO is not connected
                mSystemInterface.getAudioManager().setParameters("A2dpSuspended=false");
            }
        });

    }