Bug 909938 - Only display Settings UI for wifi/cell tower reporting on non-release builds. r=gbrown

This commit is contained in:
Chenxia Liu 2013-08-28 10:38:27 -07:00
parent 3198126b2d
commit 0028b02c9b
3 changed files with 16 additions and 2 deletions

View File

@ -316,6 +316,11 @@ public class GeckoPreferences
preferences.removePreference(pref);
i--;
continue;
} else if (AppConstants.RELEASE_BUILD && PREFS_GEO_REPORTING.equals(key)) {
// 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() {

View File

@ -62,7 +62,6 @@ public class testSettingsMenuItems extends PixelTest {
{ "Give feedback" },
{ "Show product announcements" },
{ "Data choices" },
{ "Mozilla location services", "Help improve geolocation services for the Open Web by letting " + BRAND_NAME + " collect and send anonymous cellular tower data" },
{ BRAND_NAME + " Health Report", "Shares data with Mozilla about your browser health and helps you understand your browser performance" },
{ "View my Health Report" },
};
@ -168,6 +167,14 @@ public class testSettingsMenuItems extends PixelTest {
settingsMap.get("Mozilla").add(crashReporterUi);
}
// Anonymous cell tower/wifi collection; built if *not* a RELEASE_BUILD
Field releaseBuildField = appConstants.getField("RELEASE_BUILD");
boolean releaseBuild = releaseBuildField.getBoolean(appConstants);
if (!releaseBuild) {
String[] networkReportingUi = { "Mozilla location services", "Help improve geolocation services for the Open Web by letting " + BRAND_NAME + " collect and send anonymous cellular tower data" };
settingsMap.get("Mozilla").add(networkReportingUi);
}
// Telemetry
Field telemetryField = appConstants.getField("MOZ_TELEMETRY_REPORTING");
boolean telemetry = telemetryField.getBoolean(appConstants);

View File

@ -60,8 +60,10 @@ 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