summaryrefslogtreecommitdiffstats
path: root/ui
Commit message (Collapse)AuthorAgeFilesLines
* Import revised translations. DO NOT MERGEEric Fischer2011-01-281-2/+2
| | | | Change-Id: Ib81647ed5436d4949a0c81c9900baf407215b9f5
* Merge "(GB/GBMR) (do not merge) delete file from disk when deleting from db" ↵Vasu Nori2011-01-161-0/+9
|\ | | | | | | into gingerbread
| * (GB/GBMR) (do not merge) delete file from disk when deleting from dbVasu Nori2010-12-031-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | bug:3175143 sometimes mediaprovider doesn't delete the file from disk when it is deleted from its db. for example, audio files, pdf files. DownloadManager/DownloadApp should delete the file when it is deleted from downloads db. DO NOT MERGE this is esentially porting HC fix from DownloadService.java to GB Change-Id: I70f3a7ad968f82ccba00d664e9a2993d75a18d15
* | Import translations for additional languages.Eric Fischer2011-01-0620-0/+920
|/ | | | Change-Id: I1c05f11e064f34a04c021bfa0d2282956827eb51
* Import revised translations. DO NOT MERGEEric Fischer2010-12-0118-69/+52
| | | | | | Bug 3245452 Change-Id: Ie2e81528c7a16dce5350f5d6845c8b4c0da15f96
* Import revised translations. DO NOT MERGEEric Fischer2010-10-261-1/+1
| | | | Change-Id: Iadedcf076f8bbe43d1864baf989b21d9d30f13f7
* Import revised translations. DO NOT MERGEEric Fischer2010-10-2520-41/+78
| | | | Change-Id: Id9cdaf0062ee97f067b644bcc00d41182ff52934
* bug:3083060 UI tweaks to DownloadManager screensVasu Nori2010-10-198-35/+33
| | | | Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758
* Import revised translationsKenny Root2010-10-1420-41/+21
| | | | Change-Id: I03a58b6efd2e1a12054bc7dbb320368be6cfdd17
* bug:3069735 in Download UI app, handle deletes correctlyVasu Nori2010-10-131-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Import revised translations. DO NOT MERGEEric Fischer2010-10-0620-240/+140
| | | | Change-Id: I1f00b783250d0c4112cf7918f9ab05f83c209407
* Merge "Updated assets for downloads UI launcher icon" into gingerbreadSteve Howard2010-10-042-0/+0
|\
| * Updated assets for downloads UI launcher iconSteve Howard2010-09-282-0/+0
| | | | | | | | Change-Id: I0dc0ef687ebc33a19b3af070df2722840a20eba1
* | Merge "Handle null local URI when deleting a download." into gingerbreadSteve Howard2010-09-301-3/+5
|\ \
| * | Handle null local URI when deleting a download.Steve Howard2010-09-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Import revised translations. DO NOT MERGE" into gingerbreadEric Fischer2010-09-3020-0/+1020
|\ \ \
| * | | Import revised translations. DO NOT MERGEEric Fischer2010-09-2920-0/+1020
| | |/ | |/| | | | | | | Change-Id: I27a5fc3ab9bd0fd3e6d9db674ef32077d623e7b6
* | | Make downloads UI singleTop.Steve Howard2010-09-301-1/+2
| |/ |/| | | | | | | | | | | | | Browser downloads, when clicked, will launch the downloads UI. When clicked from the downloads UI (as opposed to a notification), we don't want to launch a second copy of the downloads UI activity. Change-Id: I0ae546bb423814f1bd1d6481085bf5f237d1213b
* | Improve how the download manager reports paused statuses.Steve Howard2010-09-293-27/+43
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Moved DownloadManager to android.app (DO NOT MERGE)Steve Howard2010-09-274-4/+4
| | | | | | | I'll merge this manually, as there's some additional master-only code that will be to be simultaneously changed. Change-Id: Ifdb1740f32e228bc07f266585737b98a7b794685
* Ensure that downloads UI switches to/from empty view as neededSteve Howard2010-09-271-8/+33
| | | | | Change-Id: I0eef5efd7affc34c465ce04234713874c8d6937e Bug: 3038070
* UI + string tweaks for downloads UI + size limits UISteve Howard2010-09-262-0/+21
| | | | | | | | | * 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
* Make downloads UI accept new intent action.Steve Howard2010-09-241-0/+4
| | | | Change-Id: I08c96e1c834fa599e05f18c4c05c3ad5339c3c74
* Display time for today's downloads, delete files on externalSteve Howard2010-09-202-2/+47
| | | | | | | | | | | * 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
* Improve file error reporting + new detailed error messages in UISteve Howard2010-09-202-4/+78
| | | | | | | | | | | * 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
* New assets for download manager UI.Steve Howard2010-09-207-3/+4
| | | | | | Includes new launcher icon and new icon/string for sorting by time. Change-Id: I5b87da9d5fa53184b1a3096f25e0d45678aa1700
* Fix notification bugs, cleanup DownloadService + DownloadReceiverSteve Howard2010-09-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* New URI structure with "my_downloads" and "all_downloads"Steve Howard2010-09-142-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Further work on the new downloads UI.Steve Howard2010-09-105-22/+169
| | | | | | | | | | | | | | | | | | | | * 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
* First pass at new system UI for download manager.Steve Howard2010-09-0817-0/+1481
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