History log of /packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
8ec87ea5a5c191554d6205d4c779768664b1724b 18-Sep-2013 Jeff Sharkey <jsharkey@android.com> Unified handling of errors around opening.

Handle both missing downloads and missing activities.

Bug: 10799449, 10713636
Change-Id: I592b07fc5cf530526803379d7f7a99e8a6b207c4
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
3c03d1b8b7d96209d7b83b6881421ddfc17ccc52 06-Sep-2013 Jeff Sharkey <jsharkey@android.com> Extend trampoline to show dialogs.

Handle incoming manage requests by launching finished downloads,
or showing various retry dialogs. Pipe through summary, show
percentage when in progress, and always show total size and MIME type.

Bug: 10531347, 10599641
Change-Id: I3be2bc67ea3c0ef795146177200f5be77ad5114e
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
ec62bdf20cbfa709c9dea9101fe668fec315c103 29-Aug-2013 Jeff Sharkey <jsharkey@android.com> Follow stronger DocumentsProvider contract.

Provides same functionality, but follows updated DocumentsProvider
contract in framework.

Bug: 10497206
Change-Id: Ie1f6180047ff7bad289679a14f3368238d47b1d6
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
8c9cef79df1ddcd971a0a0775cef774c17a5081c 16-Aug-2013 Jeff Sharkey <jsharkey@android.com> Delegate to documents UI; improve contents.

When Downloads app is launched, delegate to new documents management
UI. Use DownloadManager public API to match the contents of the
existing Downloads UI.

Bug: 10329983
Change-Id: Iaa1a1dc013cfe3b17d31ecc764d4c4cc13f62258
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
33e1ce41b46c65f679ce641d124ff9d8fce706ac 10-May-2013 Jeff Sharkey <jsharkey@android.com> am 2435eb9c: Avoid NPE when finding common MIME type.

* commit '2435eb9c89bd46511624b9d89ab22766f82dbfcb':
Avoid NPE when finding common MIME type.
2435eb9c89bd46511624b9d89ab22766f82dbfcb 09-May-2013 Jeff Sharkey <jsharkey@android.com> Avoid NPE when finding common MIME type.

Bug: 8609148
Change-Id: Ibd1121d6833981234acdc927010087c12913e33d
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
b1bf9a2a0cd929130ee75a29b5f7a9f01901a0d7 03-Jan-2013 Mattias Falk <mattias.falk@sonymobile.com> Avoid NullPointerException

A crash will occur when a user share more
than one file and the mime type of any of
the files to share is null.

Avoid crash by not adding the mime type to
the mime type list if the value is null.

Change-Id: Ia06f3389da6ce34e11ffcf349a10fdbe64cfc9bd
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
e29f12803f02c7726008127ad0a2a5a8ae786ce6 14-Apr-2013 Jaekyun Seok <jaekyun@google.com> Hide the sorting button when download list is empty

Bug: 8515801
Change-Id: Id5ff6d56eb07de6b76bdb6bc3fa75af6ddd59a39
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
f818eecf1b60ddba2854314863243d6aa87707b0 27-Nov-2012 Jeff Sharkey <jsharkey@android.com> Update extras for in-progress download.

Follow move to EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS extras, which
was missing during refactoring.

Bug: 7617373
Change-Id: I26203a2bc6fc0e211a1aa602c0de018332d76f60
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
c0622bf896c1af62b0e69b18cd84c7de3b67beb3 28-Aug-2012 Jeff Sharkey <jsharkey@android.com> Send ORIGINATING_URI and REFERRER to installer.

When building PackageInstaller intents, include ORIGINATING_URI and
REFERRER extras. Unify view intent building for both notifications
and list UI.

Bug: 6900672
Change-Id: I18435e0f8aa549880ec594f82b6a250232706135
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
2f39d81833807331c99d519f80b9eeb15ada4291 04-May-2012 Jeff Sharkey <jsharkey@android.com> Wrap share in chooser.

