Backed out 5 changesets (bug 1068388) for robocop failures.

Backed out changeset 099d0ec27cd9 (bug 1068388)
Backed out changeset 29d39909222d (bug 1068388)
Backed out changeset e85caca8529f (bug 1068388)
Backed out changeset cf6f1223b6b7 (bug 1068388)
Backed out changeset 920b201d30e9 (bug 1068388)

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-09-17 21:47:20 -04:00
parent e56e4a18c5
commit 768b67701b
5 changed files with 42 additions and 23 deletions

View File

@ -402,6 +402,7 @@ pref("privacy.item.syncAccount", true);
// enable geo
pref("geo.enabled", true);
pref("app.geo.reportdata", 0);
// content sink control -- controls responsiveness during page load
// see https://bugzilla.mozilla.org/show_bug.cgi?id=481566#c9

View File

@ -1563,6 +1563,12 @@ public abstract class GeckoApp
}
});
PrefsHelper.getPref("app.geo.reportdata", new PrefsHelper.PrefHandlerBase() {
@Override public void prefValue(String pref, int value) {
// Acting on this pref is Bug 1036508; for now, do nothing.
}
});
// Trigger the completion of the telemetry timer that wraps activity startup,
// then grab the duration to give to FHR.
mJavaUiStartupTimer.stop();

View File

