diff options
author | Vasu Nori <vnori@google.com> | 2010-11-04 18:16:10 -0700 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-11-15 10:04:44 -0500 |
commit | 1d88aa02955a2579e38f6aeea56ec737a0310d62 (patch) | |
tree | ac47739916fb52d091c72bc2d905d01234fe575f /src/com/android/browser/BrowserActivity.java | |
parent | 09ccfc737f764131c16334a444c7b96ab751c402 (diff) | |
download | packages_apps_Browser-1d88aa02955a2579e38f6aeea56ec737a0310d62.zip packages_apps_Browser-1d88aa02955a2579e38f6aeea56ec737a0310d62.tar.gz packages_apps_Browser-1d88aa02955a2579e38f6aeea56ec737a0310d62.tar.bz2 |
use new API (and not db) to access download notifications
instead of opening a cursor on the database to retrieve the file
to be opened when a notification is clicked on, use
DownloadManager's newly introduced API to get Uri and its
mimetype.
also, in BrowserActivity, when downloading a file,
allow it to be MediaScanner scannable and thus allow
media files to be displayed in Gallery.
by default, downloaded files DO NOT appear in Gallery
app any longer
depends on the following 3 CLs
I1f5dd734e394db0056579a3a0c26862fee27981e
I5c062ad6d1b58306044cee49ff3827e908d27fd9
Ia15000de4a66e8728b43fc53f428e098503b003b
Change-Id: Iad11a63fe0a7b8de188d1b6dc0445ccb96211fb2
Diffstat (limited to 'src/com/android/browser/BrowserActivity.java')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 799a8da..639a75b 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -3184,6 +3184,9 @@ public class BrowserActivity extends Activity DownloadManager.Request request = new DownloadManager.Request(uri); request.setMimeType(mimetype); request.setDestinationInExternalFilesDir(this, null, filename); + // let this downloaded file be scanned by MediaScanner - so that it can show up + // in Gallery app, for example. + request.allowScanningByMediaScanner(); request.setDescription(webAddress.getHost()); String cookies = CookieManager.getInstance().getCookie(url); request.addRequestHeader("cookie", cookies); |