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

Commit 5acc4b63 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

Change-Id: Idf3761f65f7cec0dfe6cfec47de8a59dadb8969b
parents d28040a8 da363a63
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");
            }
        });

    }