summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/BrowserDownloadAdapter.java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-01-26 14:15:01 -0500
committerLeon Scroggins <scroggo@google.com>2010-02-04 16:37:55 -0500
commitfedc493cd810fbd4385efbd647ee70852870988f (patch)
tree7a32e6e925b30efe6c440f3f4b82c1bccd914888 /src/com/android/browser/BrowserDownloadAdapter.java
parentc38909b6156331f8d739e0d6d7a9f7a0fae3d17c (diff)
downloadpackages_apps_Browser-fedc493cd810fbd4385efbd647ee70852870988f.zip
packages_apps_Browser-fedc493cd810fbd4385efbd647ee70852870988f.tar.gz
packages_apps_Browser-fedc493cd810fbd4385efbd647ee70852870988f.tar.bz2
Launch intents to open/delete downloads, and handle them in the browser.
Initial work for http://b/issue?id=2384554 : showing all downloads in the browser. On the BrowserDownloadPage, no longer rely on the filename, since once the Browser shows downloads from other applications, the filenames for those downloads will not be available, and this way all downloads are handled the same. Other applications which download files will need to handle the same Intents as OpenDownloadReceiver in order to open/delete them from the BrowserDownloadPage. OpenDownloadReceiver is also a necessary step towards moving the BrowserDownloadPage into its own application, if we ultimately decide to do that.
Diffstat (limited to 'src/com/android/browser/BrowserDownloadAdapter.java')
-rw-r--r--src/com/android/browser/BrowserDownloadAdapter.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/com/android/browser/BrowserDownloadAdapter.java b/src/com/android/browser/BrowserDownloadAdapter.java
index 2a3b69c..0f8f721 100644
--- a/src/com/android/browser/BrowserDownloadAdapter.java
+++ b/src/com/android/browser/BrowserDownloadAdapter.java
@@ -47,7 +47,6 @@ import java.util.List;
*/
public class BrowserDownloadAdapter extends DateSortedExpandableListAdapter {
- private int mFilenameColumnId;
private int mTitleColumnId;
private int mDescColumnId;
private int mStatusColumnId;
@@ -58,7 +57,6 @@ public class BrowserDownloadAdapter extends DateSortedExpandableListAdapter {
public BrowserDownloadAdapter(Context context, Cursor c, int index) {
super(context, c, index);
- mFilenameColumnId = c.getColumnIndexOrThrow(Downloads.Impl._DATA);
mTitleColumnId = c.getColumnIndexOrThrow(Downloads.Impl.COLUMN_TITLE);
mDescColumnId = c.getColumnIndexOrThrow(Downloads.Impl.COLUMN_DESCRIPTION);
mStatusColumnId = c.getColumnIndexOrThrow(Downloads.Impl.COLUMN_STATUS);
@@ -112,14 +110,7 @@ public class BrowserDownloadAdapter extends DateSortedExpandableListAdapter {
TextView tv = (TextView) convertView.findViewById(R.id.download_title);
String title = getString(mTitleColumnId);
if (title == null) {
- String fullFilename = getString(mFilenameColumnId);
- if (fullFilename == null) {
- title = r.getString(R.string.download_unknown_filename);
- } else {
- // We have a filename, so we can build a title from that
- title = Downloads.Impl.createTitleFromFilename(context, fullFilename,
- getLong(0));
- }
+ title = r.getString(R.string.download_unknown_filename);
}
tv.setText(title);