Chromium Code Reviews| 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 737dd84c23e7f77ce2df6154e81bfc04c1573d11..e1f32ad42fe9f34ead4cc488b344117f56603295 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 |
| @@ -270,7 +270,7 @@ public class DownloadNotificationService extends Service { |
| * @param percentage Percentage completed. Value should be between 0 to 100 if |
| * the percentage can be determined, or -1 if it is unknown. |
| * @param bytesReceived Total number of bytes received. |
| - * @param timeRemainingInMillis Remaining download time in milliseconds. |
| + * @param timeRemainingInMillis Remaining download time in milliseconds or -1 if it is unknown. |
| * @param startTime Time when download started. |
| * @param isOffTheRecord Whether the download is off the record. |
| * @param canDownloadWhileMetered Whether the download can happen in metered network. |
| @@ -291,6 +291,8 @@ public class DownloadNotificationService extends Service { |
| } else if (indeterminate) { |
| contentText = DownloadUtils.getStringForBytes( |
| mContext, DownloadUtils.BYTES_DOWNLOADED_STRINGS, bytesReceived); |
| + } else if (timeRemainingInMillis < 0) { |
| + contentText = mContext.getResources().getString(R.string.download_started); |
|
qinmin
2017/01/25 18:21:51
nit: you can save one else block here, just
else
shaktisahu
2017/01/25 19:24:56
Done.
|
| } else { |
| contentText = formatRemainingTime(mContext, timeRemainingInMillis); |
| } |