summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-05-14 18:51:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-14 18:51:00 +0000
commit7cc137a53f1ab7ba21aa2253cc044b5a8b961e43 (patch)
tree4ec99d2904df96799f2a21c1eb296fdf0485f676 /InCallUI
parent83d27b0310c5cf501b0e121bd3a12357e3832857 (diff)
parent0bf6ade37db5274f0186516765ee9985c5a2133d (diff)
am c7457fe1: Merge "Swap calls when clicking on secondary photo in InCallUI" into master-nova
* commit 'c7457fe1e11cd8ed74c02a40a38cf56e3d4fbb90': Swap calls when clicking on secondary photo in InCallUI
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/CallCardPresenter.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardPresenter.java b/InCallUI/src/com/android/incallui/CallCardPresenter.java
index 42723399e..80b80aa72 100644
--- a/InCallUI/src/com/android/incallui/CallCardPresenter.java
+++ b/InCallUI/src/com/android/incallui/CallCardPresenter.java
@@ -24,6 +24,7 @@ import android.graphics.Bitmap;
import android.telephony.DisconnectCause;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
+import android.telecomm.InCallAdapter;
import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.text.format.DateUtils;
@@ -463,7 +464,18 @@ public class CallCardPresenter extends Presenter<CallCardPresenter.CallCardUi>
}
public void secondaryPhotoClicked() {
- CallCommandClient.getInstance().swap();
+ if (mSecondary == null) {
+ Log.wtf(this, "Secondary photo clicked but no secondary call.");
+ return;
+ }
+
+ String callId = CallInfoTranslator.getTelecommCallId(mSecondary);
+ if (callId != null) {
+ Log.i(this, "Swapping call to foreground: " + callId);
+ InCallPresenter.getInstance().getTelecommAdapter().unholdCall(callId);
+ } else {
+ Log.wtf(this, "Telecomm callId not found for call: " + callId);
+ }
}
public void endCallClicked() {