Loading src/com/android/server/telecom/callsequencing/CallSequencingController.java +10 −7 Original line number Diff line number Diff line Loading @@ -355,12 +355,15 @@ public class CallSequencingController { Log.i(this, "Disconnecting non-holdable calls from account (%s).", activeCall.getTargetPhoneAccount()); return disconnectAllCallsWithPhoneAccount( activeCall.getTargetPhoneAccount()); activeCall.getTargetPhoneAccount(), false /* excludeAccount */); } else { // Disconnect calls on other phone accounts and allow CS to handle // holding/disconnecting calls from the same CS. Log.i(this, "holdActiveCallForNewCallWithSequencing: " + "allowing ConnectionService to determine how to handle " + "this case"); CompletableFuture.completedFuture(true); + "disconnecting calls on other phone accounts and allowing " + "ConnectionService to determine how to handle this case."); return disconnectAllCallsWithPhoneAccount( activeCall.getTargetPhoneAccount(), true /* excludeAccount */); } } } else { Loading Loading @@ -1027,10 +1030,10 @@ public class CallSequencingController { } private CompletableFuture<Boolean> disconnectAllCallsWithPhoneAccount( PhoneAccountHandle handle) { PhoneAccountHandle handle, boolean excludeAccount) { CompletableFuture<Boolean> disconnectFuture = CompletableFuture.completedFuture(true); List<Call> calls = mCallsManager.getCalls().stream() .filter(c -> c.getTargetPhoneAccount().equals(handle)).toList(); .filter(c -> excludeAccount != c.getTargetPhoneAccount().equals(handle)).toList(); for (Call call: calls) { // Wait for all disconnects before we accept the new call. disconnectFuture = disconnectFuture.thenComposeAsync((result) -> { Loading @@ -1038,7 +1041,7 @@ public class CallSequencingController { Log.i(this, "disconnectAllCallsWithPhoneAccount: " + "Failed to disconnect %s.", call); } return call.disconnect("Un-holdable call " + call + " disconnected " return call.disconnect("Call " + call + " disconnected " + "in favor of new call."); }, new LoggedHandlerExecutor(mHandler, "CSC.dACWPA", mCallsManager.getLock())); } Loading src/com/android/server/telecom/callsequencing/VerifyCallStateChangeTransaction.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ import java.util.stream.IntStream; */ public class VerifyCallStateChangeTransaction extends CallTransaction { private static final String TAG = VerifyCallStateChangeTransaction.class.getSimpleName(); private static final long CALL_STATE_TIMEOUT_MILLISECONDS = 2000L; private static final long CALL_STATE_TIMEOUT_MILLISECONDS = 5000L; private final Call mCall; private final Set<Integer> mTargetCallStates; private final CompletableFuture<CallTransactionResult> mTransactionResult = Loading Loading
src/com/android/server/telecom/callsequencing/CallSequencingController.java +10 −7 Original line number Diff line number Diff line Loading @@ -355,12 +355,15 @@ public class CallSequencingController { Log.i(this, "Disconnecting non-holdable calls from account (%s).", activeCall.getTargetPhoneAccount()); return disconnectAllCallsWithPhoneAccount( activeCall.getTargetPhoneAccount()); activeCall.getTargetPhoneAccount(), false /* excludeAccount */); } else { // Disconnect calls on other phone accounts and allow CS to handle // holding/disconnecting calls from the same CS. Log.i(this, "holdActiveCallForNewCallWithSequencing: " + "allowing ConnectionService to determine how to handle " + "this case"); CompletableFuture.completedFuture(true); + "disconnecting calls on other phone accounts and allowing " + "ConnectionService to determine how to handle this case."); return disconnectAllCallsWithPhoneAccount( activeCall.getTargetPhoneAccount(), true /* excludeAccount */); } } } else { Loading Loading @@ -1027,10 +1030,10 @@ public class CallSequencingController { } private CompletableFuture<Boolean> disconnectAllCallsWithPhoneAccount( PhoneAccountHandle handle) { PhoneAccountHandle handle, boolean excludeAccount) { CompletableFuture<Boolean> disconnectFuture = CompletableFuture.completedFuture(true); List<Call> calls = mCallsManager.getCalls().stream() .filter(c -> c.getTargetPhoneAccount().equals(handle)).toList(); .filter(c -> excludeAccount != c.getTargetPhoneAccount().equals(handle)).toList(); for (Call call: calls) { // Wait for all disconnects before we accept the new call. disconnectFuture = disconnectFuture.thenComposeAsync((result) -> { Loading @@ -1038,7 +1041,7 @@ public class CallSequencingController { Log.i(this, "disconnectAllCallsWithPhoneAccount: " + "Failed to disconnect %s.", call); } return call.disconnect("Un-holdable call " + call + " disconnected " return call.disconnect("Call " + call + " disconnected " + "in favor of new call."); }, new LoggedHandlerExecutor(mHandler, "CSC.dACWPA", mCallsManager.getLock())); } Loading
src/com/android/server/telecom/callsequencing/VerifyCallStateChangeTransaction.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ import java.util.stream.IntStream; */ public class VerifyCallStateChangeTransaction extends CallTransaction { private static final String TAG = VerifyCallStateChangeTransaction.class.getSimpleName(); private static final long CALL_STATE_TIMEOUT_MILLISECONDS = 2000L; private static final long CALL_STATE_TIMEOUT_MILLISECONDS = 5000L; private final Call mCall; private final Set<Integer> mTargetCallStates; private final CompletableFuture<CallTransactionResult> mTransactionResult = Loading