From 90dd50ac1624312631005e420fd9d38a8be11be1 Mon Sep 17 00:00:00 2001 From: Mengjun Leng Date: Tue, 31 Dec 2019 17:00:15 +0800 Subject: [PATCH] Fix the call is soundless due another call is active BT may unhold the held call while a dialing call is ongoing, so that both calls can be active shortly leading to fail the sound output. To fix it, block the processing of unholding while an outgoing call is present. Test: manual Bug: 147027350 Change-Id: If31744f0eceb5bf6957133251abcf191c4d12a4d --- src/com/android/server/telecom/CallsManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java index afd1c6b73..61c2d9089 100644 --- a/src/com/android/server/telecom/CallsManager.java +++ b/src/com/android/server/telecom/CallsManager.java @@ -2385,6 +2385,11 @@ public class CallsManager extends Call.ListenerBase if (!mCalls.contains(call)) { Log.w(this, "Unknown call (%s) asked to be removed from hold", call); } else { + if (getOutgoingCall() != null) { + Log.w(this, "There is an outgoing call, so it is unable to unhold this call %s", + call); + return; + } Call activeCall = (Call) mConnectionSvrFocusMgr.getCurrentFocusCall(); String activeCallId = null; if (activeCall != null && !activeCall.isLocallyDisconnecting()) {