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

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

Issue 2805843002: Workaround for NotificationManager race condition (Closed)
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
index 04beb7d484e1ee21db7b7271b53a7f8a5e0f1505..4f4f9a99a1d3343fe2c017b3c5f46072b5b6d3fd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastReceiver.java
@@ -10,6 +10,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
+import org.chromium.chrome.browser.notifications.NotificationConstants;
import org.chromium.chrome.browser.util.IntentUtils;
import org.chromium.components.offline_items_collection.ContentId;
@@ -46,7 +47,9 @@ public class DownloadBroadcastReceiver extends BroadcastReceiver {
* @param intent Intent from the android DownloadManager.
*/
private void openDownload(final Context context, Intent intent) {
- DownloadNotificationService.hideDanglingSummaryNotification(context);
+ int notificationId = IntentUtils.safeGetIntExtra(
+ intent, NotificationConstants.EXTRA_NOTIFICATION_ID, -1);
+ DownloadNotificationService.hideDanglingSummaryNotification(context, notificationId);
long ids[] =
intent.getLongArrayExtra(DownloadManager.EXTRA_NOTIFICATION_CLICK_DOWNLOAD_IDS);
« 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