diff options
Diffstat (limited to 'src/com/android/dialer/list/SearchFragment.java')
-rw-r--r-- | src/com/android/dialer/list/SearchFragment.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java index c314478ca..f86c0e5cf 100644 --- a/src/com/android/dialer/list/SearchFragment.java +++ b/src/com/android/dialer/list/SearchFragment.java @@ -37,6 +37,7 @@ import com.android.contacts.common.list.ContactEntryListAdapter; import com.android.contacts.common.list.ContactListItemView; import com.android.contacts.common.list.OnPhoneNumberPickerActionListener; import com.android.contacts.common.list.PhoneNumberPickerFragment; +import com.android.contacts.common.util.PermissionsUtil; import com.android.contacts.common.util.ViewUtil; import com.android.contacts.commonbind.analytics.AnalyticsUtil; import com.android.dialer.dialpad.DialpadFragment.ErrorDialogFragment; @@ -287,4 +288,14 @@ public class SearchFragment extends PhoneNumberPickerFragment { listView.getPaddingEnd(), listView.getPaddingBottom()); } + + @Override + protected void startLoading() { + if (PermissionsUtil.hasContactsPermissions(getActivity())) { + super.startLoading(); + } else if (TextUtils.isEmpty(getQueryString())) { + // Clear out any existing call shortcuts. + getAdapter().setQueryString(null); + } + } } |