Bug 1290510 - add nightly flag for media control. r=sebastian, a=gchang
authorAlastor Wu <alwu@mozilla.com>
Mon, 01 Aug 2016 18:27:42 +0800
changeset 349633 d519ced01b56e29e91cdfa82f334bb5ddd83119d
parent 349632 495b385af8f0c82ef72089b8e30042f46630f197
child 349634 7ecbc0f93ff4b7954185ced028a34f7aaa44992d
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian, gchang
bugs1290510
milestone50.0a2
Bug 1290510 - add nightly flag for media control. r=sebastian, a=gchang MozReview-Commit-ID: EWEpERiy4WQ
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
@@ -12,16 +12,17 @@ import android.graphics.Rect;
 import android.media.session.MediaController;
 import android.media.session.MediaSession;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.IBinder;
 import android.support.v4.app.NotificationManagerCompat;
 import android.util.Log;
 
+import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.BrowserApp;
 import org.mozilla.gecko.GeckoAppShell;
 import org.mozilla.gecko.PrefsHelper;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.util.ThreadUtils;
 
@@ -252,16 +253,22 @@ public class MediaControlService extends
             NotificationManagerCompat.from(this).cancel(MEDIA_CONTROL_ID);
             return;
         }
 
         if (!mIsMediaControlPrefOn) {
             return;
         }
 
+        // TODO : remove this checking when the media control is ready to ship,
+        // see bug1290836.
+        if (!AppConstants.NIGHTLY_BUILD) {
+            return;
+        }
+
         final Tab tab = mTabReference.get();
 
         if (tab == null) {
             return;
         }
 
         ThreadUtils.postToBackgroundThread(new Runnable() {
             @Override