Add since_visible_millis to Settings action logs.
This change adds a new action logging method on MetricsFeatureProvider within Settings. Uses the VisibilityLoggerMixin to calculate the elapsed time since the fragment has been visible. Adds tagged data in MetricsFeatureProvider#action() to store this elapsed time in NOTIFICATION_SINCE_VISIBLE_MILLIS in MetricsEvents. Modifies the LogWriter interface to accept variadic taggedData args in its action() methods. Annotates the old subtype #action() methods as deprecated. EventLogWriter also no longer casts the subtype values to strings before sending them to MetricsLogger, so they are correctly stored as subtype instead of package. Bug: 65371699, 65631695 Test: make RunSettingsRoboTests Change-Id: Iec6a61dd6a49ab237e2bdc4469fed45e89d9c380
This commit is contained in:
@@ -1070,7 +1070,7 @@ public class WifiSettings extends RestrictedSettingsFragment
|
||||
|
||||
protected void connect(final WifiConfiguration config, boolean isSavedNetwork) {
|
||||
// Log subtype if configuration is a saved network.
|
||||
mMetricsFeatureProvider.action(getActivity(), MetricsEvent.ACTION_WIFI_CONNECT,
|
||||
mMetricsFeatureProvider.action(getVisibilityLogger(), MetricsEvent.ACTION_WIFI_CONNECT,
|
||||
isSavedNetwork);
|
||||
mWifiManager.connect(config, mConnectListener);
|
||||
mClickedConnect = true;
|
||||
|
Reference in New Issue
Block a user