Commit ae4b0f00 authored by Xing Liu's avatar Xing Liu Committed by Commit Bot

Download notification: Fix small icon for incognito mode.

In normal profile, the small icon uses different default icons based
on download state. Incognito mode should do the same since download
state is not privacy information. Other systems try to use download
notification currently don't plumb the small icon into
DownloadNotificationFactory.

Bug: 901141
Change-Id: I3f813adab15484b1e97e8d1592979f8f381ad8d0
Reviewed-on: https://chromium-review.googlesource.com/c/1313928Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Xing Liu <xingliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604981}
parent 35f88255
...@@ -259,12 +259,7 @@ public final class DownloadNotificationFactory { ...@@ -259,12 +259,7 @@ public final class DownloadNotificationFactory {
Bundle extras = new Bundle(); Bundle extras = new Bundle();
extras.putInt(EXTRA_NOTIFICATION_BUNDLE_ICON_ID, iconId); extras.putInt(EXTRA_NOTIFICATION_BUNDLE_ICON_ID, iconId);
builder.setSmallIcon(iconId).addExtras(extras);
if (downloadUpdate.getIsOffTheRecord()) {
builder.setSmallIcon(R.drawable.offline_pin).addExtras(extras);
} else {
builder.setSmallIcon(iconId).addExtras(extras);
}
// Context text is shown as title in incognito mode as the file name is not shown. // Context text is shown as title in incognito mode as the file name is not shown.
if (downloadUpdate.getIsOffTheRecord()) { if (downloadUpdate.getIsOffTheRecord()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment