From 4f5b60270e59c8e7dfb22489361ef83c4630485a Mon Sep 17 00:00:00 2001 From: Christine Chen Date: Thu, 5 Sep 2013 19:24:04 -0700 Subject: Adds UI null check. - Fixes NullPointerException that happens sometimes when the UI is asked to bring up the reject with text message popup. Bug: 10608694 Change-Id: I32b8d9f0e1c115dd07ec6000275a882a4b9e1316 --- InCallUI/src/com/android/incallui/AnswerPresenter.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 4c0f1d628..7f27133ed 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -127,12 +127,16 @@ public class AnswerPresenter extends Presenter } public void onText() { - getUi().showMessageDialogue(); + if (getUi() != null) { + getUi().showMessageDialogue(); + } } public void rejectCallWithMessage(String message) { Log.d(this, "sendTextToDefaultActivity()..."); - getUi().dismissPopup(); + if (getUi() != null) { + getUi().dismissPopup(); + } CallCommandClient.getInstance().rejectCall(mCallId, true, message); } -- cgit v1.2.3