Open downloads from notifications.
Bug:3116742
When moving to the public API, notifications no longer
worked as expected. Make downloads show after completing,
and use the public API in OpenDownloadReceiver.
Change-Id: Ia15000de4a66e8728b43fc53f428e098503b003b
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 072a0b1..799a8da 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3187,6 +3187,8 @@
request.setDescription(webAddress.getHost());
String cookies = CookieManager.getInstance().getCookie(url);
request.addRequestHeader("cookie", cookies);
+ request.setNotificationVisibility(
+ DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
if (mimetype == null) {
ContentValues values = new ContentValues();
values.put(FetchUrlMimeType.URI, addressString);