summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-06-21 23:14:39 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-06-21 23:14:39 +0000
commit1432364e3e36a8243f5a96a219e91ecb60ef65a1 (patch)
treee0310cba619c3267d615a51a42d9b146871d1733
parent3d97f592b5902b885dfe47e700b8e960047a090b (diff)
parentcda290995783e09079df80a0ca5279887d5f37e1 (diff)
Merge "Use context only after it is available."
-rw-r--r--java/com/android/dialer/searchfragment/list/NewSearchFragment.java3
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();