Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3959)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java

Issue 2376893006: [Downloads] Open media downloads internally (Closed)
Patch Set: Test changes, moving files Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
index eb3b4f1521ce0f40866071af50dcc26539ee3b7f..db330e1dc29f30bd76763c49347fc2a0de77d6f8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java
@@ -48,6 +48,7 @@ public class DownloadNotificationService extends Service {
static final String EXTRA_DOWNLOAD_NOTIFICATION_ID = "DownloadNotificationId";
static final String EXTRA_DOWNLOAD_GUID = "DownloadGuid";
static final String EXTRA_DOWNLOAD_FILE_NAME = "DownloadFileName";
+ static final String EXTRA_DOWNLOAD_FILE_PATH = "DownloadFilePath";
static final String EXTRA_NOTIFICATION_DISMISSED = "NotificationDismissed";
static final String EXTRA_DOWNLOAD_IS_OFF_THE_RECORD = "DownloadIsOffTheRecord";
static final String EXTRA_DOWNLOAD_IS_OFFLINE_PAGE = "DownloadIsOfflinePage";
@@ -326,13 +327,15 @@ public class DownloadNotificationService extends Service {
/**
* Add a download successful notification.
* @param downloadGuid GUID of the download.
- * @param fileName GUID of the download.
+ * @param filePath Full path to the download.
+ * @param fileName Filename of the download.
* @param systemDownloadId Download ID assigned by system DownloadManager.
* @return ID of the successful download notification. Used for removing the notification when
* user click on the snackbar.
*/
public int notifyDownloadSuccessful(
- String downloadGuid, String fileName, long systemDownloadId, boolean isOfflinePage) {
+ String downloadGuid, String filePath, String fileName, long systemDownloadId,
+ boolean isOfflinePage) {
int notificationId = getNotificationId(downloadGuid);
NotificationCompat.Builder builder = buildNotification(
android.R.drawable.stat_sys_download_done, fileName,
@@ -347,6 +350,7 @@ public class DownloadNotificationService extends Service {
intent = new Intent(DownloadManager.ACTION_NOTIFICATION_CLICKED);
long[] idArray = {systemDownloadId};
intent.putExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS, idArray);
+ intent.putExtra(EXTRA_DOWNLOAD_FILE_PATH, filePath);
}
intent.setComponent(component);
builder.setContentIntent(PendingIntent.getBroadcast(

Powered by Google App Engine
This is Rietveld 408576698