@ -110,15 +110,14 @@ OnSharedPreferenceChangeListener
private static final String PREFS_MENU_CHAR_ENCODING = "browser.menu.showCharacterEncoding";
private static final String PREFS_MP_ENABLED = "privacy.masterpassword.enabled";
private static final String PREFS_UPDATER_AUTODOWNLOAD = "app.update.autodownload";
private static final String PREFS_GEO_REPORTING = NON_PREF_PREFIX + "app.geo.reportdata";
private static final String PREFS_GEO_REPORTING = "app.geo.reportdata";
private static final String PREFS_GEO_LEARN_MORE = NON_PREF_PREFIX + "geo.learn_more";
private static final String PREFS_HEALTHREPORT_LINK = NON_PREF_PREFIX + "healthreport.link";
private static final String PREFS_DEVTOOLS_REMOTE_ENABLED = "devtools.debugger.remote-enabled";
private static final String PREFS_DISPLAY_REFLOW_ON_ZOOM = "browser.zoom.reflowOnZoom";
private static final String PREFS_DISPLAY_TITLEBAR_MODE = "browser.chrome.titlebarMode";
private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
private static final String PREFS_STUMBLER_ENABLED = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
// This isn't a Gecko pref, even if it looks like one.
private static final String PREFS_BROWSER_LOCALE = "locale";
@ -684,9 +683,10 @@ OnSharedPreferenceChangeListener
preferences.removePreference(pref);
i--;
continue;
} else if (!AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED &&
(PREFS_GEO_REPORTING.equals(key) ||
PREFS_GEO_LEARN_MORE.equals(key))) {
} else if (AppConstants.RELEASE_BUILD &&
(PREFS_GEO_REPORTING.equals(key) ||
PREFS_GEO_LEARN_MORE.equals(key))) {
// We don't build wifi/cell tower collection in release builds, so hide the UI.
preferences.removePreference(pref);
i--;
continue;
@ -869,10 +869,10 @@ OnSharedPreferenceChangeListener
/**
* Broadcast the provided value as the value of the
* <code>PREFS_GEO_REPORTING</code> pref.
* <code>PREFS_STUMBLER_ENABLED</code> pref.
*/
public static void broadcastStumblerPref(final Context context, final boolean value) {
Intent intent = new Intent(ACTION_STUMBLER_UPLOAD_PREF)
Intent intent = new Intent(PREFS_STUMBLER_ENABLED)
.putExtra("pref", PREFS_GEO_REPORTING)
.putExtra("branch", GeckoSharedPrefs.APP_PREFS_NAME)
.putExtra("enabled", value)
@ -888,7 +888,7 @@ OnSharedPreferenceChangeListener
/**
* Broadcast the current value of the
* <code>PREFS_GEO_REPORTING</code> pref.
* <code>PREFS_STUMBLER_ENABLED</code> pref.
*/
public static void broadcastStumblerPref(final Context context) {
final boolean value = getBooleanPref(context, PREFS_GEO_REPORTING, false);
@ -1046,11 +1046,6 @@ OnSharedPreferenceChangeListener
return onLocaleSelected(BrowserLocaleManager.getLanguageTag(lastLocale), (String) newValue);
}
if (PREFS_GEO_REPORTING.equals(prefName)) {
broadcastStumblerPref(this, ((Boolean) newValue).booleanValue());
return true;
}
if (PREFS_MENU_CHAR_ENCODING.equals(prefName)) {
setCharEncodingState(((String) newValue).equals("true"));
} else if (PREFS_UPDATER_AUTODOWNLOAD.equals(prefName)) {
@ -1061,12 +1056,16 @@ OnSharedPreferenceChangeListener
// background uploader service, which will start or stop the
// repeated background upload attempts.
broadcastHealthReportUploadPref(this, ((Boolean) newValue).booleanValue());
} else if (PREFS_GEO_REPORTING.equals(prefName)) {
broadcastStumblerPref(this, ((Boolean) newValue).booleanValue());
// Translate boolean value to int for geo reporting pref.
newValue = ((Boolean) newValue) ? 1 : 0;
} else if (handlers.containsKey(prefName)) {
PrefHandler handler = handlers.get(prefName);
handler.onChange(this, preference, newValue);
}
// Send Gecko-side pref changes to Gecko.
// Send Gecko-side pref changes to Gecko
if (isGeckoPref(prefName)) {
PrefsHelper.setPref(prefName, newValue);
}
@ -1322,7 +1321,22 @@ OnSharedPreferenceChangeListener
@Override
public void prefValue(String prefName, final int value) {
final Preference pref = getField(prefName);
Log.w(LOGTAG, "Unhandled int value for pref [" + pref + "]");
final CheckBoxPrefSetter prefSetter;
if (PREFS_GEO_REPORTING.equals(prefName)) {
if (Versions.preICS) {
prefSetter = new CheckBoxPrefSetter();
} else {
prefSetter = new TwoStatePrefSetter();
}
ThreadUtils.postToUiThread(new Runnable() {
@Override
public void run() {
prefSetter.setBooleanPref(pref, value == 1);
}
});
} else {
Log.w(LOGTAG, "Unhandled int value for pref [" + pref + "]");
}
}
@Override

View File

@ -35,7 +35,7 @@
android:summary="@string/datareporting_crashreporter_summary"
android:defaultValue="false" />
<CheckBoxPreference android:key="android.not_a_preference.app.geo.reportdata"
<CheckBoxPreference android:key="app.geo.reportdata"
android:title="@string/datareporting_wifi_title"
android:summary="@string/datareporting_wifi_geolocation_summary" />

View File

@ -170,14 +170,12 @@ public class testSettingsMenuItems extends PixelTest {
settingsMap.get(PATH_DISPLAY).remove(TITLE_BAR_LABEL_ARR);
}
String[] learnMoreUi = { "Learn more" };
settingsMap.get(PATH_MOZILLA).add(learnMoreUi);
}
// Anonymous cell tower/wifi collection.
if (AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED) {
// Anonymous cell tower/wifi collection - only built if *not* release build
String[] networkReportingUi = { "Mozilla Location Service", "Receives Wi-Fi and cellular location data when running in the background and shares it with Mozilla to improve our geolocation service" };
settingsMap.get(PATH_MOZILLA).add(networkReportingUi);
String[] learnMoreUi = { "Learn more" };
settingsMap.get(PATH_MOZILLA).add(learnMoreUi);
}
// Automatic updates