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

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

Issue 2735073002: Downloads service foreground on N (Closed)
Patch Set: Created 3 years, 9 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 | « chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java b/chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java
index 1c2f1832d86b2357c9bd48cc7208b8b792048996..c5b99f6718b82a0bacf298c788e5439e19d93c2e 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/download/MockDownloadNotificationService.java
@@ -8,7 +8,6 @@ import android.app.Notification;
import android.content.Context;
import android.util.Pair;
-import org.chromium.base.BuildInfo;
import org.chromium.base.ThreadUtils;
import java.util.ArrayList;
@@ -30,7 +29,7 @@ public class MockDownloadNotificationService extends DownloadNotificationService
@Override
public void stopForegroundInternal(boolean killNotification) {
- if (!BuildInfo.isAtLeastO()) return;
+ if (!useForegroundService()) return;
if (killNotification) mNotificationIds.clear();
}
@@ -45,7 +44,7 @@ public class MockDownloadNotificationService extends DownloadNotificationService
@Override
boolean hasDownloadNotifications(Integer notificationIdToIgnore) {
- if (!BuildInfo.isAtLeastO()) return false;
+ if (!useForegroundService()) return false;
// Cancelling notifications here is synchronous, so we don't really have to worry about
// {@code notificationIdToIgnore}, but address it properly anyway.
if (mNotificationIds.size() == 1 && notificationIdToIgnore != null) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698