Bug 763991 - Disable Telemetry UI for builds without MOZ_TELEMETRY_REPORTING; r=mfinkle
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 13 Jun 2012 08:27:11 -0700
changeset 101397 112ab5ba3ac43a6a6a0683039169c629bf1ccbc9
parent 101396 2a0ae73dafcfbc48649fd4557616e69732c73107
child 101398 7b447b08eb73ae04ac3bb82d08d31ce497f77a0c
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs763991
milestone16.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 763991 - Disable Telemetry UI for builds without MOZ_TELEMETRY_REPORTING; r=mfinkle
mobile/android/base/Makefile.in
mobile/android/base/resources/xml/preferences.xml
mobile/android/base/resources/xml/preferences.xml.in
mobile/android/chrome/content/browser.js
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -146,16 +146,17 @@ FENNEC_PP_JAVA_FILES = \
   db/FormHistoryProvider.java \
   db/TabsProvider.java \
   db/GeckoProvider.java \
   SmsManager.java \
   $(NULL)
 
 FENNEC_PP_XML_FILES = \
   res/layout/abouthome_content.xml \
+  res/xml/preferences.xml \
   res/menu/gecko_menu.xml \
   res/menu-v11/gecko_menu.xml \
   res/menu-v11/titlebar_contextmenu.xml \
   res/menu-xlarge/gecko_menu.xml \
   res/menu-sw600dp/gecko_menu.xml \
   $(NULL)
 
 
@@ -326,17 +327,16 @@ RES_VALUES_LAND_V14 = \
   res/values-land-v14/dimens.xml \
   $(NULL)
 
 RES_VALUES_SW600DP_V14 = \
   res/values-sw600dp-v14/dimens.xml \
   $(NULL)
 
 RES_XML = \
-	res/xml/preferences.xml \
 	$(SYNC_RES_XML) \
 	$(NULL)
 
 RES_ANIM = \
   res/anim/grow_fade_in.xml \
   res/anim/shrink_fade_out.xml \
   $(NULL)
 
rename from mobile/android/base/resources/xml/preferences.xml
rename to mobile/android/base/resources/xml/preferences.xml.in
--- a/mobile/android/base/resources/xml/preferences.xml
+++ b/mobile/android/base/resources/xml/preferences.xml.in
@@ -61,19 +61,21 @@
                             android:title="@string/pref_remember_signons"
                             android:defaultValue="true"
                             android:persistent="false" />
 
         <CheckBoxPreference android:key="network.cookie.cookieBehavior"
                             android:title="@string/pref_cookies"
                             android:persistent="false" />
 
+#ifdef MOZ_TELEMETRY_REPORTING
         <CheckBoxPreference android:key="toolkit.telemetry.enabled"
                             android:title="@string/pref_telemetry"
                             android:persistent="false" />
+#endif
 
         <CheckBoxPreference android:key="privacy.masterpassword.enabled"
                             android:title="@string/pref_use_master_password"
                             android:defaultValue="false"
                             android:persistent="false" />
 
         <CheckBoxPreference android:key="browser.search.suggest.enabled"
                             android:title="@string/pref_search_suggestions"
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -202,17 +202,19 @@ var BrowserApp = {
     ClipboardHelper.init();
     PermissionsHelper.init();
     CharacterEncoding.init();
     SearchEngines.init();
     ActivityObserver.init();
     WebappsUI.init();
     RemoteDebugger.init();
     Reader.init();
+#ifdef MOZ_TELEMETRY_REPORTING
     Telemetry.init();
+#endif
 #ifdef ACCESSIBILITY
     AccessFu.attach(window);
 #endif
 
     // Init LoginManager
     Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
     // Init FormHistory
     Cc["@mozilla.org/satchel/form-history;1"].getService(Ci.nsIFormHistory2);
@@ -292,17 +294,19 @@ var BrowserApp = {
       // Start the restore
       ss.restoreLastSession(restoreToFront, restoreMode == 1);
     } else {
       loadParams.showProgress = (url != "about:home");
       loadParams.pinned = pinned;
       this.addTab(url, loadParams);
 
       // show telemetry door hanger if we aren't restoring a session
+#ifdef MOZ_TELEMETRY_REPORTING
       Telemetry.prompt();
+#endif
     }
 
     if (this.isAppUpdated())
       this.onAppUpdated();
 
     // notify java that gecko has loaded
     sendMessageToJava({
       gecko: {
@@ -348,17 +352,19 @@ var BrowserApp = {
     ViewportHandler.uninit();
     XPInstallObserver.uninit();
     ConsoleAPI.uninit();
     CharacterEncoding.uninit();
     SearchEngines.uninit();
     WebappsUI.uninit();
     RemoteDebugger.uninit();
     Reader.uninit();
+#ifdef MOZ_TELEMETRY_REPORTING
     Telemetry.uninit();
+#endif
   },
 
   // This function returns false during periods where the browser displayed document is
   // different from the browser content document, so user actions and some kinds of viewport
   // updates should be ignored. This period starts when we start loading a new page or
   // switch tabs, and ends when the new browser content document has been drawn and handed
   // off to the compositor.
   isBrowserContentDocumentDisplayed: function() {