8 years agoreduce number of times mediascanner is invoked by downloadservice
Vasu Nori [Tue, 26 Oct 2010 23:37:08 +0000]
reduce number of times mediascanner is invoked by downloadservice

this is one of the 2 bugs mentioned in bug:3129943
sometimes MediaProvider returns null for returned param Uri.
in such cases, mark the file as 'scanned' in the downloads db
so that it is NOT scanned again later by DownlaodService.

depends on Change-Id: I92514e1a11f5119229c0c7292e410e352a9dbcdd

Change-Id: Ie9d839581f656c929a77bd5f244ad6b2fb1585e6

8 years agoam 298c2cd1: am 404d31e3: Replace shared storage with USB storage.
Eric Fischer [Thu, 21 Oct 2010 20:41:52 +0000]
am 298c2cd1: am 404d31e3: Replace shared storage with USB storage.

Merge commit '298c2cd136e25a705486c543d8c04311ab655d98'

* commit '298c2cd136e25a705486c543d8c04311ab655d98':
  Replace shared storage with USB storage.

8 years agoam e664fbaf: am 3c3ed3c1: bug:3083060 UI tweaks to DownloadManager screens
Vasu Nori [Thu, 21 Oct 2010 17:50:53 +0000]
am e664fbaf: am 3c3ed3c1: bug:3083060 UI tweaks to DownloadManager screens

Merge commit 'e664fbafc566f31f844dd543c30064e92f3653f7'

* commit 'e664fbafc566f31f844dd543c30064e92f3653f7':
  bug:3083060 UI tweaks to DownloadManager screens

8 years agoam 404d31e3: Replace shared storage with USB storage.
Eric Fischer [Wed, 20 Oct 2010 20:57:07 +0000]
am 404d31e3: Replace shared storage with USB storage.

Merge commit '404d31e3e2ca00e9c45b94ca0de9c36a87e999ab' into gingerbread-plus-aosp

* commit '404d31e3e2ca00e9c45b94ca0de9c36a87e999ab':
  Replace shared storage with USB storage.

8 years agoremove usage of hidden public constants.
Vasu Nori [Wed, 20 Oct 2010 20:38:10 +0000]
remove usage of hidden public constants.

Change-Id: I2edf1bef5e741de8193cb293807e3ace42003b0c

8 years agoReplace shared storage with USB storage.
Eric Fischer [Wed, 20 Oct 2010 01:13:47 +0000]
Replace shared storage with USB storage.

Change-Id: If3fb1c213f9f9c6f21bd1f13f633393a32d2509a

8 years agoam 3c3ed3c1: bug:3083060 UI tweaks to DownloadManager screens
Vasu Nori [Wed, 20 Oct 2010 04:37:21 +0000]
am 3c3ed3c1: bug:3083060 UI tweaks to DownloadManager screens

Merge commit '3c3ed3c1488c2ebfd2b66a3cdf09b3e312883159' into gingerbread-plus-aosp

* commit '3c3ed3c1488c2ebfd2b66a3cdf09b3e312883159':
  bug:3083060 UI tweaks to DownloadManager screens

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

Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758

8 years agoam 1b831d75: (-s ours) am 4c1acb60: Merge "Import revised translations DO NOT MERGE...
Kenny Root [Mon, 18 Oct 2010 17:31:03 +0000]
am 1b831d75: (-s ours) am 4c1acb60: Merge "Import revised translations DO NOT MERGE" into gingerbread

Merge commit '1b831d75cec0f75f4bdbaac2a77053da93d5cb2d'

* commit '1b831d75cec0f75f4bdbaac2a77053da93d5cb2d':
  Import revised translations DO NOT MERGE

8 years agoam 9f6654cf: Merge 216736d2 from gingerbread
Jean-Baptiste Queru [Mon, 18 Oct 2010 17:30:10 +0000]
am 9f6654cf: Merge 216736d2 from gingerbread

Merge commit '9f6654cfec6e6d8d1e3de9a8adeba46137a22105'

* commit '9f6654cfec6e6d8d1e3de9a8adeba46137a22105':
  bug:3099994 NPE in DownloadManager when deleting non-media file

