8 years agoImport initial translations for 20 new locales.
Eric Fischer [Thu, 18 Nov 2010 00:44:53 +0000]
Import initial translations for 20 new locales.

Change-Id: I1837f21d4369070e4ba167f8cab45f6df1daa037

8 years agofix permissions when accessing downloads thru various Uri's
Vasu Nori [Tue, 16 Nov 2010 22:35:31 +0000]
fix permissions when accessing downloads thru various Uri's

fixes this bug bug:3169457 also

Change-Id: I0f60333361c5c399c64faa2d497038530064bef0

8 years agoprovider changes due to CL: Ief1693785f0484c1b434fb41a68693f9aff96492
Vasu Nori [Tue, 9 Nov 2010 20:30:19 +0000]
provider changes due to CL: Ief1693785f0484c1b434fb41a68693f9aff96492

Change-Id: I8940778292d0a9166cfcfb92d37ea568b8f6ceef

8 years agosimplify actions to perform when user clicks on delete in download app
Vasu Nori [Tue, 9 Nov 2010 20:13:38 +0000]
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

8 years agowhen a download fails, store the error msg in db
Vasu Nori [Thu, 11 Nov 2010 23:26:07 +0000]
when a download fails, store the error msg in db

useful for debugging for bugs like bug:3187299
without this error message, one doesn't know WHY downloads
fail.
to prevent PII info in database,
there is a STOPSHIP comment around storage of this error
message in database.

Change-Id: I612e383aef8483b68b772f70dff722a5daea2ef5

8 years agoImport revised translations.
Eric Fischer [Wed, 10 Nov 2010 01:44:17 +0000]
Import revised translations.

Change-Id: Ic0c8d1b205c495bbcaccf3141abcbc1d14e6ea42

8 years agoif any exceptions encountered while trimming downloads db, ignore 'em.
Vasu Nori [Tue, 9 Nov 2010 21:25:37 +0000]
if any exceptions encountered while trimming downloads db, ignore 'em.

bug:3176990
Change-Id: I182331cbd63b6524a18d19e4d8567210886f8c16

8 years agoallow the column "scanned" from DownloadManager. bug:3169437
Vasu Nori [Fri, 5 Nov 2010 18:00:31 +0000]
allow the column "scanned" from DownloadManager. bug:3169437

Change-Id: I96f0b51295611b67735c1b726bcd46bbeaa90613

8 years agochanges to support CL: I1f5dd734e394db0056579a3a0c26862fee27981e
Vasu Nori [Thu, 4 Nov 2010 22:03:31 +0000]
changes to support CL: I1f5dd734e394db0056579a3a0c26862fee27981e

1. if an application designates a downloaded file to be mediascanner
scannable or not, store that fact in database.
2. use the above to determine whether a file shoudl be mediascanned or not
in DownloadService
3. implement code to return mimetype for the new Uri "/public_downloads"
introduced in CL: I1f5dd734e394db0056579a3a0c26862fee27981e

Change-Id: I5c062ad6d1b58306044cee49ff3827e908d27fd9

8 years agodownloadmanager public API usage can cause non-scanning of media files
Vasu Nori [Wed, 3 Nov 2010 20:12:11 +0000]
downloadmanager public API usage can cause non-scanning of media files

bug:3162073
Change-Id: I13b80fedd7658c8574f33b43b74b5aa28a2895bc

8 years agoin DM public API, sending notifications on clicks should include data
Vasu Nori [Wed, 27 Oct 2010 18:47:25 +0000]
in DM public API, sending notifications on clicks should include data

receiving application needs to know WHAT items the clicks occurred on -
not just the fact that *something* was clicked on.
this is duplicating the behavior as it exists today in the non-public API.

depends on Change-Id: Ibe53ccd9934c73175459e42e3d417eee69ae6735

Change-Id: I924f85bd5faf443ac5648839b68390ec4de1f677

8 years agomake sure filename is non-null before delting it.
Vasu Nori [Fri, 29 Oct 2010 20:34:14 +0000]
make sure filename is non-null before delting it.

