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

Commit bc2e4817 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

Change-Id: I7dd601780b2d98bfac52684f9caad748f9de1445
parents c598bf87 5acc4b63
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");
            }
        });

    }