9 years agoam 4c1acb60: Merge "Import revised translations DO NOT MERGE" into gingerbread
Kenny Root [Sat, 16 Oct 2010 01:41:00 +0000]
am 4c1acb60: Merge "Import revised translations DO NOT MERGE" into gingerbread

Merge commit '4c1acb60162e2a2e8c80a996676a4d543a2eb3a7' into gingerbread-plus-aosp

* commit '4c1acb60162e2a2e8c80a996676a4d543a2eb3a7':
  Import revised translations DO NOT MERGE

9 years agoMerge 216736d2 from gingerbread
Jean-Baptiste Queru [Sat, 16 Oct 2010 01:28:49 +0000]
Merge 216736d2 from gingerbread

Change-Id: I404d1a66d337b1dade181ade92dc21fc0e819aa7

9 years agoMerge "Import revised translations DO NOT MERGE" into gingerbread
Kenny Root [Fri, 15 Oct 2010 23:55:25 +0000]
Merge "Import revised translations DO NOT MERGE" into gingerbread

9 years agoam f61c1d08: (-s ours) am 887a95e2: Import revised translations
Kenny Root [Fri, 15 Oct 2010 23:49:25 +0000]
am f61c1d08: (-s ours) am 887a95e2: Import revised translations

Merge commit 'f61c1d08555ac418d2b3337f74807821a30ab47c'

* commit 'f61c1d08555ac418d2b3337f74807821a30ab47c':
  Import revised translations

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

9 years agoImport revised translations DO NOT MERGE
Kenny Root [Fri, 15 Oct 2010 22:28:41 +0000]
Import revised translations DO NOT MERGE

Change-Id: I21052e55a62dd3d9a9846dec30c3ac12cc9c25af

9 years agoam 3e759e21: am a53c21ed: fix broken build bug:3095237
Vasu Nori [Fri, 15 Oct 2010 20:59:55 +0000]
am 3e759e21: am a53c21ed: fix broken build  bug:3095237

Merge commit '3e759e21291d6ca1a49ded3f24f3be0a26af4e2b'

* commit '3e759e21291d6ca1a49ded3f24f3be0a26af4e2b':
  fix broken build  bug:3095237

9 years agoam 57c4e918: am e00c3120: bug:3069735 in Download UI app, handle deletes correctly
Vasu Nori [Fri, 15 Oct 2010 19:43:04 +0000]
am 57c4e918: am e00c3120: bug:3069735 in Download UI app, handle deletes correctly

Merge commit '57c4e9180e3a339dba984f1c8dff76ef18443a7a'

* commit '57c4e9180e3a339dba984f1c8dff76ef18443a7a':
  bug:3069735 in Download UI app, handle deletes correctly

9 years agobug:3099994 NPE in DownloadManager when deleting non-media file
Vasu Nori [Fri, 15 Oct 2010 05:57:46 +0000]
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

9 years agoam 887a95e2: Import revised translations
Kenny Root [Thu, 14 Oct 2010 21:24:29 +0000]
am 887a95e2: Import revised translations

Merge commit '887a95e29a8776a07b411c472a11e82ad84464a8' into gingerbread-plus-aosp

* commit '887a95e29a8776a07b411c472a11e82ad84464a8':
  Import revised translations

9 years agoImport revised translations
Kenny Root [Thu, 14 Oct 2010 16:47:03 +0000]
Import revised translations

Change-Id: I03a58b6efd2e1a12054bc7dbb320368be6cfdd17

9 years agoam a53c21ed: fix broken build bug:3095237
Vasu Nori [Thu, 14 Oct 2010 05:53:40 +0000]
am a53c21ed: fix broken build  bug:3095237

Merge commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787' into gingerbread-plus-aosp

* commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787':
  fix broken build  bug:3095237

9 years agofix broken build bug:3095237
Vasu Nori [Thu, 14 Oct 2010 00:53:37 +0000]
fix broken build  bug:3095237

Change-Id: I7e1fe99cc482fc270894a820049275fc0c64233e

9 years agoam e00c3120: bug:3069735 in Download UI app, handle deletes correctly
Vasu Nori [Wed, 13 Oct 2010 23:56:17 +0000]
am e00c3120: bug:3069735 in Download UI app, handle deletes correctly

