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

Commit 63e6a45d authored by Ravindra's avatar Ravindra
Browse files

DSDA: Fix to stop playing LCH tone

When there are no more calls on a particular sub and it is in LCH
state then reset its LCH state.

Change-Id: Iec6948a2b10d9478d07af55764167138bcf09860
CRs-Fixed: 749515
parent 00f9d2bf
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -907,6 +907,17 @@ public final class CallsManager extends Call.ListenerBase {
            Log.d(this,"Set active sub to conversation sub");
            setActiveSubscription(getConversationSub());
        }

        if ((call.getTargetPhoneAccount() != null) && (phAcc.isSet(PhoneAccount.LCH))) {
            Call activecall = getFirstCallWithStateUsingSubId(call.getTargetPhoneAccount().getId(),
                    CallState.RINGING, CallState.DIALING, CallState.ACTIVE, CallState.ON_HOLD);
            Log.d(this,"activecall: " + activecall);
            if (activecall == null) {
                phAcc.unSetBit(PhoneAccount.LCH);
                manageMSimInCallTones(false);
            }
        }

        removeCall(call);
        if (!hasAnyCalls()) {
            updateLchStatus(null);