Fix crash for dynamic permissions + background directory load

This commit is contained in:
Moxie Marlinspike 2017-12-20 11:10:12 -08:00
parent 81cd20062c
commit 425d6b8adf

View File

@ -213,8 +213,11 @@ public class ContactSelectionListFragment extends Fragment
public void reset() { public void reset() {
selectedContacts.clear(); selectedContacts.clear();
if (!isDetached() && !isRemoving() && getActivity() != null && !getActivity().isFinishing()) {
getLoaderManager().restartLoader(0, null, this); getLoaderManager().restartLoader(0, null, this);
} }
}
@Override @Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) { public Loader<Cursor> onCreateLoader(int id, Bundle args) {