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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java

Issue 2260563002: Fixing headset unplug issues in MediaNotification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
index 3b6349be3d7d99e0e9dc7ba74ee7da038ca21e19..9125c0ef61a5609337bb036ad8b5ebe6f06ec6a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/media/ui/MediaNotificationManager.java
@@ -436,10 +436,12 @@ public class MediaNotificationManager {
}
private void onPlay(int actionSource) {
+ if (!mMediaNotificationInfo.isPaused) return;
mMediaNotificationInfo.listener.onPlay(actionSource);
}
private void onPause(int actionSource) {
+ if (mMediaNotificationInfo.isPaused) return;
mMediaNotificationInfo.listener.onPause(actionSource);
}
@@ -522,6 +524,7 @@ public class MediaNotificationManager {
if (mMediaNotificationInfo.supportsSwipeAway()) {
mNotificationBuilder.setOngoing(!mMediaNotificationInfo.isPaused);
+ mNotificationBuilder.setDeleteIntent(createPendingIntent(ListenerService.ACTION_STOP));
}
// The intent will currently only be null when using a custom tab.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698