If the current tab is in private browsing mode, then we shall not display the media playback notifications. draft
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Thu, 12 Apr 2018 14:20:27 +0300
changeset 780992 187c7b6d491b385f53576dca77d5f55df2719f49
parent 776477 d75d996016dcf325c2db2ed8a47af512d07ffacd
push id106185
push userbmo:andrei.a.lazar@softvision.ro
push dateThu, 12 Apr 2018 11:21:36 +0000
milestone61.0a1
If the current tab is in private browsing mode, then we shall not display the media playback notifications. MozReview-Commit-ID: J3gWGnmrle4
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);
             }