if a download fails for some reason, then filename could be null.
move Helpers.deleteFile() code into private method in DownloadService

Change-Id: Ifb12a84b6185e19c70d62392e102950c07f56a01

8 years agowhen using DM public API, allow duplicate downloads of same file
Vasu Nori [Thu, 28 Oct 2010 19:08:42 +0000]
when using DM public API, allow duplicate downloads of same file

bug:3132790
this mimics the behavior that exists today (in non-public API)

Change-Id: I722b3bc23fe8c9b0bf66a088c5f6a3130be2129f

8 years agoMerge "Import revised translations."
Eric Fischer [Wed, 27 Oct 2010 22:18:13 +0000]
Merge "Import revised translations."

8 years agoMerge "reduce number of times mediascanner is invoked by downloadservice"
Vasu Nori [Wed, 27 Oct 2010 21:55:07 +0000]
Merge "reduce number of times mediascanner is invoked by downloadservice"

8 years agoImport revised translations.
Eric Fischer [Wed, 27 Oct 2010 21:37:44 +0000]
Import revised translations.

Change-Id: I0560d6ae179ababe74f53d3b937b8c53b674451b

8 years agoMerge "allow run-time verbose debugging option on downloadmanager code."
Vasu Nori [Wed, 27 Oct 2010 19:01:31 +0000]
Merge "allow run-time verbose debugging option on downloadmanager code."

8 years agoallow run-time verbose debugging option on downloadmanager code.
Vasu Nori [Wed, 27 Oct 2010 18:54:50 +0000]
allow run-time verbose debugging option on downloadmanager code.

otherwise, one has to recompile and reflash to get debug output

Change-Id: I1d89d7cca3363fa793f74ba805136667e1ce3091

8 years agoam b2fb2046: (-s ours) am 6bc0865d: Import revised translations. DO NOT MERGE
Eric Fischer [Wed, 27 Oct 2010 18:03:58 +0000]
am b2fb2046: (-s ours) am 6bc0865d: Import revised translations.  DO NOT MERGE

8 years agoam 6bc0865d: Import revised translations. DO NOT MERGE
Eric Fischer [Wed, 27 Oct 2010 18:02:04 +0000]
am 6bc0865d: Import revised translations.  DO NOT MERGE

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 agoImport revised translations. DO NOT MERGE
Eric Fischer [Wed, 27 Oct 2010 00:03:27 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Iadedcf076f8bbe43d1864baf989b21d9d30f13f7

8 years agoam cba66d82: (-s ours) am c08eb279: Import revised translations. DO NOT MERGE
Eric Fischer [Tue, 26 Oct 2010 00:30:55 +0000]
am cba66d82: (-s ours) am c08eb279: Import revised translations.  DO NOT MERGE

Merge commit 'cba66d82e30d3ae1be826989229975e05cd9a754'

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

8 years agoam c08eb279: Import revised translations. DO NOT MERGE
Eric Fischer [Tue, 26 Oct 2010 00:11:45 +0000]
am c08eb279: Import revised translations.  DO NOT MERGE

Merge commit 'c08eb2797760e31f3962795b84d0528149a84986' into gingerbread-plus-aosp

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

8 years agoImport revised translations. DO NOT MERGE
Eric Fischer [Mon, 25 Oct 2010 23:52:50 +0000]
Import revised translations.  DO NOT MERGE

Change-Id: Id9cdaf0062ee97f067b644bcc00d41182ff52934

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

8 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

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

Change-Id: I404d1a66d337b1dade181ade92dc21fc0e819aa7

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

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

Change-Id: I03a58b6efd2e1a12054bc7dbb320368be6cfdd17

8 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

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

Change-Id: I7e1fe99cc482fc270894a820049275fc0c64233e

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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.

8 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

8 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

8 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

8 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.

8 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.

8 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

8 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

8 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

8 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.

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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)

8 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.

8 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

8 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

8 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)

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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.