diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-28 15:23:54 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2015-10-28 15:23:54 -0700 |
commit | 66338d42fb5fcd708ae5971c2c2f9c4efe705f2b (patch) | |
tree | 8ec853035fb200f423b3f76372b2c2eade9aab04 | |
parent | a473ff274b3bff29c6533f51b9346a414e206e6b (diff) |
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
-rw-r--r-- | src/com/android/dialer/filterednumber/BlockedNumbersFragment.java | 8 |
1 files changed, 7 insertions, 1 deletions
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; |