// prevent use from using content: so it's got to be file: or
// nothing
- mimetypeIntent.setDataAndType(Uri.fromParts("file", "", null), info.mimetype);
+ mimetypeIntent.setDataAndType(Uri.fromParts("file", "", null), info.mMimeType);
- List<ResolveInfo> list = getPackageManager().queryIntentActivities(mimetypeIntent,
+ ResolveInfo ri = getPackageManager().resolveActivity(mimetypeIntent,
PackageManager.MATCH_DEFAULT_ONLY);
//Log.i(Constants.TAG, "*** QUERY " + mimetypeIntent + ": " + list);
- if (list.size() == 0) {
+ if (ri == null) {
if (Config.LOGD) {
- Log.d(Constants.TAG, "no application to handle MIME type " + info.mimetype);
+ Log.d(Constants.TAG, "no application to handle MIME type " + info.mMimeType);
}
- info.status = Downloads.STATUS_NOT_ACCEPTABLE;
+ info.mStatus = Downloads.STATUS_NOT_ACCEPTABLE;
- Uri uri = ContentUris.withAppendedId(Downloads.CONTENT_URI, info.id);
+ Uri uri = ContentUris.withAppendedId(Downloads.CONTENT_URI, info.mId);
ContentValues values = new ContentValues();
- values.put(Downloads.STATUS, Downloads.STATUS_NOT_ACCEPTABLE);
+ values.put(Downloads.COLUMN_STATUS, Downloads.STATUS_NOT_ACCEPTABLE);
getContentResolver().update(uri, values, null, null);
info.sendIntentIfRequested(uri, this);
return;