summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-11-03 11:29:44 -0800
committerYorke Lee <yorkelee@google.com>2014-11-03 14:12:27 -0800
commitd644aef567decca5d6351bb4def4b4e65517836e (patch)
tree8d6f08747ba4815b26c9891a538f485d2c7e31a9
parentb5d055b15fcd9bbc083c88958e26c52a28b939dc (diff)
Send DTMF tones for dialing call
Fallback to active call only if outgoing call is not present. Bug: 18224969 Change-Id: Ic3238bf539fe2188dce8ed4010652a6fc26a6435
-rw-r--r--InCallUI/src/com/android/incallui/CallList.java8
-rw-r--r--InCallUI/src/com/android/incallui/DialpadPresenter.java4
2 files changed, 10 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/CallList.java b/InCallUI/src/com/android/incallui/CallList.java
index ed52071e9..40fcf534c 100644
--- a/InCallUI/src/com/android/incallui/CallList.java
+++ b/InCallUI/src/com/android/incallui/CallList.java
@@ -211,6 +211,14 @@ public class CallList implements InCallPhoneListener {
return retval;
}
+ public Call getOutgoingOrActive() {
+ Call retval = getOutgoingCall();
+ if (retval == null) {
+ retval = getActiveCall();
+ }
+ return retval;
+ }
+
/**
* A call that is waiting for {@link PhoneAccount} selection
*/
diff --git a/InCallUI/src/com/android/incallui/DialpadPresenter.java b/InCallUI/src/com/android/incallui/DialpadPresenter.java
index d76e6e9b7..c4ee02102 100644
--- a/InCallUI/src/com/android/incallui/DialpadPresenter.java
+++ b/InCallUI/src/com/android/incallui/DialpadPresenter.java
@@ -30,7 +30,7 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi>
public void onUiReady(DialpadUi ui) {
super.onUiReady(ui);
InCallPresenter.getInstance().addListener(this);
- mCall = CallList.getInstance().getActiveCall();
+ mCall = CallList.getInstance().getOutgoingOrActive();
}
@Override
@@ -42,7 +42,7 @@ public class DialpadPresenter extends Presenter<DialpadPresenter.DialpadUi>
@Override
public void onStateChange(InCallPresenter.InCallState oldState,
InCallPresenter.InCallState newState, CallList callList) {
- mCall = callList.getActiveCall();
+ mCall = callList.getOutgoingOrActive();
Log.d(this, "DialpadPresenter mCall = " + mCall);
}