Loading flags/telecom_calls_manager_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -17,17 +17,6 @@ flag { bug: "327038818" } # OWNER=tjstuart TARGET=24Q4 flag { name: "transactional_hold_disconnects_unholdable" namespace: "telecom" description: "Disconnect ongoing unholdable calls for CallControlCallbacks" bug: "340621152" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tgunn TARGET=25Q2 flag { name: "enable_call_audio_watchdog" Loading src/com/android/server/telecom/CallsManager.java +0 −38 Original line number Diff line number Diff line Loading @@ -4224,44 +4224,6 @@ public class CallsManager extends Call.ListenerBase } } /** * The transactional unflagged (original) code path to hold or swap the active call in favor of * a new call request. Refer to * {@link CallsManagerCallSequencingAdapter#transactionHoldPotentialActiveCallForNewCall}. */ public void transactionHoldPotentialActiveCallForNewCallUnflagged(Call activeCall, Call newCall, OutcomeReceiver<Boolean, CallException> callback) { // before attempting CallsManager#holdActiveCallForNewCall(Call), check if it'll fail // early if (!canHold(activeCall) && !(supportsHold(activeCall) && areFromSameSource(activeCall, newCall))) { String msg = "call does not support hold"; Log.i(this, "transactionHoldPotentialActiveCallForNewCall: " + msg); callback.onError(new CallException(msg, CallException.CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL)); if (mFeatureFlags.enableCallExceptionAnomReports()) { mAnomalyReporter.reportAnomaly(CANNOT_HOLD_CURRENT_ACTIVE_CALL_ERROR_UUID, msg); } return; } // attempt to hold the active call if (!holdActiveCallForNewCall(newCall)) { String msg = "cannot hold active call failed"; Log.i(this, "transactionHoldPotentialActiveCallForNewCall: " + msg); callback.onError(new CallException(msg, CallException.CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL)); if (mFeatureFlags.enableCallExceptionAnomReports()) { mAnomalyReporter.reportAnomaly(CANNOT_HOLD_CURRENT_ACTIVE_CALL_ERROR_UUID, msg); } return; } // officially mark the activeCall as held markCallAsOnHold(activeCall); callback.onResult(true); } public boolean canHoldOrSwapActiveCall(Call activeCall, Call newCall) { return canHold(activeCall) || sameSourceHoldCase(activeCall, newCall); } Loading src/com/android/server/telecom/callsequencing/CallsManagerCallSequencingAdapter.java +18 −25 Original line number Diff line number Diff line Loading @@ -199,8 +199,6 @@ public class CallsManagerCallSequencingAdapter { callback.onResult(true); return; } if (mFeatureFlags.transactionalHoldDisconnectsUnholdable()) { // prevent bad actors from disconnecting the activeCall. Instead, clients will need to // notify the user that they need to disconnect the ongoing call before making the // new call ACTIVE. Loading @@ -222,11 +220,6 @@ public class CallsManagerCallSequencingAdapter { mCallsManager.transactionHoldPotentialActiveCallForNewCallOld(newCall, activeCall, callback); } } else { // The unflagged path (aka original code with no flags). mCallsManager.transactionHoldPotentialActiveCallForNewCallUnflagged(activeCall, newCall, callback); } } /** Loading src/com/android/server/telecom/callsequencing/voip/RequestNewActiveCallTransaction.java +0 −8 Original line number Diff line number Diff line Loading @@ -71,14 +71,6 @@ public class RequestNewActiveCallTransaction extends CallTransaction { return future; } if (!Flags.transactionalHoldDisconnectsUnholdable() && mCallsManager.getActiveCall() != null) { future.complete(new CallTransactionResult( CallException.CODE_CALL_CANNOT_BE_SET_TO_ACTIVE, "Already an active call. Request hold on current active call.")); return future; } mCallsManager.requestNewCallFocusAndVerify(mCall, new OutcomeReceiver<>() { @Override public void onResult(Boolean result) { Loading tests/src/com/android/server/telecom/tests/CallsManagerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -4016,7 +4016,6 @@ public class CallsManagerTest extends TelecomTestCase { boolean expectOnResult) throws InterruptedException { CountDownLatch latch = new CountDownLatch(1); when(mFeatureFlags.transactionalHoldDisconnectsUnholdable()).thenReturn(true); when(mConnectionSvrFocusMgr.getCurrentFocusCall()).thenReturn(activeCall); mCallsManager.getCallSequencingAdapter().transactionHoldPotentialActiveCallForNewCall( newCall, Loading Loading
flags/telecom_calls_manager_flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -17,17 +17,6 @@ flag { bug: "327038818" } # OWNER=tjstuart TARGET=24Q4 flag { name: "transactional_hold_disconnects_unholdable" namespace: "telecom" description: "Disconnect ongoing unholdable calls for CallControlCallbacks" bug: "340621152" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tgunn TARGET=25Q2 flag { name: "enable_call_audio_watchdog" Loading
src/com/android/server/telecom/CallsManager.java +0 −38 Original line number Diff line number Diff line Loading @@ -4224,44 +4224,6 @@ public class CallsManager extends Call.ListenerBase } } /** * The transactional unflagged (original) code path to hold or swap the active call in favor of * a new call request. Refer to * {@link CallsManagerCallSequencingAdapter#transactionHoldPotentialActiveCallForNewCall}. */ public void transactionHoldPotentialActiveCallForNewCallUnflagged(Call activeCall, Call newCall, OutcomeReceiver<Boolean, CallException> callback) { // before attempting CallsManager#holdActiveCallForNewCall(Call), check if it'll fail // early if (!canHold(activeCall) && !(supportsHold(activeCall) && areFromSameSource(activeCall, newCall))) { String msg = "call does not support hold"; Log.i(this, "transactionHoldPotentialActiveCallForNewCall: " + msg); callback.onError(new CallException(msg, CallException.CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL)); if (mFeatureFlags.enableCallExceptionAnomReports()) { mAnomalyReporter.reportAnomaly(CANNOT_HOLD_CURRENT_ACTIVE_CALL_ERROR_UUID, msg); } return; } // attempt to hold the active call if (!holdActiveCallForNewCall(newCall)) { String msg = "cannot hold active call failed"; Log.i(this, "transactionHoldPotentialActiveCallForNewCall: " + msg); callback.onError(new CallException(msg, CallException.CODE_CANNOT_HOLD_CURRENT_ACTIVE_CALL)); if (mFeatureFlags.enableCallExceptionAnomReports()) { mAnomalyReporter.reportAnomaly(CANNOT_HOLD_CURRENT_ACTIVE_CALL_ERROR_UUID, msg); } return; } // officially mark the activeCall as held markCallAsOnHold(activeCall); callback.onResult(true); } public boolean canHoldOrSwapActiveCall(Call activeCall, Call newCall) { return canHold(activeCall) || sameSourceHoldCase(activeCall, newCall); } Loading
src/com/android/server/telecom/callsequencing/CallsManagerCallSequencingAdapter.java +18 −25 Original line number Diff line number Diff line Loading @@ -199,8 +199,6 @@ public class CallsManagerCallSequencingAdapter { callback.onResult(true); return; } if (mFeatureFlags.transactionalHoldDisconnectsUnholdable()) { // prevent bad actors from disconnecting the activeCall. Instead, clients will need to // notify the user that they need to disconnect the ongoing call before making the // new call ACTIVE. Loading @@ -222,11 +220,6 @@ public class CallsManagerCallSequencingAdapter { mCallsManager.transactionHoldPotentialActiveCallForNewCallOld(newCall, activeCall, callback); } } else { // The unflagged path (aka original code with no flags). mCallsManager.transactionHoldPotentialActiveCallForNewCallUnflagged(activeCall, newCall, callback); } } /** Loading
src/com/android/server/telecom/callsequencing/voip/RequestNewActiveCallTransaction.java +0 −8 Original line number Diff line number Diff line Loading @@ -71,14 +71,6 @@ public class RequestNewActiveCallTransaction extends CallTransaction { return future; } if (!Flags.transactionalHoldDisconnectsUnholdable() && mCallsManager.getActiveCall() != null) { future.complete(new CallTransactionResult( CallException.CODE_CALL_CANNOT_BE_SET_TO_ACTIVE, "Already an active call. Request hold on current active call.")); return future; } mCallsManager.requestNewCallFocusAndVerify(mCall, new OutcomeReceiver<>() { @Override public void onResult(Boolean result) { Loading
tests/src/com/android/server/telecom/tests/CallsManagerTest.java +0 −1 Original line number Diff line number Diff line Loading @@ -4016,7 +4016,6 @@ public class CallsManagerTest extends TelecomTestCase { boolean expectOnResult) throws InterruptedException { CountDownLatch latch = new CountDownLatch(1); when(mFeatureFlags.transactionalHoldDisconnectsUnholdable()).thenReturn(true); when(mConnectionSvrFocusMgr.getCurrentFocusCall()).thenReturn(activeCall); mCallsManager.getCallSequencingAdapter().transactionHoldPotentialActiveCallForNewCall( newCall, Loading