Bug: 5418990
Change-Id: I9e46844d3fc983afc3c389ec64c099374f955610
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
9b606340a0b5b88436505651dbe3cdaf60117604 16-Apr-2012 Jeff Sharkey <jsharkey@android.com> View file downloads through DownloadsProvider.

When viewing file://-style downloads, open through DownloadsProvider
so that FLAG_GRANT_READ_URI_PERMISSION works. Add support for
OpenableColumns to support external apps probing for metadata.

Bug: 6343461
Change-Id: I630405406321ea1871c62cbcded55a4ee024ef6e
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
236726f0ce531bb151262da20d7e43b424b5d4a6 18-Mar-2011 Vasu Nori <vnori@google.com> bug:4128300 allow deletion of downloads in progress

this functionality was broken when CAB was added to Downloads app

Change-Id: I00e7313650f872334d6a38dbaff7f97909e2c59c
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
2584e68522a22c81901d0512835e49359c69c021 10-Mar-2011 Vasu Nori <vnori@google.com> Merge "bug:3510826 longpress, then shortpress behave differenctly in ExpandedListView" into honeycomb-mr1
81101942f55ae76824d244ef0cbf579fb84922fe 09-Mar-2011 Vasu Nori <vnori@google.com> multiple bug fixes when handling ExpandableListView

bug:3511180 can't select items from non-adjacent groups
bug:3510769 Long-pressing on section headers causes strange behavior
bug:4065226 Downloads list switch sorting button has wrong width
Change-Id: If7dd36078224766555f1d2cf18ec364812dcdeb9
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
8cf72b84b15ad3887b00f16f02a79ea304469548 04-Mar-2011 Vasu Nori <vnori@google.com> bug:3510826 longpress, then shortpress behave differenctly in ExpandedListView

in ListView, the following is the behavior
assume setOnItemClickListener() is set on the ListView object.
longpress starts selection
shortpress thereafter selects the item and DOES NOT
call the callback set by setOnItemClickListener()

without preceding longpress, shortpress calls
the callback set by setOnItemClickListener()

in ExpandedListView,
assume setOnChildClickListener() is set
longpress starts selection, as in ListView
shortpress thereafter calls the callback set by setOnChildClickListener()

without preceding longpress, shortpress calls
the callback set by setOnChildClickListener()
as expected.

is this expected behavior in ExpandedListView. sounds like some sort
of bug in ExpandedListView handling.

if this is application bug, is this CL a valid fix?

Change-Id: I4e290b5dcaa263c9ea76ba7926a0131d296c86c2
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
030862489796bda9645ec2282f556f732e720283 04-Mar-2011 Vasu Nori <vnori@google.com> bug:3510579 clicking on Done should dismiss the CAB menu and deselect all

Change-Id: I24e54f61e7041dd806acd810de29d05301d256e4
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
2622e40de0fa300a00d815f084ea6098f70f93e9 03-Mar-2011 Vasu Nori <vnori@google.com> when moving from landscape to portrait, selections are getting lost

when moving from landscape/portait to portrait/landscape mode,
losing all the selections (and checkboxes too)

Change-Id: Iefb1e0db00229fca68fc1080accb57b0ae3ca26e
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
d58f7c299ec6e1164e3b5e9e2e3fe5e0e57e63b9 26-Feb-2011 Vasu Nori <vnori@google.com> bug:3404934 implement share as one of the menu options

Change-Id: I51fec5314722d2ec046f8d2acd60c77efd120f74
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
daed066d4dcc8873d3463ae65e16fa2e7fbcafe5 24-Feb-2011 Vasu Nori <vnori@google.com> bug:3308769 add CAB options to downloads app

Change-Id: I9bb1374b7ca0053210274e5d6981b2f2dcf6bfca
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
61052db292446042becb2c138a751eb869161dbc 25-Jan-2011 Vasu Nori <vnori@google.com> add extra params to intent to start download app to sort by size

