diff options
author | Santos Cordon <santoscordon@google.com> | 2013-08-05 03:34:38 -0700 |
---|---|---|
committer | Santos Cordon <santoscordon@google.com> | 2013-08-05 22:05:22 +0000 |
commit | 258eb86d9f64ebebee4ec4e39af385364ca0c071 (patch) | |
tree | cc1f9ca0d1f967545e3e27f316f734a604c94403 | |
parent | b585c66c5fbf485256ef8fef5b0d06f51d8d9bf5 (diff) |
Use rejectCall() for rejecting call.
Was previously using non-functional disconnectCall().
Change-Id: I14f17290f74434dfb85a7671374d1b6070595394
-rw-r--r-- | InCallUI/src/com/android/incallui/AnswerPresenter.java | 6 | ||||
-rw-r--r-- | InCallUI/src/com/android/incallui/CallCommandClient.java | 8 |
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); |