From 258eb86d9f64ebebee4ec4e39af385364ca0c071 Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Mon, 5 Aug 2013 03:34:38 -0700 Subject: Use rejectCall() for rejecting call. Was previously using non-functional disconnectCall(). Change-Id: I14f17290f74434dfb85a7671374d1b6070595394 --- InCallUI/src/com/android/incallui/AnswerPresenter.java | 6 +++--- InCallUI/src/com/android/incallui/CallCommandClient.java | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'InCallUI') 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 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); -- cgit v1.2.3