| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
bug:3264401
still to do:
make sure only N bytes are taken up by downloads dir
N = a value specific to each device.
default = 100MB.
Change-Id: I2a49f4b3831d3a8d7be13b5fd46d85d56e831e38
|
|
|
|
|
|
| |
need this CL from GB. without it, downloads are badly broken in master.
Change-Id: I82ebc467f877bed50e373c437481ad19e14635bf
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
aThis 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.
Change-Id: Ifea1544737023008eff44aef9acd976902a0c143
|
|\ \
| |/
|/|
| |
| |
| |
| | |
GB MR and real fix in HC" into gingerbread
* commit '084c3dc34ed9e6ae9ddc471819de0d6d55021dfd':
(GB MR) bug:3144642 temporary small fix in GB MR and real fix in HC
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
real fix in HC" into gingerbread
* commit '26f86843f48b3d7878837a1a9f93865b3eba0aee':
(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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
ACCESS_ALL_DOWNLOADS
* commit '5c29cce0bac00a7a32cd92210825a789e140cf94':
Don't filter by UID for apps with ACCESS_ALL_DOWNLOADS
|
| |\|
| | |
| | |
| | |
| | | |
* 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: I8940778292d0a9166cfcfb92d37ea568b8f6ceef
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
bug:3176990
Change-Id: I182331cbd63b6524a18d19e4d8567210886f8c16
|
| | |
| | |
| | |
| | | |
Change-Id: I96f0b51295611b67735c1b726bcd46bbeaa90613
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | | |
bug:3162073
Change-Id: I13b80fedd7658c8574f33b43b74b5aa28a2895bc
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
if a download fails for some reason, then filename could be null.
move Helpers.deleteFile() code into private method in DownloadService
Change-Id: Ifb12a84b6185e19c70d62392e102950c07f56a01
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bug:3132790
this mimics the behavior that exists today (in non-public API)
Change-Id: I722b3bc23fe8c9b0bf66a088c5f6a3130be2129f
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
otherwise, one has to recompile and reflash to get debug output
Change-Id: I1d89d7cca3363fa793f74ba805136667e1ce3091
|
| | |
| | |
| | |
| | | |
Change-Id: I2edf1bef5e741de8193cb293807e3ace42003b0c
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit '9f6654cfec6e6d8d1e3de9a8adeba46137a22105'
* commit '9f6654cfec6e6d8d1e3de9a8adeba46137a22105':
bug:3099994 NPE in DownloadManager when deleting non-media file
|
| |\|
| | |
| | |
| | | |
Change-Id: I404d1a66d337b1dade181ade92dc21fc0e819aa7
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 '3e759e21291d6ca1a49ded3f24f3be0a26af4e2b'
* commit '3e759e21291d6ca1a49ded3f24f3be0a26af4e2b':
fix broken build bug:3095237
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787' into gingerbread-plus-aosp
* commit 'a53c21edb5dc57d97dcddd03fbfa2022abf43787':
fix broken build bug:3095237
|
| | |
| | |
| | |
| | | |
Change-Id: I7e1fe99cc482fc270894a820049275fc0c64233e
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
correctly
Merge commit '57c4e9180e3a339dba984f1c8dff76ef18443a7a'
* commit '57c4e9180e3a339dba984f1c8dff76ef18443a7a':
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
queries." into gingerbread
Merge commit '1f262cf3af0512e0d621b7818aab9bb79527f01f'
* commit '1f262cf3af0512e0d621b7818aab9bb79527f01f':
Make DownloadProvider use parameterized queries.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
DownloadThread." into gingerbread
Merge commit 'ace1d5da2b288f6166224cf2164731ae0fa2de61'
* commit 'ace1d5da2b288f6166224cf2164731ae0fa2de61':
Seriously improve error reporting in DownloadThread.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 '42469fa405c7aa891e7c431cd65edd424803979c'
* commit '42469fa405c7aa891e7c431cd65edd424803979c':
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
|
| | |/
| | |
| | |
| | | |
Change-Id: Ic937b05308cecce244725e25767a3a1310a8463d
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge commit 'ed2f11502fb02509d9efec1dbda7981c86f37fbd'
* commit 'ed2f11502fb02509d9efec1dbda7981c86f37fbd':
Improve how the download manager reports paused statuses.
|
| |\|
| | |
| | |
| | | |
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
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
off the UI thread." into gingerbread
Merge commit 'fce7a5e8547d4ea53700f37b87752e26a39e4cc4'
* commit 'fce7a5e8547d4ea53700f37b87752e26a39e4cc4':
Trim the database & check spurious files off the UI thread.
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
thread." into gingerbread
Merge commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77' into gingerbread-plus-aosp
* commit 'd01ccf8ef98aba424a49c44ed6db39435c6d6d77':
Trim the database & check spurious files off the UI thread.
|
| | |\
| | | |
| | | |
| | | | |
gingerbread
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I92180fc4344579b93361d5584243688a1cfdd091
|
| |\| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Merge commit '14961f94d762e733a733e3268fca1074d8da5f8c' into gingerbread-plus-aosp
* commit '14961f94d762e733a733e3268fca1074d8da5f8c':
Moved DownloadManager to android.app (DO NOT MERGE)
|