resolved conflicts for merge of 74fb97de to master
Change-Id: Ia068e1e5f9f4995a84d5a184efa1cc76d0d159e4
diff --git a/src/com/android/phone/CallCommandService.java b/src/com/android/phone/CallCommandService.java
index 5238911..2076979 100644
--- a/src/com/android/phone/CallCommandService.java
+++ b/src/com/android/phone/CallCommandService.java
@@ -168,30 +168,10 @@
@Override
public void swap() {
- if (!PhoneUtils.okToSwapCalls(mCallManager)) {
- // TODO: throw an error instead?
- return;
- }
-
- // Swap the fg and bg calls.
- // In the future we may provides some way for user to choose among
- // multiple background calls, for now, always act on the first background calll.
- PhoneUtils.switchHoldingAndActive(mCallManager.getFirstActiveBgCall());
-
- final PhoneGlobals mApp = PhoneGlobals.getInstance();
-
- // If we have a valid BluetoothPhoneService then since CDMA network or
- // Telephony FW does not send us information on which caller got swapped
- // we need to update the second call active state in BluetoothPhoneService internally
- if (mCallManager.getBgPhone().getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
- final IBluetoothHeadsetPhone btPhone = mApp.getBluetoothPhoneService();
- if (btPhone != null) {
- try {
- btPhone.cdmaSwapSecondCallState();
- } catch (RemoteException e) {
- Log.e(TAG, Log.getStackTraceString(new Throwable()));
- }
- }
+ try {
+ PhoneUtils.swap();
+ } catch (Exception e) {
+ Log.e(TAG, "Error during swap().", e);
}
}