Bug 1431329 - If the tab in which the media player is running is in private browsing mode then we shall not display media playback notification. r=mcomella
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Thu, 12 Apr 2018 14:39:56 +0300
changeset 413064 6ea3c1db006049ff57f392c7042db0a91ec9b10b
parent 413063 1ec8c31cacc4cf41b7fb4852e37a6af1b12ef4d7
child 413065 165ff300ac9589a505104f4507cd91ae78bf6e7e
push id33833
push useraiakab@mozilla.com
push dateFri, 13 Apr 2018 09:41:15 +0000
treeherdermozilla-central@260e4c83c8a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella
bugs1431329
milestone61.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 1431329 - If the tab in which the media player is running is in private browsing mode then we shall not display media playback notification. r=mcomella MozReview-Commit-ID: EROHEubnP3r
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
@@ -343,17 +343,17 @@ public class MediaControlService extends
         }
 
         if (!mIsMediaControlPrefOn) {
             return;
         }
 
         final Tab tab = AudioFocusAgent.getInstance().getActiveMediaTab();
 
-        if (tab == null) {
+        if (tab == null || tab.isPrivate()) {
             return;
         }
 
         ThreadUtils.postToBackgroundThread(new Runnable() {
             @Override
             public void run() {
                 updateNotification(tab);
             }