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

Issue 2750973004: [Media>UI] Don't call onServiceStarted when handling a notification action (Closed)

Created:
3 years, 9 months ago by Zhiqiang Zhang (Slow)
Modified:
3 years, 9 months ago
CC:
agrieve+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Media>UI] Don't call onServiceStarted when handling a notification action There's an issue where when we receive a PAUSE intent fired from media notification, we still call MediaNotificationManager.onServiceStarted(), which will update the notification and call Service.startForeground(). When the PAUSE action is executed, we then update the notification again and call Service.stopForeground(). These two calls are called in a very short time window so that a race condition in Android will keep the notification foreground and unswippable. In this CL, we distinguish start service intents so that we don't update the notification when receiving an action. BUG=701731 R=mlamouri@chromium.org Review-Url: https://codereview.chromium.org/2750973004 Cr-Commit-Position: refs/heads/master@{#457495} Committed: https://chromium.googlesource.com/chromium/src/+/cba3aa3a044b578b02a8c237f0bde012260fcf9e

Patch Set 1 #

Total comments: 2

Patch Set 2 : added comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java View 1 2 chunks +11 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Zhiqiang Zhang (Slow)
3 years, 9 months ago (2017-03-15 19:21:52 UTC) #1
mlamouri (slow - plz ping)
lgtm but it would be great to have a test to make sure we don't ...
3 years, 9 months ago (2017-03-16 12:03:51 UTC) #2
Zhiqiang Zhang (Slow)
On 2017/03/16 at 12:03:51, mlamouri wrote: > lgtm but it would be great to have ...
3 years, 9 months ago (2017-03-16 15:11:58 UTC) #3
mlamouri (slow - plz ping)
On 2017/03/16 at 15:11:58, zqzhang wrote: > On 2017/03/16 at 12:03:51, mlamouri wrote: > > ...
3 years, 9 months ago (2017-03-16 17:36:24 UTC) #4
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2750973004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java File chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java (right): https://codereview.chromium.org/2750973004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java#newcode193 chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java:193: if (intent.getAction() == null) { On 2017/03/16 at 12:03:51, ...
3 years, 9 months ago (2017-03-16 17:36:39 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2750973004/20001
3 years, 9 months ago (2017-03-16 17:42:02 UTC) #8
commit-bot: I haz the power
3 years, 9 months ago (2017-03-16 18:20:55 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/cba3aa3a044b578b02a8c237f0bd...

Powered by Google App Engine
This is Rietveld 408576698