New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 755143 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 778599
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Need to call setShowWhen() on notifications with a developer-provided timestamp

Project Member Reported by peter@chromium.org, Aug 14 2017

Issue description

Developers can provide a custom timestamp for Web Notifications by using the `timestamp` option when creating one.

On Android versions prior to N, this would show the time on the notification toast itself. Since N, the default has changed to hide the time. When the developer explicitly provides a timestamp, we should call setShowWhen() to make sure it displays after all.

(I'm erring towards *always* displaying the timestamp, which is what most other apps on my phone seem to do, but that's a separate discussion.)
 

Comment 1 by peter@chromium.org, Aug 14 2017

Cc: wic...@olseryd.se
+Wictor who kindly reported this

Comment 2 by na...@chromium.org, Jan 8 2018

Owner: na...@chromium.org
Taking this on.

Comment 3 by na...@chromium.org, Jan 9 2018

Notifications are created using createChromeNotificationBuilder(). Looking at the references for this function from notifications code, there are three invocations. Two of these (from StandardNotificationBuilder and CustomNotificationBuilder) do call setShowWhen(true).
The third one (NotificationBuilderBase) doesn't do so. However, this one is showing notifications in sensitive situations like on the lock screen, and explicitly sets setShowWhen to false for Android L and M where notification timestamp is automatically shown.

Is there a reliable way to repro this so I can test if this is still an issue?

From Blame, I can see awdf@ made a change for  Bug 778599  (https://chromium-review.googlesource.com/c/chromium/src/+/749403) where she changed code to always show timestamp.
Is the ask here to show timestamp only when the developer has provided one?

Comment 4 by na...@chromium.org, Jan 9 2018

Mergedinto: 778599
Status: Duplicate (was: Available)
Tested it using https://tests.peter.sh/notification-generator
Since  Bug 778599  is the same issue and has been fixed, I'm duping this one to 778599.

Sign in to add a comment