Change-Id: I4eca06d7fe802aacaad06b23c628a8bf1bf8ad97
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
aad00f949ff6f941a251c8ad9bfa341dce412c58 09-Nov-2010 Vasu Nori <vnori@google.com> simplify actions to perform when user clicks on delete in download app

bug:3175143
let downloadservice do the cleanup from all dataases and
also let it handle removal of the file from the sdcard.

Change-Id: I12eb8458223228109f1340552009d400b070bf54
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
3c3ed3c1488c2ebfd2b66a3cdf09b3e312883159 16-Oct-2010 Vasu Nori <vnori@google.com> bug:3083060 UI tweaks to DownloadManager screens

Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
e00c31208405bd2e4c88e069df7a2b15237f70bf 13-Oct-2010 Vasu Nori <vnori@google.com> bug:3069735 in Download UI app, handle deletes correctly

gingerbread.
High-level details
1. When a file is downloaded by DownloadManager, metadata about the file
is stored in 2 databases: DownloadProvider and MediaProvider.

2. So, when it is to be deleted, its metadata needs to be cleaned up from
both the databases.

3. But the 2 databases use differnt content-uri's as "primary keys" and
DownloadProvider loses the "primary-key" of the row in MediaProvider
database.

4. Easiest thing would have been to have DownloadProvider give filepath
to MediaProvider and let MediaProvider linearly scan its database
to locate the row and delete it.

5. The other - faster but more coding for now - option is to have
DownloadProvider store the "primary-key" of the MediaProvider's
row. implemented in this CL.

Low-level details
1. add 2 new columns to downloads table in downloads.db:
mediaprovider_uri = downloaded file's content_uri in mediaprovider db
this column is null for downloads that finished before this column is
added to the database.
deleted = flag is set to true if a file is to be deleted
2. download UI app shows only those files whose 'deleted' flag is not set.
3. when the user deletes downloads from download UI app,
3.1. if mediaprovider_uri is NOT null, then the row is deleted from
downloads table AND from the mediaprovider database.
3.2 if mediaprovider_uri is NULL, then its row in downloads database
is marked 'tp be deleted' by setting 'deleted' column to '1'.
4. When DownloadService (in DownloadProvider) processes all rows from
downloads table, if it sees any rows wth 'deleted' = 1, then
it uses MediaScanner Service to re-scan the file,
get the mediaprovider_uri from MediaProvider
and update the row in downloads table with this mediaprovider_uri value
and then delete the row by doing the following
1. delete it from MediaProvider database using mediaprovider_uri
2. delete it from DownloadProvider database

Problem with this solution:
There is a small window where it is deleted by the user on the Download app
(and the row disappears from the display) but it is still present in
Gallery app.
Thats due to the following asynchronous operations
1. DownladService which processes rows-to-be-deleted is not always up
2. DownloadService uses asynchronous call to have the file re-scanned
by MediaScanner to get mediaprovider_uri

Change-Id: Ib90eb9e647f543312c865d3bbf9a06fb867a648b
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
4c1c7cba491e1ace6cec44bed04c4debe3a4f8f1 30-Sep-2010 Steve Howard <showard@google.com> Handle null local URI when deleting a download.

I'd written this to assume a non-null local URI, but I forgot the
legacy downloads can still have null local URI, so this handling needs
to remain until the legacy API is dead and gone.

Change-Id: Icfe8dc2a6fead03b09cabe684c713fb6f0e6c1ab
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
b108a273b150e81bf26553b8851d6241bc711f98 30-Sep-2010 Steve Howard <showard@google.com> Improve how the download manager reports paused statuses.

This change makes the download manager report more detail when a
download is paused. Rather than always reporting status
RUNNING_PAUSED, there are now four different statuses:

* paused by the app
* waiting to retry after a network error
* waiting for network connectivity
* queued for wifi due to size limits

