diff options
author | erfanian <erfanian@google.com> | 2018-06-22 17:45:35 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-26 13:41:12 -0700 |
commit | 1a9b3bf23847031adda379a56dea84f7e094d263 (patch) | |
tree | 3cd73aec5a1cb7fe6aa930f6b5e002a81739ceec /java | |
parent | 79a9ae7be17c7fe50e6812a47cdd6e7ce5d07966 (diff) |
Make sure we have a context before we use it.
Test: none
PiperOrigin-RevId: 201767444
Change-Id: Id4622886ba7ebc8a3e2a3b2cfa5d80bdfd8c885f
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/dialer/searchfragment/list/NewSearchFragment.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java index fd6db75e9..65ce87340 100644 --- a/java/com/android/dialer/searchfragment/list/NewSearchFragment.java +++ b/java/com/android/dialer/searchfragment/list/NewSearchFragment.java @@ -404,7 +404,7 @@ public final class NewSearchFragment extends Fragment } // If the user dismissed the prompt without granting us the permission, don't load the cursor. - if (!PermissionsUtil.hasLocationPermissions(getContext())) { + if (getContext() == null || !PermissionsUtil.hasLocationPermissions(getContext())) { return; } |