diff options
Diffstat (limited to 'src/com/android/dialer/dialpad/SmartDialCursorLoader.java')
-rw-r--r-- | src/com/android/dialer/dialpad/SmartDialCursorLoader.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/dialer/dialpad/SmartDialCursorLoader.java b/src/com/android/dialer/dialpad/SmartDialCursorLoader.java index 372692eae..f83f18cd7 100644 --- a/src/com/android/dialer/dialpad/SmartDialCursorLoader.java +++ b/src/com/android/dialer/dialpad/SmartDialCursorLoader.java @@ -25,6 +25,7 @@ import android.net.Uri; import android.util.Log; import com.android.contacts.common.list.PhoneNumberListAdapter.PhoneQuery; +import com.android.contacts.common.util.PermissionsUtil; import com.android.dialer.database.DialerDatabaseHelper; import com.android.dialer.database.DialerDatabaseHelper.ContactNumber; import com.android.dialerbind.DatabaseHelperManager; @@ -77,6 +78,10 @@ public class SmartDialCursorLoader extends AsyncTaskLoader<Cursor> { Log.v(TAG, "Load in background " + mQuery); } + if (!PermissionsUtil.hasContactsPermissions(mContext)) { + return new MatrixCursor(PhoneQuery.PROJECTION_PRIMARY); + } + /** Loads results from the database helper. */ final DialerDatabaseHelper dialerDatabaseHelper = DatabaseHelperManager.getDatabaseHelper( mContext); |