This allows a few improvements:

* code deciding when to run a download can be improved and cleaned up
(I've taken some extra steps in cleaning up this particular code)
* notification code no longer has to rely on the in-memory-only
"mPausedReason" member of DownloadInfo; instead, it knows from the
status that the download is queued for wifi, and can display the
appropriate string. This moves the string fetching out into the
UI-specific logic and is a sign that this is really the right way
to do things.

And finally, the real motivation for this change: I've changed the
meaning of "Queued" in the downloads UI so it now means "Queued for
WiFi'. This is what was originally intended, I'd misunderstood. What
was formerly known as "Queued", a download that hadn't started, is now
displayed as "In progress" (it's always a transient state so it's
basically meaningless anyway). Otherwise it remains the same (in
particular, downloads paused for other reasons are still reported as
"In progress").

I've also increased some of the logging in DownloadThread a bit, as
this change initally introduced some bugs that were impossible to
track down without that logging. There have been other bug reports
that were impossible to diagnose and these few extra log statements
should really help, without cluttering logs too much. I've taken care
to avoid potentially introducing any PII into the logs.

Change-Id: Id0b8d65fc8e4406ad7ffa1439ffc22a0281b051f
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
14961f94d762e733a733e3268fca1074d8da5f8c 28-Sep-2010 Steve Howard <showard@google.com> Moved DownloadManager to android.app (DO NOT MERGE)

I'll merge this manually, as there's some additional master-only code
that will be to be simultaneously changed.

Change-Id: Ifdb1740f32e228bc07f266585737b98a7b794685
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
57427e16d929b34a646dbcac0a16004f4a82cc9c 27-Sep-2010 Steve Howard <showard@google.com> Ensure that downloads UI switches to/from empty view as needed

Change-Id: I0eef5efd7affc34c465ce04234713874c8d6937e
Bug: 3038070
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
b8bb84731680870be05ea422eb1d269e24a9c660 24-Sep-2010 Steve Howard <showard@google.com> UI + string tweaks for downloads UI + size limits UI

* tweaks to UI strings based on feedback
* new "retry" button for single selection of failed download
* make SizeLimitActivity translucent+titleless, so it looks like a
dialog over the current app

Change-Id: I6a990275880d23ab6b4368d39b70f0ad042825ec
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
78f433c68f14dfba605ceb0e5f3dc54243efd2b2 17-Sep-2010 Steve Howard <showard@google.com> Display time for today's downloads, delete files on external

* in downloads UI, for downloads that occurred today, display the time
of day rather than the date
* when deleting a download on external from the downloads UI,
explicitly delete the underlying file as well (the service only
deletes cache files when deleting a download from the database, it
intentionally leaves external files around)

Change-Id: I9aa02dabe3c091a67e2c2196a0ea2f313bcdcef0
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
b9a0ad7182209d4aca708e13e876e9b1b43ffafc 16-Sep-2010 Steve Howard <showard@google.com> Improve file error reporting + new detailed error messages in UI

* support new error code for "destination file already exists"
* improve error handling for various file error cases to return a more
specific error code when appropriate
* make UI support more detailed error messages for some cases
* use Uri.getPath() instead of Uri.getSchemeSpecificPart() for file
URIs

Change-Id: Icb01d4d3b47c7776be3ddcd8347212e950cd023e
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
3398db8f3b195959faa2a7cf09918f364432ac28 15-Sep-2010 Steve Howard <showard@google.com> Fix notification bugs, cleanup DownloadService + DownloadReceiver

This change started out just fixing a few regressions related to
notifications:

* Browser downloads weren't picking up a title from the determined
filename. This was due to my change to default the title field to
"" instead of null.

* Notification click/hide events weren't being handled properly. This
was due to previous change to the URI structure of DownloadProvider.
DownloadReceiver needed to be changed to perform queries through
/all_downloads URIs, like all other parts of the download manager
code. I did some general refactoring of the DownloadReceiver code
while I was there.

* The code in DownloadNotification wasn't picking up some updates to
downloads properly. This was due to my change to make
DownloadNotification use the DownloadInfo objects rather than
querying the database directly, so that it could make use of info
provided by the DownloadThread that didn't go into the DB. Fixing
this didn't turn out to be all that complicated, but along the way
to figuring this out I made some substantial refactoring in
DownloadService which made it much cleaner anyway and eliminated a
lot of duplication. That's something that had to happen eventually,
so I'm leaving it all in.

Change-Id: I847ccf80e3d928c84e36bc24791b33204104e1b2
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
3d55d829c03fe78ad8cdab119293efb6c6e49c64 13-Sep-2010 Steve Howard <showard@google.com> New URI structure with "my_downloads" and "all_downloads"

This change introduces a second view into the download manager
database via a set of URIs starting with /all_downloads, renaming the
original /download URIs to /my_downloads. In addition to making
things more clear, this change allows the downloads UI to grant
permissions on individual downloads to viewer apps.

The old semantics were:

* for ordinary callers, /download included only downloads initiated by
the calling UID
* for intraprocess calls or calls by root, /download included all
downloads

The new semantics are

* /my_downloads always includes only downloads initiated by the
calling UID, and requires only INTERNET permission. It could just
as well require no permission, but that's not possible in the
framework, since path-permissions can only broaden access, not
tighten it. It doesn't matter, because these URIs are useless
without INTERNET permission -- if a user can't initiate downloads,
there's no reason to read this.
* /all_downloads always includes all downloads on the system, and
requires the new permission ACCESS_ALL_DOWNLOADS. This permission
is currently protectionLevel=signature -- this could be relaxed
later to support third-party download managers.

All download manager code has been changed to use /all_downloads URIs,
except when passing a URI to another app. In making this change
across the download manager code, I've taken some liberties in
cleaning things up. Other apps are unchanged and will use
/my_downloads.

Finally, this incorporates changes to DownloadManager to return a
content URI for /cache downloads -- the download UI no longer assumes
it's a file URI, and it grants permissions to the receiver of the VIEW
intent. The public API test has also been updated.

I've also fixed some null cursor checking in DownloadManager.

Change-Id: I05a501eb4388249fe80c43724405657c950d7238
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
71e7fda9135a0915af1fd419d07ebf85ad09beb4 09-Sep-2010 Steve Howard <showard@google.com> Further work on the new downloads UI.

* add support for downloads not visible in the UI
* add support for restarting failed downloads and downloads for which
the file is missing
* add "clear selection" button to selection menu
* fix DateSortedExpandableListAdapter to ensure the view refreshes
properly anytime the underlying data changes
* make DownloadList handle when a selected download gets deleted by
another app
* make DownloadList close a dialog for a pending download when the
download starts
* show a dialog when the user tries to open a download but the
file is missing
* display "<Unknown>" when no title is provided for a download
* add a test case for DownloadManager.orderBy() (should've gone in the
previous commit)

Change-Id: Ibf3062e8228e7f2c1270be24d8d5527dfb064658
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java
217149efdc4a559c38442da179f548e125c0afc5 02-Sep-2010 Steve Howard <showard@google.com> First pass at new system UI for download manager.

This is the initial checkin for a new system UI for the download
manager. This UI shows all entries present in the Download Manager
database, sorted by either date or size. It allows the user to
monitor status, open files, and delete/cancel entries.

The code was initially copied from the "Downloads" page of
packages/apps/Browser, since the design is based on that UI. Much of
the code is changed, although DateSortedExpandableListAdapter is
nearly identical.

The code is not quite finished, but this is very much a working first
pass.

Change-Id: I7fe102e9f2998e57d893cc3c0f5f6da1cf2db549
/packages/providers/DownloadProvider/ui/src/com/android/providers/downloads/ui/DownloadList.java