From 6dcf7abc4c2a81db2a8bea233153c015764ed563 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 20 Oct 2015 17:10:47 -0700 Subject: Add null check for cursor. Bug: 24134270 Change-Id: I5d28c633abee226f7bc2d63ec80340cd6deb9c79 --- src/com/android/dialer/filterednumber/BlockedNumberFragment.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/com') diff --git a/src/com/android/dialer/filterednumber/BlockedNumberFragment.java b/src/com/android/dialer/filterednumber/BlockedNumberFragment.java index cee7a0d4f..a89ca84c6 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumberFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumberFragment.java @@ -168,6 +168,11 @@ public class BlockedNumberFragment extends ListFragment @Override public void onVoicemailStatusFetched(Cursor cursor) { + if (cursor == null) { + hideSetting.setVisibility(View.GONE); + return; + } + final boolean hasVisualVoicemailSource = mVoicemailStatusHelper.getNumberActivityVoicemailSources(cursor) > 0; View hideSetting = getActivity().findViewById(R.id.hide_blocked_calls_setting); -- cgit v1.2.3