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

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

Issue 2514783003: Avoid shoing progress bar on "pending" download notifications. They still should remain "ongoing". (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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/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 6fc49ba076ce1e9ca4e5fc1127aed225778308e1..7e1e7494bfecfa401d617e2a4c22d4ef81d99409 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
@@ -269,7 +269,11 @@ public class DownloadNotificationService extends Service {
NotificationCompat.Builder builder = buildNotification(
android.R.drawable.stat_sys_download, fileName, contentText);
boolean indeterminate = (percentage == INVALID_DOWNLOAD_PERCENTAGE) || isDownloadPending;
- builder.setOngoing(true).setProgress(100, percentage, indeterminate);
+ builder.setOngoing(true);
+ // Avoid moving animations while download is not downloading.
+ if (!isDownloadPending) {
+ builder.setProgress(100, percentage, indeterminate);
+ }
builder.setPriority(Notification.PRIORITY_HIGH);
if (!indeterminate && !isOfflinePage) {
String duration = formatRemainingTime(mContext, timeRemainingInMillis);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698