From f6e5a681fedde43699956374f8fd0a33657b7926 Mon Sep 17 00:00:00 2001 From: Chenxia Liu Date: Tue, 24 Sep 2013 15:02:41 -0700 Subject: [PATCH] Bug 919384 - "Text reflow" robocop test checks for the wrong RELEASE_BUILD boolean value. r=gbrown --- .../base/tests/testSettingsMenuItems.java.in | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/mobile/android/base/tests/testSettingsMenuItems.java.in b/mobile/android/base/tests/testSettingsMenuItems.java.in index 4df7d75cc61c..5e6105049257 100644 --- a/mobile/android/base/tests/testSettingsMenuItems.java.in +++ b/mobile/android/base/tests/testSettingsMenuItems.java.in @@ -143,12 +143,18 @@ public class testSettingsMenuItems extends PixelTest { ClassLoader classLoader = getActivity().getClassLoader(); Class appConstants = classLoader.loadClass("org.mozilla.gecko.AppConstants"); - // Text reflow - Field textReflowField = appConstants.getField("RELEASE_BUILD"); - boolean textReflow = textReflowField.getBoolean(appConstants); - if (textReflow) { + // Preferences dependent on RELEASE_BUILD + Field releaseBuildField = appConstants.getField("RELEASE_BUILD"); + boolean releaseBuild = releaseBuildField.getBoolean(appConstants); + if (!releaseBuild) { + // Text reflow - only built if *not* release build String[] textReflowUi = { "Text reflow" }; settingsMap.get("Display").add(textReflowUi); + + // Anonymous cell tower/wifi collection - only built if *not* release build + 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); + } // Automatic updates @@ -167,14 +173,6 @@ 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);