]> nv-tegra.nvidia Code Review - android/platform/packages/providers/DownloadProvider.git/log
android/platform/packages/providers/DownloadProvider.git
14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Tue, 15 Feb 2011 01:26:06 +0000 (17:26 -0800)]
Import revised translations.  DO NOT MERGE

Change-Id: Idafb34373db2691d1a21fead3d0decbb7e10f735

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Mon, 7 Feb 2011 21:39:19 +0000 (13:39 -0800)]
Import revised translations.  DO NOT MERGE

Change-Id: I974bf33097aaaad0a7e79ce36b45de2f22252f15

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Thu, 3 Feb 2011 22:24:08 +0000 (14:24 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Thu, 3 Feb 2011 02:29:39 +0000 (18:29 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Thu, 3 Feb 2011 01:45:10 +0000 (17:45 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Mon, 31 Jan 2011 00:03:23 +0000 (16:03 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Fri, 28 Jan 2011 22:45:16 +0000 (14:45 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Fri, 28 Jan 2011 21:23:28 +0000 (13:23 -0800)]
Import revised translations.  DO NOT MERGE

Change-Id: Ib81647ed5436d4949a0c81c9900baf407215b9f5

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Thu, 27 Jan 2011 02:55:34 +0000 (18:55 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Wed, 26 Jan 2011 23:13:07 +0000 (15:13 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Fri, 21 Jan 2011 01:21:00 +0000 (17:21 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Mon, 17 Jan 2011 00:22:07 +0000 (16:22 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agoMerge "(GB/GBMR) (do not merge) delete file from disk when deleting from db" into...
Vasu Nori [Sun, 16 Jan 2011 21:17:51 +0000 (13:17 -0800)]
Merge "(GB/GBMR) (do not merge) delete file from disk when deleting from db" into gingerbread

14 years ago(GB MR) bug:3351783 don't store redirectcount in db
Vasu Nori [Sun, 16 Jan 2011 18:52:14 +0000 (10:52 -0800)]
(GB MR) bug:3351783 don't store redirectcount in db

redirectcount shouldn't be stored in the db.
say, you are downloading a large app and there are redirects
involved inthe download.
if network connectivity changes during download, then download
is paused and resumed once connectivy is back on.
when the download is resumed, it should start with redirectcount of 0
instead of redirectcount from the previous download session.

Change-Id: I1acf2fb9491d24f5e109206a91dda3eea429e447

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Sun, 16 Jan 2011 16:53:54 +0000 (08:53 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Fri, 14 Jan 2011 15:48:55 +0000 (07:48 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Thu, 13 Jan 2011 15:48:22 +0000 (07:48 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Wed, 12 Jan 2011 15:21:05 +0000 (07:21 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Tue, 11 Jan 2011 15:34:52 +0000 (07:34 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Mon, 10 Jan 2011 15:39:57 +0000 (07:39 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Fri, 7 Jan 2011 01:24:29 +0000 (17:24 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agoImport translations for additional languages.
Eric Fischer [Thu, 6 Jan 2011 18:43:30 +0000 (10:43 -0800)]
Import translations for additional languages.

Change-Id: I1c05f11e064f34a04c021bfa0d2282956827eb51

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Wed, 5 Jan 2011 15:34:01 +0000 (07:34 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Tue, 4 Jan 2011 15:19:46 +0000 (07:19 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Wed, 22 Dec 2010 16:00:45 +0000 (08:00 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agomerge in gingerbread-release history after reset to gingerbread
The Android Automerger [Tue, 21 Dec 2010 16:31:56 +0000 (08:31 -0800)]
merge in gingerbread-release history after reset to gingerbread

14 years agoreconcile with open-source gingerbread
Jean-Baptiste Queru [Thu, 9 Dec 2010 18:18:49 +0000 (10:18 -0800)]
reconcile with open-source gingerbread

Change-Id: I6a6553f8e89f576cf21ee0fb0cba62479f96f2b3

14 years agoDon't filter by UID for apps with ACCESS_ALL_DOWNLOADS tegra-10.11.0 tegra-10.11.1 tegra-10.11.1.1 tegra-10.11.2 tegra-10.11.3 tegra-10.11.4 tegra-10.11.ER1
Kenny Root [Wed, 1 Dec 2010 19:38:41 +0000 (11:38 -0800)]
Don't filter by UID for apps with ACCESS_ALL_DOWNLOADS

Old platform behavior of DownloadProvider would allow anyone with
special access to access all the downloads. New behavior is to return
/my_downloads/ on an .insert() call. For things that aren't using the
new API where DownloadInfo.getAllDownloadsUri() is accessible, make any
application with ACCESS_ALL_DOWNLOADS permission bypass the calling UID
check for /my_downloads/

Bug: 3242328
Change-Id: I4d7dae75c528d2803d594c5d79d19865ef37ed30

14 years agoDon't filter by UID for apps with ACCESS_ALL_DOWNLOADS
Kenny Root [Wed, 1 Dec 2010 19:38:41 +0000 (11:38 -0800)]
Don't filter by UID for apps with ACCESS_ALL_DOWNLOADS

Old platform behavior of DownloadProvider would allow anyone with
special access to access all the downloads. New behavior is to return
/my_downloads/ on an .insert() call. For things that aren't using the
new API where DownloadInfo.getAllDownloadsUri() is accessible, make any
application with ACCESS_ALL_DOWNLOADS permission bypass the calling UID
check for /my_downloads/

Bug: 3242328
Change-Id: I536fde4525dd74066879f7c7da7fa609ff344645

14 years ago(GB/GBMR) (do not merge) delete file from disk when deleting from db
Vasu Nori [Fri, 3 Dec 2010 19:35:04 +0000 (11:35 -0800)]
(GB/GBMR) (do not merge) delete file from disk when deleting from db

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

14 years agodownloads broken by Change-Id: I115b3ba6cfe0262269dbbc4c336b9e1d63c618e4
Vasu Nori [Fri, 3 Dec 2010 19:13:50 +0000 (11:13 -0800)]
downloads broken by Change-Id: I115b3ba6cfe0262269dbbc4c336b9e1d63c618e4

big typo in that CL broke the downloading functionality.

Change-Id: If7dc0f86ea7a3c4394603416ca0fc33847f10fa7

14 years agoMerge "(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC" into...
Vasu Nori [Thu, 2 Dec 2010 22:45:30 +0000 (14:45 -0800)]
Merge "(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC" into gingerbread

14 years ago(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC
Vasu Nori [Thu, 2 Dec 2010 02:23:09 +0000 (18:23 -0800)]
(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC

Real fix is in Change-Id: Ifea1544737023008eff44aef9acd976902a0c143
In the database, sometimes _data column in downloads is set to null
and sometimes to empty string. this is inconsistent
and causes bugs such as bug:3144642.
This bug is caused by line# 793 in DownloadThread.
state.mFileName is null sometimes and empty string sometimes - because
the correspodning field is set inconsistentlt in downloads.db
_data column.

in GB MR, apply a bandaid because real fix could be too risky for
GB.

Change-Id: I115b3ba6cfe0262269dbbc4c336b9e1d63c618e4

14 years agoMerge "Import revised translations. DO NOT MERGE" into gingerbread
Eric Fischer [Thu, 2 Dec 2010 00:28:09 +0000 (16:28 -0800)]
Merge "Import revised translations.  DO NOT MERGE" into gingerbread

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 1 Dec 2010 23:09:56 +0000 (15:09 -0800)]
Import revised translations.  DO NOT MERGE

Bug 3245452

Change-Id: Ie2e81528c7a16dce5350f5d6845c8b4c0da15f96

14 years agoDon't filter by UID for apps with ACCESS_ALL_DOWNLOADS
Kenny Root [Wed, 1 Dec 2010 19:38:41 +0000 (11:38 -0800)]
Don't filter by UID for apps with ACCESS_ALL_DOWNLOADS

Old platform behavior of DownloadProvider would allow anyone with
special access to access all the downloads. New behavior is to return
/my_downloads/ on an .insert() call. For things that aren't using the
new API where DownloadInfo.getAllDownloadsUri() is accessible, make any
application with ACCESS_ALL_DOWNLOADS permission bypass the calling UID
check for /my_downloads/

Bug: 3242328
Change-Id: I536fde4525dd74066879f7c7da7fa609ff344645

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Thu, 28 Oct 2010 19:25:36 +0000 (12:25 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 27 Oct 2010 00:03:27 +0000 (17:03 -0700)]
Import revised translations.  DO NOT MERGE

Change-Id: Iadedcf076f8bbe43d1864baf989b21d9d30f13f7

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Tue, 26 Oct 2010 04:21:41 +0000 (21:21 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Mon, 25 Oct 2010 23:52:50 +0000 (16:52 -0700)]
Import revised translations.  DO NOT MERGE

Change-Id: Id9cdaf0062ee97f067b644bcc00d41182ff52934

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Thu, 21 Oct 2010 14:24:10 +0000 (07:24 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoReplace shared storage with USB storage.
Eric Fischer [Wed, 20 Oct 2010 01:13:47 +0000 (18:13 -0700)]
Replace shared storage with USB storage.

Change-Id: If3fb1c213f9f9c6f21bd1f13f633393a32d2509a

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Wed, 20 Oct 2010 14:29:35 +0000 (07:29 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agobug:3083060 UI tweaks to DownloadManager screens
Vasu Nori [Fri, 15 Oct 2010 22:23:12 +0000 (15:23 -0700)]
bug:3083060 UI tweaks to DownloadManager screens

Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Mon, 18 Oct 2010 15:28:07 +0000 (08:28 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Import revised translations DO NOT MERGE" into gingerbread
Kenny Root [Fri, 15 Oct 2010 23:55:25 +0000 (16:55 -0700)]
Merge "Import revised translations DO NOT MERGE" into gingerbread

14 years agoMerge "bug:3099994 NPE in DownloadManager when deleting non-media file" into gingerbread
Vasu Nori [Fri, 15 Oct 2010 23:07:22 +0000 (16:07 -0700)]
Merge "bug:3099994 NPE in DownloadManager when deleting non-media file" into gingerbread

14 years agoImport revised translations DO NOT MERGE
Kenny Root [Fri, 15 Oct 2010 22:28:41 +0000 (15:28 -0700)]
Import revised translations DO NOT MERGE

Change-Id: I21052e55a62dd3d9a9846dec30c3ac12cc9c25af

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Fri, 15 Oct 2010 16:06:28 +0000 (09:06 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agobug:3099994 NPE in DownloadManager when deleting non-media file
Vasu Nori [Fri, 15 Oct 2010 05:57:46 +0000 (22:57 -0700)]
bug:3099994 NPE in DownloadManager when deleting non-media file

DownloadService always scans files and assumes MediaProvider
returns a valid Uri. But MediaProvider returns null for
return param 'uri'
if the file is not audio/video/image etc media type file
(for example, pdf)

Change-Id: If32bd1895b00b5406973a5e240ad3558d46f9f4a

14 years agoImport revised translations
Kenny Root [Thu, 14 Oct 2010 16:47:03 +0000 (09:47 -0700)]
Import revised translations

Change-Id: I03a58b6efd2e1a12054bc7dbb320368be6cfdd17

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Thu, 14 Oct 2010 01:49:59 +0000 (18:49 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agofix broken build bug:3095237
Vasu Nori [Thu, 14 Oct 2010 00:53:37 +0000 (17:53 -0700)]
fix broken build  bug:3095237

Change-Id: I7e1fe99cc482fc270894a820049275fc0c64233e

14 years agobug:3069735 in Download UI app, handle deletes correctly
Vasu Nori [Wed, 13 Oct 2010 06:27:49 +0000 (23:27 -0700)]
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

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Sat, 9 Oct 2010 00:14:56 +0000 (17:14 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Make DownloadProvider use parameterized queries." into gingerbread
Steve Howard [Fri, 8 Oct 2010 20:10:57 +0000 (13:10 -0700)]
Merge "Make DownloadProvider use parameterized queries." into gingerbread

14 years agoMake DownloadProvider use parameterized queries.
Steve Howard [Fri, 8 Oct 2010 01:16:15 +0000 (18:16 -0700)]
Make DownloadProvider use parameterized queries.

This avoids filling up the query cache unnecessary, but required some
structural changes to ease the passing around of a selection along
with its arguments.

Change-Id: I724185763b94146d17573cab68f675c24e49634e

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Thu, 7 Oct 2010 02:17:29 +0000 (19:17 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Thu, 7 Oct 2010 00:15:43 +0000 (17:15 -0700)]
Import revised translations.  DO NOT MERGE

Change-Id: I1f00b783250d0c4112cf7918f9ab05f83c209407

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Tue, 5 Oct 2010 14:13:06 +0000 (07:13 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Updated assets for downloads UI launcher icon" into gingerbread
Steve Howard [Mon, 4 Oct 2010 20:20:07 +0000 (13:20 -0700)]
Merge "Updated assets for downloads UI launcher icon" into gingerbread

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Mon, 4 Oct 2010 14:13:22 +0000 (07:13 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Seriously improve error reporting in DownloadThread." into gingerbread
Steve Howard [Fri, 1 Oct 2010 20:12:59 +0000 (13:12 -0700)]
Merge "Seriously improve error reporting in DownloadThread." into gingerbread

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Fri, 1 Oct 2010 14:17:50 +0000 (07:17 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoAvoid NPE when checking file URI in DownloadProvider
Steve Howard [Fri, 1 Oct 2010 02:45:56 +0000 (19:45 -0700)]
Avoid NPE when checking file URI in DownloadProvider

Change-Id: Ic937b05308cecce244725e25767a3a1310a8463d

14 years agoSeriously improve error reporting in DownloadThread.
Steve Howard [Fri, 1 Oct 2010 01:18:51 +0000 (18:18 -0700)]
Seriously improve error reporting in DownloadThread.

My old error reporting strategy for DownloadThread was to log the
stack trace for the exception, so we'd know exactly what conditions
caused the StopRequest.  hackbod suggested that we shouldn't log
tracebacks as they clutter the log.  Instead, we should just always
include a little string tag explaining why the request is being
stopped -- this is more concise and more useful to developers.

There are three main changes here to acheive this goal:
* make StopRequest require a short, log-friendly error message upon
  construction, and add such a message to all construction sites
* make a similar change to GenerateSaveFileError, so that the variety
  of errors that originate with Helpers.generateSaveFile() get
  similarly fine-grained and concise error reporting
* make network usable checking code return a distinct error code for
  each distinct negative condition, and add a utility to return a
  log-friendly error message for each such code.

Finally, I cleaned up some of the ways errors/exceptions are handled
in the process.

Change-Id: Ie70cbf3f2960e260e97f8449258e25218d0f900f

14 years agoMerge "Handle null local URI when deleting a download." into gingerbread
Steve Howard [Thu, 30 Sep 2010 23:23:10 +0000 (16:23 -0700)]
Merge "Handle null local URI when deleting a download." into gingerbread

14 years agoMerge "Import revised translations. DO NOT MERGE" into gingerbread
Eric Fischer [Thu, 30 Sep 2010 22:44:20 +0000 (15:44 -0700)]
Merge "Import revised translations.  DO NOT MERGE" into gingerbread

14 years agoMake downloads UI singleTop.
Steve Howard [Thu, 30 Sep 2010 22:12:58 +0000 (15:12 -0700)]
Make downloads UI singleTop.

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

14 years agoHandle null local URI when deleting a download.
Steve Howard [Thu, 30 Sep 2010 18:39:40 +0000 (11:39 -0700)]
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

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Thu, 30 Sep 2010 14:10:59 +0000 (07:10 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoImprove how the download manager reports paused statuses.
Steve Howard [Wed, 29 Sep 2010 23:48:01 +0000 (16:48 -0700)]
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

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 29 Sep 2010 21:37:21 +0000 (14:37 -0700)]
Import revised translations.  DO NOT MERGE

Change-Id: I27a5fc3ab9bd0fd3e6d9db674ef32077d623e7b6

14 years agoMerge "Split strings with SD card references into variations." into gingerbread
Eric Fischer [Wed, 29 Sep 2010 17:54:27 +0000 (10:54 -0700)]
Merge "Split strings with SD card references into variations." into gingerbread

14 years agoSplit strings with SD card references into variations.
Eric Fischer [Tue, 28 Sep 2010 23:36:12 +0000 (16:36 -0700)]
Split strings with SD card references into variations.

Change-Id: I62562315a3b0691ee3a541e320b42463cff65265

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Tue, 28 Sep 2010 21:37:49 +0000 (14:37 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Trim the database & check spurious files off the UI thread." into gingerbread
Brad Fitzpatrick [Tue, 28 Sep 2010 20:20:33 +0000 (13:20 -0700)]
Merge "Trim the database & check spurious files off the UI thread." into gingerbread

14 years agoUpdated assets for downloads UI launcher icon
Steve Howard [Tue, 28 Sep 2010 19:44:46 +0000 (12:44 -0700)]
Updated assets for downloads UI launcher icon

Change-Id: I0dc0ef687ebc33a19b3af070df2722840a20eba1

14 years agoTrim the database & check spurious files off the UI thread.
Brad Fitzpatrick [Tue, 28 Sep 2010 19:32:08 +0000 (12:32 -0700)]
Trim the database & check spurious files off the UI thread.

Change-Id: I92180fc4344579b93361d5584243688a1cfdd091

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Tue, 28 Sep 2010 14:13:32 +0000 (07:13 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMoved DownloadManager to android.app (DO NOT MERGE)
Steve Howard [Mon, 27 Sep 2010 23:33:54 +0000 (16:33 -0700)]
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

14 years agoEnsure that downloads UI switches to/from empty view as needed
Steve Howard [Mon, 27 Sep 2010 18:36:33 +0000 (11:36 -0700)]
Ensure that downloads UI switches to/from empty view as needed

Change-Id: I0eef5efd7affc34c465ce04234713874c8d6937e
Bug: 3038070

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Mon, 27 Sep 2010 01:05:24 +0000 (18:05 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoUI + string tweaks for downloads UI + size limits UI
Steve Howard [Fri, 24 Sep 2010 21:38:15 +0000 (14:38 -0700)]
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

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Sun, 26 Sep 2010 19:41:15 +0000 (12:41 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoMerge "Make downloads UI accept new intent action." into gingerbread
Steve Howard [Fri, 24 Sep 2010 22:40:39 +0000 (15:40 -0700)]
Merge "Make downloads UI accept new intent action." into gingerbread

14 years agoMake downloads UI accept new intent action.
Steve Howard [Fri, 24 Sep 2010 21:59:46 +0000 (14:59 -0700)]
Make downloads UI accept new intent action.

Change-Id: I08c96e1c834fa599e05f18c4c05c3ad5339c3c74

14 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Fri, 24 Sep 2010 17:27:05 +0000 (10:27 -0700)]
Import revised translations.  DO NOT MERGE

Change-Id: I0baa17a7069b8e31720524e73f60e7ecf4b3dfe2

14 years agoMerge "DB migration to eliminate some null fields in old downloads" into gingerbread
Steve Howard [Thu, 23 Sep 2010 19:44:11 +0000 (12:44 -0700)]
Merge "DB migration to eliminate some null fields in old downloads" into gingerbread

14 years agoDB migration to eliminate some null fields in old downloads
Steve Howard [Thu, 23 Sep 2010 02:51:59 +0000 (19:51 -0700)]
DB migration to eliminate some null fields in old downloads

The DownloadProvider now ensures that current bytes, total bytes,
title and description are never null in the DB.  Some new code relies
on this assumption for simplicity.  That means we need to ensure this
invariant is true for pre-existing downloads as well.

Change-Id: Iea2289516d2636edf3394678ab08aa9cea31dc69

14 years agoSupport multi-valued HTTP headers, handle new API changes
Steve Howard [Wed, 22 Sep 2010 22:57:30 +0000 (15:57 -0700)]
Support multi-valued HTTP headers, handle new API changes

* backend support for multiple values for the same HTTP headers, for
  corresponding API changes

* other minor changes in response to DownloadManager API changes

Change-Id: I7c595e94a60ed7afaca6cc3fb4c05aaeeff20c2a

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Wed, 22 Sep 2010 14:12:20 +0000 (07:12 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoExpose permission to download without notification.
Steve Howard [Tue, 21 Sep 2010 20:53:45 +0000 (13:53 -0700)]
Expose permission to download without notification.

Change-Id: I43d3b9ca4ea7d4786a47363b4f5f7e6f003013bb

14 years agoImplement dialogs for wifi required + recommended limits.
Steve Howard [Fri, 17 Sep 2010 23:45:58 +0000 (16:45 -0700)]
Implement dialogs for wifi required + recommended limits.

This change extends the original work to add a size limit over which
wifi is required to download a file.

First, this change adds a second size limit, over which wifi is
recommended but not required.  The user has the option to bypass this
limit.

Second, this change implements dialogs shown to the user when either
limit is exceeded.  These dialogs are shown by the background download
manager service when a download is started and found to be over the
limit (and wifi is not connected).

I'm including one small fix to the unit tests needed from the previous
change.

Change-Id: Ia0f0acaa7b0d00e98355925c3446c0472048df10

14 years agoMerge branch 'gingerbread' into gingerbread-release
The Android Automerger [Tue, 21 Sep 2010 14:11:49 +0000 (07:11 -0700)]
Merge branch 'gingerbread' into gingerbread-release

14 years agoDisplay time for today's downloads, delete files on external
Steve Howard [Fri, 17 Sep 2010 00:03:39 +0000 (17:03 -0700)]
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

14 years agoMerge "Improve file error reporting + new detailed error messages in UI" into gingerbread
Steve Howard [Mon, 20 Sep 2010 22:40:55 +0000 (15:40 -0700)]
Merge "Improve file error reporting + new detailed error messages in UI" into gingerbread

14 years agoImprove file error reporting + new detailed error messages in UI
Steve Howard [Thu, 16 Sep 2010 19:04:17 +0000 (12:04 -0700)]
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

14 years agoFix DownloadProvider makefile to correctly include sub-makefiles
Steve Howard [Mon, 20 Sep 2010 19:40:32 +0000 (12:40 -0700)]
Fix DownloadProvider makefile to correctly include sub-makefiles

Change-Id: I569e168267305939197e9af86f9598b17283a2c6

14 years agoNew assets for download manager UI.
Steve Howard [Thu, 16 Sep 2010 23:35:23 +0000 (16:35 -0700)]
New assets for download manager UI.

Includes new launcher icon and new icon/string for sorting by time.

Change-Id: I5b87da9d5fa53184b1a3096f25e0d45678aa1700