Merge commit 'remotes/korg/cupcake' into merge
Jean-Baptiste Queru [Tue, 17 Mar 2009 23:35:01 +0000 (16:35 -0700)]
Conflicts:
docs/index.html
src/com/android/providers/downloads/DownloadProvider.java
src/com/android/providers/downloads/DownloadService.java

1  2 
src/com/android/providers/downloads/DownloadService.java

@@@ -624,20 -622,20 +624,20 @@@ public class DownloadService extends Se
              // 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;