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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java

Issue 2796573002: Hide the download summary on file open (Closed)
Patch Set: Updated enum to use a more detailed description of the values Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.download; 5 package org.chromium.chrome.browser.download;
6 6
7 import android.app.DownloadManager; 7 import android.app.DownloadManager;
8 import android.content.BroadcastReceiver; 8 import android.content.BroadcastReceiver;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 28 matching lines...) Expand all
39 break; 39 break;
40 } 40 }
41 } 41 }
42 42
43 /** 43 /**
44 * Called to open a particular download item. Falls back to opening Downloa d Home. 44 * Called to open a particular download item. Falls back to opening Downloa d Home.
45 * @param context Context of the receiver. 45 * @param context Context of the receiver.
46 * @param intent Intent from the android DownloadManager. 46 * @param intent Intent from the android DownloadManager.
47 */ 47 */
48 private void openDownload(final Context context, Intent intent) { 48 private void openDownload(final Context context, Intent intent) {
49 DownloadNotificationService.hideDanglingSummaryNotification(context);
50
49 long ids[] = 51 long ids[] =
50 intent.getLongArrayExtra(DownloadManager.EXTRA_NOTIFICATION_CLIC K_DOWNLOAD_IDS); 52 intent.getLongArrayExtra(DownloadManager.EXTRA_NOTIFICATION_CLIC K_DOWNLOAD_IDS);
51 if (ids == null || ids.length == 0) { 53 if (ids == null || ids.length == 0) {
52 DownloadManagerService.openDownloadsPage(context); 54 DownloadManagerService.openDownloadsPage(context);
53 return; 55 return;
54 } 56 }
55 57
56 long id = ids[0]; 58 long id = ids[0];
57 Uri uri = DownloadManagerDelegate.getContentUriFromDownloadManager(conte xt, id); 59 Uri uri = DownloadManagerDelegate.getContentUriFromDownloadManager(conte xt, id);
58 if (uri == null) { 60 if (uri == null) {
(...skipping 17 matching lines...) Expand all
76 * to start the browser process asynchronously, and resume or cancel the dow nload afterwards. 78 * to start the browser process asynchronously, and resume or cancel the dow nload afterwards.
77 * @param context Context of the receiver. 79 * @param context Context of the receiver.
78 * @param intent Intent retrieved from the notification. 80 * @param intent Intent retrieved from the notification.
79 */ 81 */
80 private void performDownloadOperation(final Context context, Intent intent) { 82 private void performDownloadOperation(final Context context, Intent intent) {
81 if (DownloadNotificationService.isDownloadOperationIntent(intent)) { 83 if (DownloadNotificationService.isDownloadOperationIntent(intent)) {
82 DownloadNotificationService.startDownloadNotificationService(context , intent); 84 DownloadNotificationService.startDownloadNotificationService(context , intent);
83 } 85 }
84 } 86 }
85 } 87 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698