import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.regex.Matcher;
PackageManager pm = context.getPackageManager();
intent.setDataAndType(Uri.fromParts("file", "", null), mimeType);
- List<ResolveInfo> list = pm.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY);
+ ResolveInfo ri = pm.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
//Log.i(Constants.TAG, "*** FILENAME QUERY " + intent + ": " + list);
- if (list.size() == 0) {
+ if (ri == null) {
if (Config.LOGD) {
Log.d(Constants.TAG, "no handler found for type " + mimeType);
}
Downloads.CONTENT_URI,
null,
"( " +
- Downloads.COLUMN_STATUS + " = " + Downloads.STATUS_SUCCESS + " AND " +
+ Downloads.COLUMN_STATUS + " = '" + Downloads.STATUS_SUCCESS + "' AND " +
Downloads.COLUMN_DESTINATION +
- " = " + Downloads.DESTINATION_CACHE_PARTITION_PURGEABLE + " )",
+ " = '" + Downloads.DESTINATION_CACHE_PARTITION_PURGEABLE + "' )",
null,
Downloads.COLUMN_LAST_MODIFICATION);
if (cursor == null) {