| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
- Better way to dismiss a host activity then explicitly calling
getActivity() finish().
Change-Id: I121fb63d2d57c6c4b22abac2389d5c3d5ccad6e4
|
|
|
|
|
|
|
|
|
|
|
|
| |
TrampolineActivity will be recreated when rotate screen,
then the fragment is currently associated with any Activity.
So getActivity() will return a null and caused NullPointerException.
Add the null check before call finish().
CRs-Fixed: 640914
Change-Id: I76f368a597552e824d533b6a66ea23fad4c0cb41
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This feature contains below points:
1. add to pause running download by manual.
2. add to resume manuallly paused download by manual.
3. add to show proper contents in notification and download-list
for manually paused status.
4. add to support download breakpoint continuing when HTTP server
doesn't contain etag in response header. Android baseline only
supports this when etag is not null.
5. add to show proper contents in notification and download-list
for status of waiting-for-network.
Change-Id: I433cdee2de8b3add0248bbb0a9d02f8da4e5bb38
|
|
|
|
|
|
|
| |
Handle both missing downloads and missing activities.
Bug: 10799449, 10713636
Change-Id: I592b07fc5cf530526803379d7f7a99e8a6b207c4
|
|
|
|
|
|
|
|
|
| |
Handle incoming manage requests by launching finished downloads,
or showing various retry dialogs. Pipe through summary, show
percentage when in progress, and always show total size and MIME type.
Bug: 10531347, 10599641
Change-Id: I3be2bc67ea3c0ef795146177200f5be77ad5114e
|
|
|
|
|
|
|
|
| |
Provides same functionality, but follows updated DocumentsProvider
contract in framework.
Bug: 10497206
Change-Id: Ie1f6180047ff7bad289679a14f3368238d47b1d6
|
|
|
|
|
|
|
|
|
| |
When Downloads app is launched, delegate to new documents management
UI. Use DownloadManager public API to match the contents of the
existing Downloads UI.
Bug: 10329983
Change-Id: Iaa1a1dc013cfe3b17d31ecc764d4c4cc13f62258
|
|\
| |
| |
| |
| | |
* commit '2435eb9c89bd46511624b9d89ab22766f82dbfcb':
Avoid NPE when finding common MIME type.
|
| |
| |
| |
| |
| | |
Bug: 8609148
Change-Id: Ibd1121d6833981234acdc927010087c12913e33d
|
|\ \
| | |
| | |
| | |
| | | |
* commit '64f6b529963d1ec997cff60a79c9d249e5e09040':
Avoid NullPointerException
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A crash will occur when a user share more
than one file and the mime type of any of
the files to share is null.
Avoid crash by not adding the mime type to
the mime type list if the value is null.
Change-Id: Ia06f3389da6ce34e11ffcf349a10fdbe64cfc9bd
|
|\| |
| |/
|/|
| |
| | |
* commit '8b9cad519ef72ed4555e9dd32ecee85c922abc32':
Hide the sorting button when download list is empty
|
| |
| |
| |
| |
| | |
Bug: 8515801
Change-Id: Id5ff6d56eb07de6b76bdb6bc3fa75af6ddd59a39
|
|/
|
|
|
|
|
| |
Clean up some padding, and handle checkbox clicks based on RTL mode.
Bug: 8133419
Change-Id: I9c0f54218eb1c182fbe6f3f4eeb3e83e7ebc6ea9
|
|
|
|
|
|
|
|
| |
Follow move to EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS extras, which
was missing during refactoring.
Bug: 7617373
Change-Id: I26203a2bc6fc0e211a1aa602c0de018332d76f60
|
|
|
|
|
|
| |
Bug #6995003
Change-Id: I3dba57d7ee9697bfdb976432096c680a0f0a4480
|
|
|
|
|
|
|
|
|
| |
When building PackageInstaller intents, include ORIGINATING_URI and
REFERRER extras. Unify view intent building for both notifications
and list UI.
Bug: 6900672
Change-Id: I18435e0f8aa549880ec594f82b6a250232706135
|
|
|
|
|
|
|
|
|
|
|
| |
1. The problem is that download provider is using a custom view to intercept
clicks to toggle the state of the nested check box. However, the when
toggling the code is not calling performClick() on the check box which
aside of toggling will also send the right accessibility event.
bug:6705105
Change-Id: Ia7253ff05f6e4575a346b9aaf3fbceecd68b9782
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Switch to using GridLayout, because it's awesome. Also move status
display to right-hand side, showing date when in completed state.
Bug: 6378944
Change-Id: I540633010ed4aeeae299cedf7a49fdb81e65b431
|
|/
|
|
|
| |
Bug: 5418990
Change-Id: I9e46844d3fc983afc3c389ec64c099374f955610
|
|
|
|
|
|
|
|
|
| |
When viewing file://-style downloads, open through DownloadsProvider
so that FLAG_GRANT_READ_URI_PERMISSION works. Add support for
OpenableColumns to support external apps probing for metadata.
Bug: 6343461
Change-Id: I630405406321ea1871c62cbcded55a4ee024ef6e
|
|\
| |
| |
| | |
Forward Lock support in Download Provider."
|
| |
| |
| |
| |
| |
| | |
new Forward Lock support in Download Provider.
Change-Id: I71faf19527104455b666cba73a052cd0d4b7d70e
|
|/
|
|
|
|
|
|
|
|
|
| |
Now network access is determined by using getActiveNetworkInfoForUid()
which uses BLOCKED to indicate that network should be rejected for
the requesting UID. While download in progress, watch for any policy
changes that should trigger pause.
Also check NetworkInfo.isConnected() for correctness.
Change-Id: I1efa79823f15ecc3fa088a6719da1b770c64b255
|
|
|
|
|
|
| |
this functionality was broken when CAB was added to Downloads app
Change-Id: I00e7313650f872334d6a38dbaff7f97909e2c59c
|
|\
| |
| |
| | |
ExpandedListView" into honeycomb-mr1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in ListView, the following is the behavior
assume setOnItemClickListener() is set on the ListView object.
longpress starts selection
shortpress thereafter selects the item and DOES NOT
call the callback set by setOnItemClickListener()
without preceding longpress, shortpress calls
the callback set by setOnItemClickListener()
in ExpandedListView,
assume setOnChildClickListener() is set
longpress starts selection, as in ListView
shortpress thereafter calls the callback set by setOnChildClickListener()
without preceding longpress, shortpress calls
the callback set by setOnChildClickListener()
as expected.
is this expected behavior in ExpandedListView. sounds like some sort
of bug in ExpandedListView handling.
if this is application bug, is this CL a valid fix?
Change-Id: I4e290b5dcaa263c9ea76ba7926a0131d296c86c2
|
|/
|
|
|
|
|
| |
bug:3511180 can't select items from non-adjacent groups
bug:3510769 Long-pressing on section headers causes strange behavior
bug:4065226 Downloads list switch sorting button has wrong width
Change-Id: If7dd36078224766555f1d2cf18ec364812dcdeb9
|
|
|
|
| |
Change-Id: I24e54f61e7041dd806acd810de29d05301d256e4
|
|
|
|
|
|
|
| |
when moving from landscape/portait to portrait/landscape mode,
losing all the selections (and checkboxes too)
Change-Id: Iefb1e0db00229fca68fc1080accb57b0ae3ca26e
|
|
|
|
| |
Change-Id: I51fec5314722d2ec046f8d2acd60c77efd120f74
|
|
|
|
| |
Change-Id: I9bb1374b7ca0053210274e5d6981b2f2dcf6bfca
|
|
|
|
| |
Change-Id: I4eca06d7fe802aacaad06b23c628a8bf1bf8ad97
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I3c7ee819077d344072deee4cfd61f883c64da758
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
I'll merge this manually, as there's some additional master-only code
that will be to be simultaneously changed.
Change-Id: Ifdb1740f32e228bc07f266585737b98a7b794685
|
|
|
|
|
| |
Change-Id: I0eef5efd7affc34c465ce04234713874c8d6937e
Bug: 3038070
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* in downloads UI, for downloads that occurred today, display the time
of day rather than the date
* when deleting a download on external from the downloads UI,
explicitly delete the underlying file as well (the service only
deletes cache files when deleting a download from the database, it
intentionally leaves external files around)
Change-Id: I9aa02dabe3c091a67e2c2196a0ea2f313bcdcef0
|
|
|
|
|
|
|
|
|
|
|
| |
* support new error code for "destination file already exists"
* improve error handling for various file error cases to return a more
specific error code when appropriate
* make UI support more detailed error messages for some cases
* use Uri.getPath() instead of Uri.getSchemeSpecificPart() for file
URIs
Change-Id: Icb01d4d3b47c7776be3ddcd8347212e950cd023e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change started out just fixing a few regressions related to
notifications:
* Browser downloads weren't picking up a title from the determined
filename. This was due to my change to default the title field to
"" instead of null.
* Notification click/hide events weren't being handled properly. This
was due to previous change to the URI structure of DownloadProvider.
DownloadReceiver needed to be changed to perform queries through
/all_downloads URIs, like all other parts of the download manager
code. I did some general refactoring of the DownloadReceiver code
while I was there.
* The code in DownloadNotification wasn't picking up some updates to
downloads properly. This was due to my change to make
DownloadNotification use the DownloadInfo objects rather than
querying the database directly, so that it could make use of info
provided by the DownloadThread that didn't go into the DB. Fixing
this didn't turn out to be all that complicated, but along the way
to figuring this out I made some substantial refactoring in
DownloadService which made it much cleaner anyway and eliminated a
lot of duplication. That's something that had to happen eventually,
so I'm leaving it all in.
Change-Id: I847ccf80e3d928c84e36bc24791b33204104e1b2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a second view into the download manager
database via a set of URIs starting with /all_downloads, renaming the
original /download URIs to /my_downloads. In addition to making
things more clear, this change allows the downloads UI to grant
permissions on individual downloads to viewer apps.
The old semantics were:
* for ordinary callers, /download included only downloads initiated by
the calling UID
* for intraprocess calls or calls by root, /download included all
downloads
The new semantics are
* /my_downloads always includes only downloads initiated by the
calling UID, and requires only INTERNET permission. It could just
as well require no permission, but that's not possible in the
framework, since path-permissions can only broaden access, not
tighten it. It doesn't matter, because these URIs are useless
without INTERNET permission -- if a user can't initiate downloads,
there's no reason to read this.
* /all_downloads always includes all downloads on the system, and
requires the new permission ACCESS_ALL_DOWNLOADS. This permission
is currently protectionLevel=signature -- this could be relaxed
later to support third-party download managers.
All download manager code has been changed to use /all_downloads URIs,
except when passing a URI to another app. In making this change
across the download manager code, I've taken some liberties in
cleaning things up. Other apps are unchanged and will use
/my_downloads.
Finally, this incorporates changes to DownloadManager to return a
content URI for /cache downloads -- the download UI no longer assumes
it's a file URI, and it grants permissions to the receiver of the VIEW
intent. The public API test has also been updated.
I've also fixed some null cursor checking in DownloadManager.
Change-Id: I05a501eb4388249fe80c43724405657c950d7238
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add support for downloads not visible in the UI
* add support for restarting failed downloads and downloads for which
the file is missing
* add "clear selection" button to selection menu
* fix DateSortedExpandableListAdapter to ensure the view refreshes
properly anytime the underlying data changes
* make DownloadList handle when a selected download gets deleted by
another app
* make DownloadList close a dialog for a pending download when the
download starts
* show a dialog when the user tries to open a download but the
file is missing
* display "<Unknown>" when no title is provided for a download
* add a test case for DownloadManager.orderBy() (should've gone in the
previous commit)
Change-Id: Ibf3062e8228e7f2c1270be24d8d5527dfb064658
|
|
This is the initial checkin for a new system UI for the download
manager. This UI shows all entries present in the Download Manager
database, sorted by either date or size. It allows the user to
monitor status, open files, and delete/cancel entries.
The code was initially copied from the "Downloads" page of
packages/apps/Browser, since the design is based on that UI. Much of
the code is changed, although DateSortedExpandableListAdapter is
nearly identical.
The code is not quite finished, but this is very much a working first
pass.
Change-Id: I7fe102e9f2998e57d893cc3c0f5f6da1cf2db549
|