| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* commit 'e1823c84698006aa26a8c5dcfa5c4034858dfbe3':
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
|
|\| |
|
| |
| |
| |
| | |
Change-Id: Iadedcf076f8bbe43d1864baf989b21d9d30f13f7
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit 'c08eb2797760e31f3962795b84d0528149a84986' into gingerbread-plus-aosp
* commit 'c08eb2797760e31f3962795b84d0528149a84986':
Import revised translations. DO NOT MERGE
|
| |
| |
| |
| | |
Change-Id: Id9cdaf0062ee97f067b644bcc00d41182ff52934
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit '404d31e3e2ca00e9c45b94ca0de9c36a87e999ab' into gingerbread-plus-aosp
* commit '404d31e3e2ca00e9c45b94ca0de9c36a87e999ab':
Replace shared storage with USB storage.
|
| |
| |
| |
| | |
Change-Id: If3fb1c213f9f9c6f21bd1f13f633393a32d2509a
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit '3c3ed3c1488c2ebfd2b66a3cdf09b3e312883159' into gingerbread-plus-aosp
* commit '3c3ed3c1488c2ebfd2b66a3cdf09b3e312883159':
bug:3083060 UI tweaks to DownloadManager screens
|
| |
| |
| |
| | |
Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit '4c1acb60162e2a2e8c80a996676a4d543a2eb3a7' into gingerbread-plus-aosp
* commit '4c1acb60162e2a2e8c80a996676a4d543a2eb3a7':
Import revised translations DO NOT MERGE
|
| |\ |
|
| | |
| | |
| | |
| | | |
Change-Id: I21052e55a62dd3d9a9846dec30c3ac12cc9c25af
|
|\| |
| | |
| | |
| | | |
Change-Id: I404d1a66d337b1dade181ade92dc21fc0e819aa7
|
| |\ \
| | |/
| |/|
| | | |
gingerbread
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit '887a95e29a8776a07b411c472a11e82ad84464a8' into gingerbread-plus-aosp
* commit '887a95e29a8776a07b411c472a11e82ad84464a8':
Import revised translations
|
| |/
| |
| |
| | |
Change-Id: I03a58b6efd2e1a12054bc7dbb320368be6cfdd17
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787' into gingerbread-plus-aosp
* commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787':
fix broken build bug:3095237
|
| |
| |
| |
| | |
Change-Id: I7e1fe99cc482fc270894a820049275fc0c64233e
|
|\|
| |
| |
| |
| |
| |
| | |
Merge commit 'e00c31208405bd2e4c88e069df7a2b15237f70bf' into gingerbread-plus-aosp
* commit 'e00c31208405bd2e4c88e069df7a2b15237f70bf':
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
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
gingerbread
Merge commit 'cd990514feb2b17848809d9262e0d73a828b2142' into gingerbread-plus-aosp
* commit 'cd990514feb2b17848809d9262e0d73a828b2142':
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit '49f78e40831793ff805bb602b226c372212998ec' into gingerbread-plus-aosp
* commit '49f78e40831793ff805bb602b226c372212998ec':
Import revised translations. DO NOT MERGE
|
| |/
| |
| |
| | |
Change-Id: I1f00b783250d0c4112cf7918f9ab05f83c209407
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
gingerbread
Merge commit 'e4b6453558531bc897720f9c94affc650c99e974' into gingerbread-plus-aosp
* commit 'e4b6453558531bc897720f9c94affc650c99e974':
Updated assets for downloads UI launcher icon
|
| |\ |
|
| | |
| | |
| | |
| | | |
Change-Id: I0dc0ef687ebc33a19b3af070df2722840a20eba1
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
into gingerbread
Merge commit 'd4dc8501ecb89b91f865510207297dd960afe031' into gingerbread-plus-aosp
* commit 'd4dc8501ecb89b91f865510207297dd960afe031':
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
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '5d81e2447ed77860afecd71583e137178c2c6807' into gingerbread-plus-aosp
* commit '5d81e2447ed77860afecd71583e137178c2c6807':
Avoid NPE when checking file URI in DownloadProvider
|
| |/ /
| | |
| | |
| | | |
Change-Id: Ic937b05308cecce244725e25767a3a1310a8463d
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
gingerbread
Merge commit '8df47822435f7f66dd34f87dcaa73bbbcd808483' into gingerbread-plus-aosp
* commit '8df47822435f7f66dd34f87dcaa73bbbcd808483':
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
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '6fbdadce019f91770c81f4db6421c2828e62a15f' into gingerbread-plus-aosp
* commit '6fbdadce019f91770c81f4db6421c2828e62a15f':
Import revised translations. DO NOT MERGE
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I27a5fc3ab9bd0fd3e6d9db674ef32077d623e7b6
|
|\| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Merge commit '4ae7507440b338a9ac9aea230ee8046a805adae0' into gingerbread-plus-aosp
* commit '4ae7507440b338a9ac9aea230ee8046a805adae0':
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
|
|\| | |
| | | |
| | | |
| | | | |
Change-Id: Iced3a5360702fdeb299f8b987a353d3aeca7629b
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
into gingerbread
Merge commit '69784dc727df4f79ceff2ca88d4c79a98583c5b0' into gingerbread-plus-aosp
* commit '69784dc727df4f79ceff2ca88d4c79a98583c5b0':
Split strings with SD card references into variations.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I62562315a3b0691ee3a541e320b42463cff65265
|
|\| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
thread." into gingerbread
Merge commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77' into gingerbread-plus-aosp
* commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77':
Trim the database & check spurious files off the UI thread.
|
| |\ \ \
| | |_|/
| |/| |
| | | | |
gingerbread
|