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

Issue 638858 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

After dismissing MediaNotification, unplugging the headset makes the notification show again

Project Member Reported by zqzh...@chromium.org, Aug 18 2016

Issue description

Seems like we are allowing pause() when the MediaSession is inactive.
 
BTW, if you look into this code, I think there might be an issue with the UMA we record for headset: we might be recording all the time, even if it's not actually used for play/pause.
Thanks, I was wondering why HeadsetUnplug is the majority for MediaSession.Suspend. This should be the cause.
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e03e8ee0fc359e38700001f04b7ec2e9a01f5f52

commit e03e8ee0fc359e38700001f04b7ec2e9a01f5f52
Author: zqzhang <zqzhang@chromium.org>
Date: Thu Aug 18 15:01:21 2016

Fixing headset unplug issues in MediaNotification

This CL make MediaNotification fire a ACTION_STOP PendingIntent when the
notification is dismissed, making the MediaSession inactive.

Also, MediaNotification will not call play()/pause() when the
notification is already in that state, preventing calling pause() when
unpluging headset when the notification is already in paused state.

An unplug-related UMA issue is also fixed in this CL.

BUG= 638858 

Review-Url: https://codereview.chromium.org/2253293004
Cr-Commit-Position: refs/heads/master@{#412829}

[modify] https://crrev.com/e03e8ee0fc359e38700001f04b7ec2e9a01f5f52/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java

Labels: Merge-Request-53
Requesting to merge in M53 since this is a regression since M52
Status: Started (was: Assigned)

Comment 6 by dimu@chromium.org, Aug 18 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
Manually post the merge message:

Patchset landed as:

https://chromium.googlesource.com/chromium/src.git/+/9362f358fd3f2456a71547e54bf4bafbc803246f

Description

Fixing headset unplug issues in MediaNotification

This CL make MediaNotification fire a ACTION_STOP PendingIntent when the
notification is dismissed, making the MediaSession inactive.

Also, MediaNotification will not call play()/pause() when the
notification is already in that state, preventing calling pause() when
unpluging headset when the notification is already in paused state.

An unplug-related UMA issue is also fixed in this CL.

BUG= 638858 

Review-Url: https://codereview.chromium.org/2253293004
Cr-Commit-Position: refs/heads/master@{#412829}
(cherry picked from commit e03e8ee0fc359e38700001f04b7ec2e9a01f5f52)

Review URL: https://codereview.chromium.org/2260563002 .

Status: Fixed (was: Started)
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 22 2016

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Approved -Merge-Approved-53 merge-merged-2785 Merge-Merged
The patch has already landed on 2785.
Posting land message and change the merge-* tag

Fixing headset unplug issues in MediaNotification

This CL make MediaNotification fire a ACTION_STOP PendingIntent when the
notification is dismissed, making the MediaSession inactive.

Also, MediaNotification will not call play()/pause() when the
notification is already in that state, preventing calling pause() when
unpluging headset when the notification is already in paused state.

An unplug-related UMA issue is also fixed in this CL.

BUG= 638858 

Review-Url: https://codereview.chromium.org/2253293004
Cr-Commit-Position: refs/heads/master@{#412829}
(cherry picked from commit e03e8ee0fc359e38700001f04b7ec2e9a01f5f52)

Review URL: https://codereview.chromium.org/2260563002 .

Cr-Commit-Position: refs/branch-heads/2785@{#657}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

Sign in to add a comment