Merge commit 'e00c31208405bd2e4c88e069df7a2b15237f70bf' into gingerbread-plus-aosp

* commit 'e00c31208405bd2e4c88e069df7a2b15237f70bf':
  bug:3069735 in Download UI app, handle deletes correctly

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

9 years agoam 1f262cf3: am cd990514: Merge "Make DownloadProvider use parameterized queries...
Steve Howard [Mon, 11 Oct 2010 00:46:24 +0000]
am 1f262cf3: am cd990514: Merge "Make DownloadProvider use parameterized queries." into gingerbread

Merge commit '1f262cf3af0512e0d621b7818aab9bb79527f01f'

* commit '1f262cf3af0512e0d621b7818aab9bb79527f01f':
  Make DownloadProvider use parameterized queries.

9 years agoam 136b2d6a: (-s ours) am 49f78e40: Import revised translations. DO NOT MERGE
Eric Fischer [Sat, 9 Oct 2010 16:39:28 +0000]
am 136b2d6a: (-s ours) am 49f78e40: Import revised translations.  DO NOT MERGE

Merge commit '136b2d6aed4adc9537504e33e5d3b9b0bc5ef22f'

* commit '136b2d6aed4adc9537504e33e5d3b9b0bc5ef22f':
  Import revised translations.  DO NOT MERGE

9 years agoam cd990514: Merge "Make DownloadProvider use parameterized queries." into gingerbread
Steve Howard [Fri, 8 Oct 2010 20:13:07 +0000]
am cd990514: Merge "Make DownloadProvider use parameterized queries." into gingerbread

Merge commit 'cd990514feb2b17848809d9262e0d73a828b2142' into gingerbread-plus-aosp

* commit 'cd990514feb2b17848809d9262e0d73a828b2142':
  Make DownloadProvider use parameterized queries.

9 years agoMerge "Make DownloadProvider use parameterized queries." into gingerbread
Steve Howard [Fri, 8 Oct 2010 20:10:57 +0000]
Merge "Make DownloadProvider use parameterized queries." into gingerbread

9 years agoMake DownloadProvider use parameterized queries.
Steve Howard [Fri, 8 Oct 2010 01:16:15 +0000]
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

9 years agoam 49f78e40: Import revised translations. DO NOT MERGE
Eric Fischer [Thu, 7 Oct 2010 14:17:11 +0000]
am 49f78e40: Import revised translations.  DO NOT MERGE

Merge commit '49f78e40831793ff805bb602b226c372212998ec' into gingerbread-plus-aosp

* commit '49f78e40831793ff805bb602b226c372212998ec':
  Import revised translations.  DO NOT MERGE

9 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Thu, 7 Oct 2010 00:15:43 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: I1f00b783250d0c4112cf7918f9ab05f83c209407

9 years agoam f5328cae: am e4b64535: Merge "Updated assets for downloads UI launcher icon" into...
Steve Howard [Mon, 4 Oct 2010 21:28:58 +0000]
am f5328cae: am e4b64535: Merge "Updated assets for downloads UI launcher icon" into gingerbread

Merge commit 'f5328cae2422ca2c03c6eb888545d6a56ccfdf0c'

* commit 'f5328cae2422ca2c03c6eb888545d6a56ccfdf0c':
  Updated assets for downloads UI launcher icon

9 years agoam e4b64535: Merge "Updated assets for downloads UI launcher icon" into gingerbread
Steve Howard [Mon, 4 Oct 2010 20:21:47 +0000]
am e4b64535: Merge "Updated assets for downloads UI launcher icon" into gingerbread

Merge commit 'e4b6453558531bc897720f9c94affc650c99e974' into gingerbread-plus-aosp

* commit 'e4b6453558531bc897720f9c94affc650c99e974':
  Updated assets for downloads UI launcher icon

9 years agoMerge "Updated assets for downloads UI launcher icon" into gingerbread
Steve Howard [Mon, 4 Oct 2010 20:20:07 +0000]
Merge "Updated assets for downloads UI launcher icon" into gingerbread

9 years agoam ace1d5da: am d4dc8501: Merge "Seriously improve error reporting in DownloadThread...
Steve Howard [Fri, 1 Oct 2010 21:19:03 +0000]
am ace1d5da: am d4dc8501: Merge "Seriously improve error reporting in DownloadThread." into gingerbread

