diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-06-21 23:14:39 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-06-21 23:14:39 +0000 |
commit | 1432364e3e36a8243f5a96a219e91ecb60ef65a1 (patch) | |
tree | e0310cba619c3267d615a51a42d9b146871d1733 /java/com/android/dialer/searchfragment | |
parent | 3d97f592b5902b885dfe47e700b8e960047a090b (diff) | |
parent | cda290995783e09079df80a0ca5279887d5f37e1 (diff) |
Merge "Use context only after it is available."
Diffstat (limited to 'java/com/android/dialer/searchfragment')
-rw-r--r-- | java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index 5417fcf8c..fd6db75e9 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -275,7 +275,8 @@ public final class NewSearchFragment extends Fragment return false; } - if (PermissionsUtil.hasLocationPermissions(getContext()) + if (getContext() == null + || PermissionsUtil.hasLocationPermissions(getContext()) || hasBeenDismissed() || !isRegularSearch()) { adapter.hideLocationPermissionRequest(); |