From 7b2248bfff11c50e208908cb74b5f94b3ad7a3c0 Mon Sep 17 00:00:00 2001 From: Sailesh Nepal Date: Tue, 1 Apr 2014 12:33:49 -0700 Subject: InCallUI - Use String IDs Change-Id: Ibacb79658c146466d4f23bfcf7af0ebfb6e84dd0 --- InCallUI/src/com/android/incallui/AnswerPresenter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'InCallUI/src/com/android/incallui/AnswerPresenter.java') diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 093815822..44485e9a5 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -26,7 +26,7 @@ public class AnswerPresenter extends Presenter private static final String TAG = AnswerPresenter.class.getSimpleName(); - private int mCallId = Call.INVALID_CALL_ID; + private String mCallId; private Call mCall = null; @Override @@ -52,7 +52,7 @@ public class AnswerPresenter extends Presenter // This is necessary because the activity can be destroyed while an incoming call exists. // This happens when back button is pressed while incoming call is still being shown. - if (mCallId != Call.INVALID_CALL_ID) { + if (mCallId != null) { CallList.getInstance().removeCallUpdateListener(mCallId, this); } } @@ -73,7 +73,7 @@ public class AnswerPresenter extends Presenter // getting updates here. Log.d(this, "onIncomingCall: " + this); if (getUi() != null) { - if (call.getCallId() != mCallId) { + if (!call.getCallId().equals(mCallId)) { // A new call is coming in. processIncomingCall(call); } @@ -111,12 +111,12 @@ public class AnswerPresenter extends Presenter // mCallId will hold the state of the call. We don't clear the mCall variable here as // it may be useful for sending text messages after phone disconnects. - mCallId = Call.INVALID_CALL_ID; + mCallId = null; } } public void onAnswer() { - if (mCallId == Call.INVALID_CALL_ID) { + if (mCallId == null) { return; } -- cgit v1.2.3