Bug 1313559 - Don't need to notify gecko if the media was resumed-from-page. r=sebastian
authorAlastor Wu <alwu@mozilla.com>
Fri, 28 Oct 2016 11:49:22 +0800
changeset 320397 9ea9837a49424e22433ca5504d0e8a4994448cb7
parent 320396 6abc545be46ed639a226a5d14b1808aabb2b413d
child 320398 c73b60315c75974bd457b3dd89173fc0cb79f144
push id33739
push useralwu@mozilla.com
push dateTue, 01 Nov 2016 03:23:05 +0000
treeherderautoland@9ea9837a4942 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1313559
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1313559 - Don't need to notify gecko if the media was resumed-from-page. r=sebastian MozReview-Commit-ID: Cemch546mcS
mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java
--- a/mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/MediaControlService.java
@@ -108,17 +108,17 @@ public class MediaControlService extends
                     notifyControlInterfaceChanged(ACTION_STOP);
                     mTabReference = new WeakReference<>(null);
                 }
                 break;
             case MEDIA_PLAYING_RESUME:
                 // user resume the paused-by-control media from page so that we
                 // should make the control interface consistent.
                 if (playingTab == tab && !isMediaPlaying()) {
-                    mController.getTransportControls().play();
+                    notifyControlInterfaceChanged(ACTION_PAUSE);
                 }
                 break;
             case CLOSED:
                 if (playingTab == null || playingTab == tab) {
                     // Remove the controls when the playing tab disappeared or was closed.
                     notifyControlInterfaceChanged(ACTION_STOP);
                 }
                 break;