summaryrefslogtreecommitdiffstats
path: root/ui/src/com/android/providers/downloads
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-22 13:47:19 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-22 13:47:19 -0700
commitbe23a726e81b33d74708b90bab077802eced0f5f (patch)
tree1b45087b1431cd9cdf7a9284528bf2cf87b8f598 /ui/src/com/android/providers/downloads
parent89eb951181e07ac00aa4d2bf7a183c6606cbdea2 (diff)
parenta1902f4d26a5c87dddf52e2e855bcd6ed9734ab2 (diff)
downloadandroid_packages_providers_DownloadProvider-be23a726e81b33d74708b90bab077802eced0f5f.tar.gz
android_packages_providers_DownloadProvider-be23a726e81b33d74708b90bab077802eced0f5f.tar.bz2
android_packages_providers_DownloadProvider-be23a726e81b33d74708b90bab077802eced0f5f.zip
Merge "To remove the old DRM support totally because we added the new Forward Lock support in Download Provider."
Diffstat (limited to 'ui/src/com/android/providers/downloads')
-rw-r--r--ui/src/com/android/providers/downloads/ui/DownloadAdapter.java25
1 files changed, 10 insertions, 15 deletions
diff --git a/ui/src/com/android/providers/downloads/ui/DownloadAdapter.java b/ui/src/com/android/providers/downloads/ui/DownloadAdapter.java
index d09cb18f..27967f8a 100644
--- a/ui/src/com/android/providers/downloads/ui/DownloadAdapter.java
+++ b/ui/src/com/android/providers/downloads/ui/DownloadAdapter.java
@@ -23,7 +23,6 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.database.Cursor;
-import android.drm.mobile1.DrmRawContent;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.text.format.Formatter;
@@ -175,21 +174,17 @@ public class DownloadAdapter extends CursorAdapter {
return;
}
- if (DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING.equalsIgnoreCase(mediaType)) {
- iconView.setImageResource(R.drawable.ic_launcher_drm_file);
+ Intent intent = new Intent(Intent.ACTION_VIEW);
+ intent.setDataAndType(Uri.fromParts("file", "", null), mediaType);
+ PackageManager pm = mContext.getPackageManager();
+ List<ResolveInfo> list = pm.queryIntentActivities(intent,
+ PackageManager.MATCH_DEFAULT_ONLY);
+ if (list.size() == 0) {
+ // no icon found for this mediatype. use "unknown" icon
+ iconView.setImageResource(R.drawable.ic_download_misc_file_type);
} else {
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.setDataAndType(Uri.fromParts("file", "", null), mediaType);
- PackageManager pm = mContext.getPackageManager();
- List<ResolveInfo> list = pm.queryIntentActivities(intent,
- PackageManager.MATCH_DEFAULT_ONLY);
- if (list.size() == 0) {
- // no icon found for this mediatype. use "unknown" icon
- iconView.setImageResource(R.drawable.ic_download_misc_file_type);
- } else {
- Drawable icon = list.get(0).activityInfo.loadIcon(pm);
- iconView.setImageDrawable(icon);
- }
+ Drawable icon = list.get(0).activityInfo.loadIcon(pm);
+ iconView.setImageDrawable(icon);
}
iconView.setVisibility(View.VISIBLE);
}