зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1019158
- Don't send null methods into UITelemetry. r=rnewman
This commit is contained in:
Родитель
caeeab8a56
Коммит
3f1ad62347
|
@ -154,8 +154,15 @@ public class Telemetry {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param method A non-null method (if null is desired, consider using Method.NONE)
|
||||
*/
|
||||
private static void sendUIEvent(final String eventName, final Method method,
|
||||
final long timestamp, final String extras) {
|
||||
if (method == null) {
|
||||
throw new IllegalArgumentException("Expected non-null method - use Method.NONE?");
|
||||
}
|
||||
|
||||
Log.d(LOGTAG, "SendUIEvent: event = " + eventName + " method = " + method +
|
||||
" timestamp = " + timestamp + " extras = " + extras);
|
||||
final GeckoEvent geckoEvent = GeckoEvent.createTelemetryUIEvent(
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.mozilla.gecko.PrefsHelper;
|
|||
import org.mozilla.gecko.R;
|
||||
import org.mozilla.gecko.Telemetry;
|
||||
import org.mozilla.gecko.TelemetryContract;
|
||||
import org.mozilla.gecko.TelemetryContract.Method;
|
||||
import org.mozilla.gecko.background.announcements.AnnouncementsConstants;
|
||||
import org.mozilla.gecko.background.common.GlobalConstants;
|
||||
import org.mozilla.gecko.background.healthreport.HealthReportConstants;
|
||||
|
@ -854,9 +855,9 @@ OnSharedPreferenceChangeListener
|
|||
if (null == localeManager.setSelectedLocale(context, newValue)) {
|
||||
localeManager.updateConfiguration(context, Locale.getDefault());
|
||||
}
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_UNSELECTED, null,
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_UNSELECTED, Method.NONE,
|
||||
currentLocale == null ? "unknown" : currentLocale);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_SELECTED, null, newValue);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.LOCALE_BROWSER_SELECTED, Method.NONE, newValue);
|
||||
}
|
||||
|
||||
ThreadUtils.postToUiThread(new Runnable() {
|
||||
|
|
|
@ -6,6 +6,7 @@ package org.mozilla.gecko.preferences;
|
|||
|
||||
import org.mozilla.gecko.Telemetry;
|
||||
import org.mozilla.gecko.TelemetryContract;
|
||||
import org.mozilla.gecko.TelemetryContract.Method;
|
||||
import org.mozilla.gecko.home.HomeConfig;
|
||||
import org.mozilla.gecko.home.HomeConfig.PanelConfig;
|
||||
import org.mozilla.gecko.home.HomeConfig.State;
|
||||
|
@ -162,7 +163,7 @@ public class PanelsPreferenceCategory extends CustomListCategory {
|
|||
mConfigEditor.setDefault(id);
|
||||
mConfigEditor.apply();
|
||||
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.PANEL_SET_DEFAULT, null, id);
|
||||
Telemetry.sendUIEvent(TelemetryContract.Event.PANEL_SET_DEFAULT, Method.NONE, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Загрузка…
Ссылка в новой задаче