Merge commit 'ace1d5da2b288f6166224cf2164731ae0fa2de61'

* commit 'ace1d5da2b288f6166224cf2164731ae0fa2de61':
  Seriously improve error reporting in DownloadThread.

9 years agoam 42469fa4: am 5d81e244: Avoid NPE when checking file URI in DownloadProvider
Steve Howard [Fri, 1 Oct 2010 21:18:58 +0000]
am 42469fa4: am 5d81e244: Avoid NPE when checking file URI in DownloadProvider

Merge commit '42469fa405c7aa891e7c431cd65edd424803979c'

* commit '42469fa405c7aa891e7c431cd65edd424803979c':
  Avoid NPE when checking file URI in DownloadProvider

9 years agoam d4dc8501: Merge "Seriously improve error reporting in DownloadThread." into ginger...
Steve Howard [Fri, 1 Oct 2010 20:16:13 +0000]
am d4dc8501: Merge "Seriously improve error reporting in DownloadThread." into gingerbread

Merge commit 'd4dc8501ecb89b91f865510207297dd960afe031' into gingerbread-plus-aosp

* commit 'd4dc8501ecb89b91f865510207297dd960afe031':
  Seriously improve error reporting in DownloadThread.

9 years agoam 5d81e244: Avoid NPE when checking file URI in DownloadProvider
Steve Howard [Fri, 1 Oct 2010 20:14:27 +0000]
am 5d81e244: Avoid NPE when checking file URI in DownloadProvider

Merge commit '5d81e2447ed77860afecd71583e137178c2c6807' into gingerbread-plus-aosp

* commit '5d81e2447ed77860afecd71583e137178c2c6807':
  Avoid NPE when checking file URI in DownloadProvider

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

9 years agoam f28405c1: am 8df47822: Merge "Handle null local URI when deleting a download....
Steve Howard [Fri, 1 Oct 2010 02:46:16 +0000]
am f28405c1: am 8df47822: Merge "Handle null local URI when deleting a download." into gingerbread

Merge commit 'f28405c10d132a2eeaff5140d8a83a72d9fa530b'

* commit 'f28405c10d132a2eeaff5140d8a83a72d9fa530b':
  Handle null local URI when deleting a download.

9 years agoAvoid NPE when checking file URI in DownloadProvider
Steve Howard [Fri, 1 Oct 2010 02:45:56 +0000]
Avoid NPE when checking file URI in DownloadProvider

Change-Id: Ic937b05308cecce244725e25767a3a1310a8463d

9 years agoSeriously improve error reporting in DownloadThread.
Steve Howard [Fri, 1 Oct 2010 01:18:51 +0000]
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

9 years agoam c8b388cf: (-s ours) am 6fbdadce: Merge "Import revised translations. DO NOT MERGE...
Eric Fischer [Fri, 1 Oct 2010 01:11:53 +0000]
am c8b388cf: (-s ours) am 6fbdadce: Merge "Import revised translations.  DO NOT MERGE" into gingerbread

Merge commit 'c8b388cfe0d250892b63b4ee38b9af532763cf7e'

* commit 'c8b388cfe0d250892b63b4ee38b9af532763cf7e':
  Import revised translations.  DO NOT MERGE

9 years agoam 88ad40f2: am 4ae75074: Make downloads UI singleTop.
Steve Howard [Fri, 1 Oct 2010 01:11:43 +0000]
am 88ad40f2: am 4ae75074: Make downloads UI singleTop.

Merge commit '88ad40f27f671bc951a6221a86949b962714a315'

* commit '88ad40f27f671bc951a6221a86949b962714a315':
  Make downloads UI singleTop.

9 years agoam 8df47822: Merge "Handle null local URI when deleting a download." into gingerbread
Steve Howard [Fri, 1 Oct 2010 00:22:30 +0000]
am 8df47822: Merge "Handle null local URI when deleting a download." into gingerbread

Merge commit '8df47822435f7f66dd34f87dcaa73bbbcd808483' into gingerbread-plus-aosp

* commit '8df47822435f7f66dd34f87dcaa73bbbcd808483':
  Handle null local URI when deleting a download.

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

