From 66338d42fb5fcd708ae5971c2c2f9c4efe705f2b Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 28 Oct 2015 15:23:54 -0700 Subject: Don't update on voicemail fetch if no activity. The right thing to do is to return early in this case. This is a theoretical fix for the tagged bug; presuming that this exception caused code execution to terminate prematurely and delete the voicemail as it would be expected to. Bug: 25346075 Change-Id: I643ff4e8abf723f3673b38f5933416730e5d5f9f --- src/com/android/dialer/filterednumber/BlockedNumbersFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/com') diff --git a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java index fa40e2609..56f5fcd2e 100644 --- a/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java +++ b/src/com/android/dialer/filterednumber/BlockedNumbersFragment.java @@ -15,6 +15,7 @@ */ package com.android.dialer.filterednumber; +import android.app.Activity; import android.app.ListFragment; import android.app.LoaderManager; import android.content.Context; @@ -195,7 +196,12 @@ public class BlockedNumbersFragment extends ListFragment @Override public void onVoicemailStatusFetched(Cursor cursor) { - final View hideSetting = getActivity().findViewById(R.id.hide_blocked_calls_setting); + Activity activity = getActivity(); + if (activity == null) { + return; + } + + final View hideSetting = activity.findViewById(R.id.hide_blocked_calls_setting); if (cursor == null) { hideSetting.setVisibility(View.GONE); return; -- cgit v1.2.3