summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-08-05 03:34:38 -0700
committerSantos Cordon <santoscordon@google.com>2013-08-05 22:05:22 +0000
commit258eb86d9f64ebebee4ec4e39af385364ca0c071 (patch)
treecc1f9ca0d1f967545e3e27f316f734a604c94403
parentb585c66c5fbf485256ef8fef5b0d06f51d8d9bf5 (diff)
Use rejectCall() for rejecting call.
Was previously using non-functional disconnectCall(). Change-Id: I14f17290f74434dfb85a7671374d1b6070595394
-rw-r--r--InCallUI/src/com/android/incallui/AnswerPresenter.java6
-rw-r--r--InCallUI/src/com/android/incallui/CallCommandClient.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java
index 5663fd94f..123fe9ce9 100644
--- a/InCallUI/src/com/android/incallui/AnswerPresenter.java
+++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java
@@ -50,16 +50,16 @@ public class AnswerPresenter extends Presenter<AnswerPresenter.AnswerUi>
public void onAnswer() {
Preconditions.checkNotNull(mCall);
- Logger.d(this, "onAnswer");
+ Logger.d(this, "onAnswer " + mCall.getCallId());
CallCommandClient.getInstance().answerCall(mCall.getCallId());
}
public void onDecline() {
Preconditions.checkNotNull(mCall);
- Logger.d(this, "onDecline");
+ Logger.d(this, "onDecline " + mCall.getCallId());
- CallCommandClient.getInstance().disconnectCall(mCall.getCallId());
+ CallCommandClient.getInstance().rejectCall(mCall.getCallId());
}
public void onText() {
diff --git a/InCallUI/src/com/android/incallui/CallCommandClient.java b/InCallUI/src/com/android/incallui/CallCommandClient.java
index 94ec3f525..ae3be92ac 100644
--- a/InCallUI/src/com/android/incallui/CallCommandClient.java
+++ b/InCallUI/src/com/android/incallui/CallCommandClient.java
@@ -56,6 +56,14 @@ public class CallCommandClient {
}
}
+ public void rejectCall(int callId) {
+ try {
+ mCommandService.rejectCall(callId);
+ } catch (RemoteException e) {
+ Logger.e(this, "Error rejecting call.", e);
+ }
+ }
+
public void disconnectCall(int callId) {
try {
mCommandService.disconnectCall(callId);