9 years agoam 6fbdadce: Merge "Import revised translations. DO NOT MERGE" into gingerbread
Eric Fischer [Thu, 30 Sep 2010 22:54:10 +0000]
am 6fbdadce: Merge "Import revised translations.  DO NOT MERGE" into gingerbread

Merge commit '6fbdadce019f91770c81f4db6421c2828e62a15f' into gingerbread-plus-aosp

* commit '6fbdadce019f91770c81f4db6421c2828e62a15f':
  Import revised translations.  DO NOT MERGE

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

9 years agoam 4ae75074: Make downloads UI singleTop.
Steve Howard [Thu, 30 Sep 2010 22:38:57 +0000]
am 4ae75074: Make downloads UI singleTop.

Merge commit '4ae7507440b338a9ac9aea230ee8046a805adae0' into gingerbread-plus-aosp

* commit '4ae7507440b338a9ac9aea230ee8046a805adae0':
  Make downloads UI singleTop.

9 years agoMake downloads UI singleTop.
Steve Howard [Thu, 30 Sep 2010 22:12:58 +0000]
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

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

9 years agoam ed2f1150: resolved conflicts for merge of b108a273 to gingerbread-plus-aosp
Steve Howard [Thu, 30 Sep 2010 20:38:19 +0000]
am ed2f1150: resolved conflicts for merge of b108a273 to gingerbread-plus-aosp

Merge commit 'ed2f11502fb02509d9efec1dbda7981c86f37fbd'

* commit 'ed2f11502fb02509d9efec1dbda7981c86f37fbd':
  Improve how the download manager reports paused statuses.

9 years agoresolved conflicts for merge of b108a273 to gingerbread-plus-aosp
Steve Howard [Thu, 30 Sep 2010 18:21:33 +0000]
resolved conflicts for merge of b108a273 to gingerbread-plus-aosp

Change-Id: Iced3a5360702fdeb299f8b987a353d3aeca7629b

9 years agoam 6a52fa33: am 69784dc7: Merge "Split strings with SD card references into variation...
Eric Fischer [Thu, 30 Sep 2010 05:12:55 +0000]
am 6a52fa33: am 69784dc7: Merge "Split strings with SD card references into variations." into gingerbread

Merge commit '6a52fa33f34e3a994881801787cb012eaef8b4ce'

* commit '6a52fa33f34e3a994881801787cb012eaef8b4ce':
  Split strings with SD card references into variations.

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

9 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 29 Sep 2010 21:37:21 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: I27a5fc3ab9bd0fd3e6d9db674ef32077d623e7b6

9 years agoam 69784dc7: Merge "Split strings with SD card references into variations." into...
Eric Fischer [Wed, 29 Sep 2010 17:58:14 +0000]
am 69784dc7: Merge "Split strings with SD card references into variations." into gingerbread

Merge commit '69784dc727df4f79ceff2ca88d4c79a98583c5b0' into gingerbread-plus-aosp

* commit '69784dc727df4f79ceff2ca88d4c79a98583c5b0':
  Split strings with SD card references into variations.

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

9 years agoam fce7a5e8: am d01ccf8e: Merge "Trim the database ...
Brad Fitzpatrick [Wed, 29 Sep 2010 00:37:37 +0000]
am fce7a5e8: am d01ccf8e: Merge "Trim the database & check spurious files off the UI thread." into gingerbread

Merge commit 'fce7a5e8547d4ea53700f37b87752e26a39e4cc4'

* commit 'fce7a5e8547d4ea53700f37b87752e26a39e4cc4':
  Trim the database & check spurious files off the UI thread.

9 years agoManual merge: Moved DownloadManager to android.app
Steve Howard [Mon, 27 Sep 2010 23:33:54 +0000]
Manual merge: Moved DownloadManager to android.app

Change-Id: Id1de44459ec1bf53e928cae826047467b355823d

9 years agoSplit strings with SD card references into variations.
Eric Fischer [Tue, 28 Sep 2010 23:36:12 +0000]
Split strings with SD card references into variations.

Change-Id: I62562315a3b0691ee3a541e320b42463cff65265

