Loading src/com/android/server/telecom/CallsManager.java +19 −4 Original line number Diff line number Diff line Loading @@ -920,9 +920,12 @@ public final class CallsManager extends Call.ListenerBase { */ void markCallAsDisconnected(Call call, DisconnectCause disconnectCause) { call.setDisconnectCause(disconnectCause); int prevState = call.getState(); setCallState(call, CallState.DISCONNECTED); String activeSub = getActiveSubscription(); String conversationSub = getConversationSub(); String lchSub = IsAnySubInLch(); PhoneAccount phAcc = getPhoneAccountRegistrar().getPhoneAccount(call.getTargetPhoneAccount()); if ((call.getTargetPhoneAccount() != null && Loading @@ -932,10 +935,12 @@ public final class CallsManager extends Call.ListenerBase { (!conversationSub.equals(activeSub))) { Log.d(this,"Set active sub to conversation sub"); setActiveSubscription(conversationSub); } else if ((conversationSub == null) && (call.getTargetPhoneAccount() != null) && (activeSub != null) && (!call.getTargetPhoneAccount().getId().equals(activeSub))) { Log.d(this,"remove active sub from LCH"); updateLchStatus(activeSub); } else if ((conversationSub == null) && (lchSub != null) && ((prevState == CallState.CONNECTING) || (prevState == CallState.PRE_DIAL_WAIT)) && (call.getState() == CallState.DISCONNECTED)) { Log.d(this,"remove sub with call from LCH"); updateLchStatus(lchSub); setActiveSubscription(lchSub); manageMSimInCallTones(false); } Loading @@ -958,6 +963,16 @@ public final class CallsManager extends Call.ListenerBase { } } private String IsAnySubInLch() { for (PhoneAccountHandle ph : getPhoneAccountRegistrar().getCallCapablePhoneAccounts()) { if (getPhoneAccountRegistrar().getPhoneAccount(ph).isSet(PhoneAccount.LCH)) { Log.d(this, "Sub in LCH: " + ph.getId()); return ph.getId(); } } return null; } /** * Removes an existing disconnected call, and notifies the in-call app. */ Loading Loading
src/com/android/server/telecom/CallsManager.java +19 −4 Original line number Diff line number Diff line Loading @@ -920,9 +920,12 @@ public final class CallsManager extends Call.ListenerBase { */ void markCallAsDisconnected(Call call, DisconnectCause disconnectCause) { call.setDisconnectCause(disconnectCause); int prevState = call.getState(); setCallState(call, CallState.DISCONNECTED); String activeSub = getActiveSubscription(); String conversationSub = getConversationSub(); String lchSub = IsAnySubInLch(); PhoneAccount phAcc = getPhoneAccountRegistrar().getPhoneAccount(call.getTargetPhoneAccount()); if ((call.getTargetPhoneAccount() != null && Loading @@ -932,10 +935,12 @@ public final class CallsManager extends Call.ListenerBase { (!conversationSub.equals(activeSub))) { Log.d(this,"Set active sub to conversation sub"); setActiveSubscription(conversationSub); } else if ((conversationSub == null) && (call.getTargetPhoneAccount() != null) && (activeSub != null) && (!call.getTargetPhoneAccount().getId().equals(activeSub))) { Log.d(this,"remove active sub from LCH"); updateLchStatus(activeSub); } else if ((conversationSub == null) && (lchSub != null) && ((prevState == CallState.CONNECTING) || (prevState == CallState.PRE_DIAL_WAIT)) && (call.getState() == CallState.DISCONNECTED)) { Log.d(this,"remove sub with call from LCH"); updateLchStatus(lchSub); setActiveSubscription(lchSub); manageMSimInCallTones(false); } Loading @@ -958,6 +963,16 @@ public final class CallsManager extends Call.ListenerBase { } } private String IsAnySubInLch() { for (PhoneAccountHandle ph : getPhoneAccountRegistrar().getCallCapablePhoneAccounts()) { if (getPhoneAccountRegistrar().getPhoneAccount(ph).isSet(PhoneAccount.LCH)) { Log.d(this, "Sub in LCH: " + ph.getId()); return ph.getId(); } } return null; } /** * Removes an existing disconnected call, and notifies the in-call app. */ Loading