Bug 903535 - Don't build UI for wifi/cell tower data collection and reporting on Release builds. r=gbrown, a=akeybl
authorChenxia Liu <liuche@mozilla.com>
Thu, 05 Sep 2013 11:16:23 -0400
changeset 149267 f7b964eedcc8edb04b78f0dd48e619d7472aa117
parent 149266 d771488dca975ef6eb3d251fb84660dc601d3287
child 149268 ed9260da09cb6334f13e72a7311c6aa033150d91
push id4215
push userryanvm@gmail.com
push dateThu, 05 Sep 2013 15:16:31 +0000
treeherdermozilla-aurora@5da9972833a6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown, akeybl
bugs903535
milestone25.0a2
Bug 903535 - Don't build UI for wifi/cell tower data collection and reporting on Release builds. r=gbrown, a=akeybl
mobile/android/base/GeckoPreferences.java
mobile/android/base/tests/testSettingsMenuItems.java.in
mobile/android/confvars.sh
--- a/mobile/android/base/GeckoPreferences.java
+++ b/mobile/android/base/GeckoPreferences.java
@@ -302,16 +302,23 @@ public class GeckoPreferences
                     preferences.removePreference(pref);
                     i--;
                     continue;
                 } else if (!AppConstants.MOZ_CRASHREPORTER &&
                            PREFS_CRASHREPORTER_ENABLED.equals(key)) {
                     preferences.removePreference(pref);
                     i--;
                     continue;
+                } else if (PREFS_GEO_REPORTING.equals(key) &&
+                           ("release".equals(AppConstants.MOZ_UPDATE_CHANNEL) ||
+                            "beta".equals(AppConstants.MOZ_UPDATE_CHANNEL))) {
+                    // We don't build wifi/cell tower collection in release builds, so hide the UI.
+                    preferences.removePreference(pref);
+                    i--;
+                    continue;
                 } else if (PREFS_DEVTOOLS_REMOTE_ENABLED.equals(key)) {
                     final Context thisContext = this;
                     pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
                         @Override
                         public boolean onPreferenceClick(Preference preference) {
                             // Display toast to remind setting up tcp forwarding.
                             if (((CheckBoxPreference) preference).isChecked()) {
                                 Toast.makeText(thisContext, R.string.devtools_remote_debugging_forward, Toast.LENGTH_SHORT).show();
--- a/mobile/android/base/tests/testSettingsMenuItems.java.in
+++ b/mobile/android/base/tests/testSettingsMenuItems.java.in
@@ -51,17 +51,19 @@ public class testSettingsMenuItems exten
     String[][] OPTIONS_MOZILLA = {
         { "About " + BRAND_NAME },
         { "FAQs" },
         { "Give feedback" },
         { "Show product announcements" },
         { "Data choices" },
         { "Telemetry", "Shares performance, usage, hardware and customization data about your browser with Mozilla to help us make " + BRAND_NAME + " better" },
         { "Crash Reporter", BRAND_NAME + " submits crash reports to help Mozilla make your browser more stable and secure" },
+#ifndef RELEASE_BUILD
         { "Mozilla location services", "Help improve geolocation services for the Open Web by letting " + BRAND_NAME + " collect and send anonymous cellular tower data" },
+#endif
         { BRAND_NAME + " Health Report", "Shares data with Mozilla about your browser health and helps you understand your browser performance" },
         { "View my Health Report" },
     };
 
     @Override
     protected int getTestType() {
         return TEST_MOCHITEST;
     }
--- a/mobile/android/confvars.sh
+++ b/mobile/android/confvars.sh
@@ -58,13 +58,15 @@ MOZ_ENABLE_SZIP=1
 MOZ_FOLD_LIBS=1
 
 # Enable navigator.mozPay
 MOZ_PAY=1
 
 # Enable UI for healthreporter
 MOZ_SERVICES_HEALTHREPORT=1
 
-# Wifi-AP/cell tower data reporting is always enabled.
+# Wifi-AP/cell tower data reporting is enabled on non-release builds.
+if test ! "$RELEASE_BUILD"; then
 MOZ_DATA_REPORTING=1
+fi
 
 # Enable the production cert for verifying signed packaged apps.
 MOZ_B2G_CERTDATA=1