Bug 1196897 - Add flags to control using Switchboard in Fennec r=nalexander
authorMark Finkle <mfinkle@mozilla.com>
Thu, 27 Aug 2015 13:49:48 -0400
changeset 294026 0cb4a5fbd6b7fe473494f6a3b21d4fa66b49568b
parent 294025 ff5c42e6a1a24276e871631ce8c7b2f729785890
child 294027 dd8158e7fd320bfc3b973269f0152e629f2f6f46
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1196897
milestone43.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 1196897 - Add flags to control using Switchboard in Fennec r=nalexander
configure.in
mobile/android/base/AppConstants.java.in
mobile/android/confvars.sh
toolkit/modules/AppConstants.jsm
--- a/configure.in
+++ b/configure.in
@@ -3776,16 +3776,17 @@ MOZ_WEBSMS_BACKEND=
 MOZ_ANDROID_BEAM=
 MOZ_LOCALE_SWITCHER=
 MOZ_ANDROID_READING_LIST_SERVICE=
 MOZ_ANDROID_SEARCH_ACTIVITY=
 MOZ_ANDROID_DOWNLOADS_INTEGRATION=
 MOZ_ANDROID_MLS_STUMBLER=
 MOZ_ANDROID_SHARE_OVERLAY=
 MOZ_INSTALL_TRACKING=
+MOZ_SWITCHBOARD=
 ACCESSIBILITY=1
 MOZ_TIME_MANAGER=
 MOZ_SIMPLEPUSH=
 MOZ_PAY=
 MOZ_AUDIO_CHANNEL_MANAGER=
 MOZ_CONTENT_SANDBOX=
 MOZ_GMP_SANDBOX=
 MOZ_SANDBOX=1
@@ -4873,16 +4874,23 @@ fi
 dnl ========================================================
 dnl = Include install tracking on Android
 dnl ========================================================
 if test -n "$MOZ_INSTALL_TRACKING"; then
     AC_DEFINE(MOZ_INSTALL_TRACKING)
 fi
 
 dnl ========================================================
+dnl = Include Switchboard A/B framework on Android
+dnl ========================================================
+if test -n "$MOZ_SWITCHBOARD"; then
+    AC_DEFINE(MOZ_SWITCHBOARD)
+fi
+
+dnl ========================================================
 dnl = Enable IPDL's "expensive" unit tests
 dnl ========================================================
 MOZ_IPDL_TESTS=
 
 MOZ_ARG_ENABLE_BOOL(ipdl-tests,
 [  --enable-ipdl-tests     Enable expensive IPDL tests],
     MOZ_IPDL_TESTS=1,
     MOZ_IPDL_TESTS=)
@@ -8577,16 +8585,17 @@ AC_SUBST(MOZ_ANDROID_SHARE_OVERLAY)
 AC_SUBST(MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES)
 AC_SUBST(MOZ_ANDROID_TAB_QUEUE)
 AC_SUBST(MOZ_ANDROID_MLS_STUMBLER)
 AC_SUBST(MOZ_ANDROID_DOWNLOADS_INTEGRATION)
 AC_SUBST(MOZ_ANDROID_APPLICATION_CLASS)
 AC_SUBST(MOZ_ANDROID_BROWSER_INTENT_CLASS)
 AC_SUBST(MOZ_ANDROID_SEARCH_INTENT_CLASS)
 AC_SUBST(MOZ_INSTALL_TRACKING)
+AC_SUBST(MOZ_SWITCHBOARD)
 AC_SUBST(ENABLE_STRIP)
 AC_SUBST(PKG_SKIP_STRIP)
 AC_SUBST(STRIP_FLAGS)
 AC_SUBST(USE_ELF_HACK)
 AC_SUBST(INCREMENTAL_LINKER)
 AC_SUBST(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
 AC_SUBST(MOZ_COMPONENT_NSPR_LIBS)
 
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -319,15 +319,22 @@ public class AppConstants {
 
     public static final boolean MOZ_INSTALL_TRACKING =
 //#ifdef MOZ_INSTALL_TRACKING
     true;
 //#else
     false;
 //#endif
 
+    public static final boolean MOZ_SWITCHBOARD =
+//#ifdef MOZ_SWITCHBOARD
+    true;
+//#else
+    false;
+//#endif
+
     public static final boolean MOZ_ANDROID_NATIVE_ACCOUNT_UI =
 //#ifdef MOZ_ANDROID_NATIVE_ACCOUNT_UI
     true;
 //#else
     false;
 //#endif
 }
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -105,8 +105,15 @@ MOZ_ANDROID_TAB_QUEUE=1
 # Use the low-memory GC tuning.
 export JS_GC_SMALL_CHUNK_SIZE=1
 
 # Enable Firefox Account avatars.
 MOZ_ANDROID_FIREFOX_ACCOUNT_PROFILES=1
 
 # Enable checking that add-ons are signed by the trusted root
 MOZ_ADDON_SIGNING=1
+
+# Enable the Switchboard A/B framework code.
+# Note: The framework is always included in the app. This flag controls
+# usage of the framework.
+if test "$NIGHTLY_BUILD"; then
+  MOZ_SWITCHBOARD=1
+fi
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -96,16 +96,23 @@ this.AppConstants = Object.freeze({
 
   MOZ_UPDATER:
 #ifdef MOZ_UPDATER
   true,
 #else
   false,
 #endif
 
+  MOZ_SWITCHBOARD:
+#ifdef MOZ_SWITCHBOARD
+  true,
+#else
+  false,
+#endif
+
   MOZ_WEBRTC:
 #ifdef MOZ_WEBRTC
   true,
 #else
   false,
 #endif
 
 # MOZ_B2G covers both device and desktop b2g