9 years agoam ee215b3d: (-s ours) am 14961f94: Moved DownloadManager to android.app (DO NOT...
Steve Howard [Tue, 28 Sep 2010 23:34:05 +0000]
am ee215b3d: (-s ours) am 14961f94: Moved DownloadManager to android.app (DO NOT MERGE)

Merge commit 'ee215b3df5482b9051364d99411f70132734be21'

* commit 'ee215b3df5482b9051364d99411f70132734be21':
  Moved DownloadManager to android.app (DO NOT MERGE)

9 years agoam d01ccf8e: Merge "Trim the database ...
Brad Fitzpatrick [Tue, 28 Sep 2010 20:23:45 +0000]
am d01ccf8e: Merge "Trim the database & check spurious files off the UI thread." into gingerbread

Merge commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77' into gingerbread-plus-aosp

* commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77':
  Trim the database & check spurious files off the UI thread.

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

9 years agoUpdated assets for downloads UI launcher icon
Steve Howard [Tue, 28 Sep 2010 19:44:46 +0000]
Updated assets for downloads UI launcher icon

Change-Id: I0dc0ef687ebc33a19b3af070df2722840a20eba1

9 years agoam 14961f94: Moved DownloadManager to android.app (DO NOT MERGE)
Steve Howard [Tue, 28 Sep 2010 19:41:36 +0000]
am 14961f94: Moved DownloadManager to android.app (DO NOT MERGE)

Merge commit '14961f94d762e733a733e3268fca1074d8da5f8c' into gingerbread-plus-aosp

* commit '14961f94d762e733a733e3268fca1074d8da5f8c':
  Moved DownloadManager to android.app (DO NOT MERGE)

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

Change-Id: I92180fc4344579b93361d5584243688a1cfdd091

9 years agoam b281b2e6: am 57427e16: Ensure that downloads UI switches to/from empty view as...
Steve Howard [Tue, 28 Sep 2010 04:03:46 +0000]
am b281b2e6: am 57427e16: Ensure that downloads UI switches to/from empty view as needed

Merge commit 'b281b2e6590941e53b0ef3d644e08c48d3367de3'

* commit 'b281b2e6590941e53b0ef3d644e08c48d3367de3':
  Ensure that downloads UI switches to/from empty view as needed

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

9 years agoam 57427e16: Ensure that downloads UI switches to/from empty view as needed
Steve Howard [Mon, 27 Sep 2010 23:26:26 +0000]
am 57427e16: Ensure that downloads UI switches to/from empty view as needed

Merge commit '57427e16d929b34a646dbcac0a16004f4a82cc9c' into gingerbread-plus-aosp

* commit '57427e16d929b34a646dbcac0a16004f4a82cc9c':
  Ensure that downloads UI switches to/from empty view as needed

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

Change-Id: I0eef5efd7affc34c465ce04234713874c8d6937e
Bug: 3038070

9 years agoam 380d44ad: am b8bb8473: UI + string tweaks for downloads UI + size limits UI
Steve Howard [Sun, 26 Sep 2010 21:16:48 +0000]
am 380d44ad: am b8bb8473: UI + string tweaks for downloads UI + size limits UI

Merge commit '380d44ad97ad6c800386729d9bac6947bff1a1b8'

* commit '380d44ad97ad6c800386729d9bac6947bff1a1b8':
  UI + string tweaks for downloads UI + size limits UI

9 years agoam b8bb8473: UI + string tweaks for downloads UI + size limits UI
Steve Howard [Sun, 26 Sep 2010 21:06:10 +0000]
am b8bb8473: UI + string tweaks for downloads UI + size limits UI

Merge commit 'b8bb84731680870be05ea422eb1d269e24a9c660' into gingerbread-plus-aosp

* commit 'b8bb84731680870be05ea422eb1d269e24a9c660':
  UI + string tweaks for downloads UI + size limits UI

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

9 years agoam 2887005a: am ee6fbe24: Merge "Make downloads UI accept new intent action." into...
Steve Howard [Fri, 24 Sep 2010 23:02:40 +0000]
am 2887005a: am ee6fbe24: Merge "Make downloads UI accept new intent action." into gingerbread

Merge commit '2887005aa41714cf0f1830f6c48e010b5f0e5c34'

* commit '2887005aa41714cf0f1830f6c48e010b5f0e5c34':
  Make downloads UI accept new intent action.

9 years agoam ee6fbe24: Merge "Make downloads UI accept new intent action." into gingerbread
Steve Howard [Fri, 24 Sep 2010 22:42:30 +0000]
am ee6fbe24: Merge "Make downloads UI accept new intent action." into gingerbread

Merge commit 'ee6fbe24c53dfac1b1593f6c988931bfe272c262' into gingerbread-plus-aosp

* commit 'ee6fbe24c53dfac1b1593f6c988931bfe272c262':
  Make downloads UI accept new intent action.

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

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

Change-Id: I08c96e1c834fa599e05f18c4c05c3ad5339c3c74

9 years agoMerge "Import revised translations."
Eric Fischer [Fri, 24 Sep 2010 20:20:49 +0000]
Merge "Import revised translations."

9 years agoImport revised translations.
Eric Fischer [Fri, 24 Sep 2010 19:28:46 +0000]
Import revised translations.

Change-Id: Ifcc565b9b2106e412cb883afd3446e4740c29306

9 years agoam d72394e3: (-s ours) am 9a303c9a: Import revised translations. DO NOT MERGE
Eric Fischer [Fri, 24 Sep 2010 18:26:35 +0000]
am d72394e3: (-s ours) am 9a303c9a: Import revised translations.  DO NOT MERGE

Merge commit 'd72394e35ebd9f6b8ca2186beb860c0a7974c85b'

* commit 'd72394e35ebd9f6b8ca2186beb860c0a7974c85b':
  Import revised translations.  DO NOT MERGE

9 years agoam 9a303c9a: Import revised translations. DO NOT MERGE
Eric Fischer [Fri, 24 Sep 2010 18:08:47 +0000]
am 9a303c9a: Import revised translations.  DO NOT MERGE

Merge commit '9a303c9a19bcac7bd40b1a7e06a0f6b1ba4ac202' into gingerbread-plus-aosp

* commit '9a303c9a19bcac7bd40b1a7e06a0f6b1ba4ac202':
  Import revised translations.  DO NOT MERGE

9 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Fri, 24 Sep 2010 17:27:05 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: I0baa17a7069b8e31720524e73f60e7ecf4b3dfe2

9 years agoam 04d70252: am 36f06f4c: Merge "DB migration to eliminate some null fields in old...
Steve Howard [Thu, 23 Sep 2010 20:10:54 +0000]
am 04d70252: am 36f06f4c: Merge "DB migration to eliminate some null fields in old downloads" into gingerbread

Merge commit '04d7025262d7f6c5c372ec699d78b18d05b0400b'

* commit '04d7025262d7f6c5c372ec699d78b18d05b0400b':
  DB migration to eliminate some null fields in old downloads

9 years agoam 5dbaa73a: am ebb555c0: Support multi-valued HTTP headers, handle new API changes
Steve Howard [Thu, 23 Sep 2010 20:10:51 +0000]
am 5dbaa73a: am ebb555c0: Support multi-valued HTTP headers, handle new API changes

Merge commit '5dbaa73a7f356f67810becbf3ad258a7dd765e59'

* commit '5dbaa73a7f356f67810becbf3ad258a7dd765e59':
  Support multi-valued HTTP headers, handle new API changes

9 years agoam 36f06f4c: Merge "DB migration to eliminate some null fields in old downloads"...
Steve Howard [Thu, 23 Sep 2010 19:50:24 +0000]
am 36f06f4c: Merge "DB migration to eliminate some null fields in old downloads" into gingerbread

Merge commit '36f06f4c8497ab47e64bcc5d8cea12a109fede5e' into gingerbread-plus-aosp

* commit '36f06f4c8497ab47e64bcc5d8cea12a109fede5e':
  DB migration to eliminate some null fields in old downloads

9 years agoam ebb555c0: Support multi-valued HTTP headers, handle new API changes
Steve Howard [Thu, 23 Sep 2010 19:50:21 +0000]
am ebb555c0: Support multi-valued HTTP headers, handle new API changes

Merge commit 'ebb555c0687061993dd6a22d15f6aab2437ee8c5' into gingerbread-plus-aosp

* commit 'ebb555c0687061993dd6a22d15f6aab2437ee8c5':
  Support multi-valued HTTP headers, handle new API changes

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

9 years agoDB migration to eliminate some null fields in old downloads
Steve Howard [Thu, 23 Sep 2010 02:51:59 +0000]
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

9 years agoSupport multi-valued HTTP headers, handle new API changes
Steve Howard [Wed, 22 Sep 2010 22:57:30 +0000]
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

9 years agoam ca3d52cc: am ece96c74: Expose permission to download without notification.
Steve Howard [Tue, 21 Sep 2010 22:07:27 +0000]
am ca3d52cc: am ece96c74: Expose permission to download without notification.

Merge commit 'ca3d52cc2aa06ab889f2680f1cc28f540efc1cf1'

* commit 'ca3d52cc2aa06ab889f2680f1cc28f540efc1cf1':
  Expose permission to download without notification.

9 years agoam ece96c74: Expose permission to download without notification.
Steve Howard [Tue, 21 Sep 2010 22:03:03 +0000]
am ece96c74: Expose permission to download without notification.

Merge commit 'ece96c7475696d8b447bb8523f4ad83c897002ea' into gingerbread-plus-aosp

* commit 'ece96c7475696d8b447bb8523f4ad83c897002ea':
  Expose permission to download without notification.

9 years agoExpose permission to download without notification.
Steve Howard [Tue, 21 Sep 2010 20:53:45 +0000]
Expose permission to download without notification.

Change-Id: I43d3b9ca4ea7d4786a47363b4f5f7e6f003013bb

9 years agoam 7b96b251: am d3197296: Implement dialogs for wifi required + recommended limits.
Steve Howard [Tue, 21 Sep 2010 20:12:59 +0000]
am 7b96b251: am d3197296: Implement dialogs for wifi required + recommended limits.

Merge commit '7b96b251c0404ed3f05652bd7d5209910fb999cc'

* commit '7b96b251c0404ed3f05652bd7d5209910fb999cc':
  Implement dialogs for wifi required + recommended limits.

9 years agoam d3197296: Implement dialogs for wifi required + recommended limits.
Steve Howard [Tue, 21 Sep 2010 20:02:10 +0000]
am d3197296: Implement dialogs for wifi required + recommended limits.

Merge commit 'd319729622da1893e895f2e35f41d01ecdca3705' into gingerbread-plus-aosp

* commit 'd319729622da1893e895f2e35f41d01ecdca3705':
  Implement dialogs for wifi required + recommended limits.

9 years agoImplement dialogs for wifi required + recommended limits.
Steve Howard [Fri, 17 Sep 2010 23:45:58 +0000]
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

9 years agoam 7c5a33e4: am 78f433c6: Display time for today\'s downloads, delete files on external
Steve Howard [Tue, 21 Sep 2010 02:32:46 +0000]
am 7c5a33e4: am 78f433c6: Display time for today\'s downloads, delete files on external

Merge commit '7c5a33e468d8d029f66c2fe9191132e9b4ad991b'

* commit '7c5a33e468d8d029f66c2fe9191132e9b4ad991b':
  Display time for today's downloads, delete files on external

9 years agoam 2031fa7b: am dc738781: Merge "Improve file error reporting + new detailed error...
Steve Howard [Tue, 21 Sep 2010 02:32:27 +0000]
am 2031fa7b: am dc738781: Merge "Improve file error reporting + new detailed error messages in UI" into gingerbread

Merge commit '2031fa7bad5ef3e31cf0ea73d0b9bf4670842cf0'

* commit '2031fa7bad5ef3e31cf0ea73d0b9bf4670842cf0':
  Improve file error reporting + new detailed error messages in UI

9 years agoam b8cadd87: am 2d0ed12e: Fix DownloadProvider makefile to correctly include sub...
Steve Howard [Tue, 21 Sep 2010 02:31:20 +0000]
am b8cadd87: am 2d0ed12e: Fix DownloadProvider makefile to correctly include sub-makefiles

Merge commit 'b8cadd87bfc628090c36f74979c7691bb1219ea1'

* commit 'b8cadd87bfc628090c36f74979c7691bb1219ea1':
  Fix DownloadProvider makefile to correctly include sub-makefiles