Add subtypes to tron logging for Wifi toggles.
For ACTION_WIFI_CONNECT, added subtype to specify whether user is connecting to saved network. For ACTION_WIFI_OFF, added subtype to specify whether user was connected to a network at the time. Bug: 32371451 Change-Id: I1d4445bda2fbeb062831e6f858ccc711bff65105 Fixes: 32371451 Test: Verify logs by running: adb logcat -b events | egrep '(sysui_|notification_)'
This commit is contained in:
@@ -231,8 +231,13 @@ public class WifiEnabler implements SwitchBar.OnSwitchChangeListener {
|
||||
if (mayDisableTethering(isChecked)) {
|
||||
mWifiManager.setWifiApEnabled(null, false);
|
||||
}
|
||||
mMetricsFeatureProvider.action(mContext,
|
||||
isChecked ? MetricsEvent.ACTION_WIFI_ON : MetricsEvent.ACTION_WIFI_OFF);
|
||||
if (isChecked) {
|
||||
mMetricsFeatureProvider.action(mContext, MetricsEvent.ACTION_WIFI_ON);
|
||||
} else {
|
||||
// Log if user was connected at the time of switching off.
|
||||
mMetricsFeatureProvider.action(mContext, MetricsEvent.ACTION_WIFI_OFF,
|
||||
mConnected.get());
|
||||
}
|
||||
if (!mWifiManager.setWifiEnabled(isChecked)) {
|
||||
// Error
|
||||
mSwitchBar.setEnabled(true);
|
||||
|
Reference in New Issue
Block a user