From 24b5503ebfa1edb683ed6e574a17d2e3f34732dc Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Mon, 13 Jul 2015 11:49:58 -0700 Subject: Null protect getUi() in configureAnswerTargetsForSms Bug: 22442874 Change-Id: Id3d522415db3a551c646950a7023478226182ae9 --- InCallUI/src/com/android/incallui/AnswerPresenter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InCallUI/src/com/android/incallui/AnswerPresenter.java b/InCallUI/src/com/android/incallui/AnswerPresenter.java index 1453fa517..a5a88ffa5 100644 --- a/InCallUI/src/com/android/incallui/AnswerPresenter.java +++ b/InCallUI/src/com/android/incallui/AnswerPresenter.java @@ -265,6 +265,9 @@ public class AnswerPresenter extends Presenter } private void configureAnswerTargetsForSms(Call call, List textMsgs) { + if (getUi() == null) { + return; + } mHasTextMessages = textMsgs != null; boolean withSms = call.can(android.telecom.Call.Details.CAPABILITY_RESPOND_VIA_TEXT) -- cgit v1.2.3