The provider would read the string "null" and always refuse restricted access.
Change-Id: I1a592c2284ada8ab3c41bc71e510bd4ec7fd05d8
mQueryHandler.setLoadingJoinSuggestions(false);
String[] projection = getProjectionForQuery();
- Uri uri = getUriToQuery().buildUpon()
- .appendQueryParameter(ContactsContract.REQUESTING_PACKAGE_PARAM_KEY,
- getCallingPackage())
- .build();
+ String callingPackage = getCallingPackage();
+ Uri uri = getUriToQuery();
+ if (!TextUtils.isEmpty(callingPackage)) {
+ uri = uri.buildUpon()
+ .appendQueryParameter(ContactsContract.REQUESTING_PACKAGE_PARAM_KEY,
+ callingPackage)
+ .build();
+ }
// Kick off the new query
switch (mMode) {