Bug1276577 Using Switchboard.isInExperiment() draft
authorKrishna <k.krish@yahoo.com>
Tue, 31 May 2016 01:16:14 +0800
changeset 375172 64a78069922fd582e3e94d6609cf2430f24f02d5
parent 366346 c3f5e6079284a7b7053c41f05d0fe06ff031db03
child 522780 e1a76b15080ff552e7371ac1ea9813efb67d5ce4
push id20183
push userk.krish@yahoo.com
push dateFri, 03 Jun 2016 16:50:14 +0000
bugs1276577
milestone49.0a1
Bug1276577 Using Switchboard.isInExperiment() MozReview-Commit-ID: F4X1KbLXfqM
mobile/android/base/java/org/mozilla/gecko/dlc/SyncAction.java
--- a/mobile/android/base/java/org/mozilla/gecko/dlc/SyncAction.java
+++ b/mobile/android/base/java/org/mozilla/gecko/dlc/SyncAction.java
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko.dlc;
 
 import android.content.Context;
 import android.net.Uri;
 import android.util.Log;
 
+import com.keepsafe.switchboard.SwitchBoard;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.mozilla.gecko.dlc.catalog.DownloadContent;
 import org.mozilla.gecko.dlc.catalog.DownloadContentBuilder;
 import org.mozilla.gecko.dlc.catalog.DownloadContentCatalog;
 import org.mozilla.gecko.util.Experiments;
 import org.mozilla.gecko.util.IOUtils;
@@ -229,17 +230,17 @@ public class SyncAction extends BaseActi
 
         catalog.markAsDeleted(content);
 
         return true;
     }
 
     protected boolean isSyncEnabledForClient(Context context) {
         // Sync action is behind a switchboard flag for staged rollout.
-        return Experiments.isInExperimentLocal(context, Experiments.DOWNLOAD_CONTENT_CATALOG_SYNC);
+        return SwitchBoard.isInExperiment(context, Experiments.DOWNLOAD_CONTENT_CATALOG_SYNC);
     }
 
     private void logErrorResponse(HttpURLConnection connection) {
         try {
             JSONObject error = fetchJSONResponse(connection);
 
             Log.w(LOGTAG, "Server returned error response:");
             Log.w(LOGTAG, "- Code:    " + error.getInt("code"));