From dfbecd3eb22237741e6ca175e29beee4854b1120 Mon Sep 17 00:00:00 2001 From: Santos Cordon Date: Thu, 29 Aug 2013 15:04:23 -0700 Subject: Show glowpad for call waiting calls Two things were happening: 1. AnswerPresenter stopped listening to call event after the first incoming call 2. It was not checking for CALL_WAITING && INCOMING as valid incoming call states. fix both. bug: 10538445 Change-Id: I491f2381c33c431f0cbfcc0000f50efdc107cce9 --- InCallUI/src/com/android/incallui/AnswerPresenter.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'InCallUI/src/com') diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 1c970d7db..76a7b563e 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -39,13 +39,10 @@ public class AnswerPresenter extends Presenter // TODO: change so that answer presenter never starts up if it's not incoming. if (call != null) { processIncomingCall(call); - - // Listen for call updates for the current call. - calls.addCallUpdateListener(mCallId, this); - - // Listen for incoming calls. - calls.addListener(this); } + + // Listen for incoming calls. + calls.addListener(this); } @Override @@ -67,6 +64,10 @@ public class AnswerPresenter extends Presenter private void processIncomingCall(Call call) { mCallId = call.getCallId(); + + // Listen for call updates for the current call. + CallList.getInstance().addCallUpdateListener(mCallId, this); + Log.d(TAG, "Showing incoming for call id: " + mCallId); final ArrayList textMsgs = CallList.getInstance().getTextResponses( call.getCallId()); @@ -84,10 +85,9 @@ public class AnswerPresenter extends Presenter @Override public void onCallStateChanged(Call call) { Log.d(TAG, "onCallStateChange() " + call); - if (call.getState() != Call.State.INCOMING) { + if (call.getState() != Call.State.INCOMING && call.getState() != Call.State.CALL_WAITING) { // Stop listening for updates. CallList.getInstance().removeCallUpdateListener(mCallId, this); - CallList.getInstance().removeListener(this); getUi().showAnswerUi(false); mCallId = Call.INVALID_CALL_ID; -- cgit v1.2.3