summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/wifi/WifiEnabler.java4
-rw-r--r--src/com/android/settings/wifi/WifiSettings.java5
2 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/settings/wifi/WifiEnabler.java b/src/com/android/settings/wifi/WifiEnabler.java
index 754dbaa26..fe52cf241 100644
--- a/src/com/android/settings/wifi/WifiEnabler.java
+++ b/src/com/android/settings/wifi/WifiEnabler.java
@@ -30,6 +30,7 @@ import android.provider.Settings;
import android.widget.Switch;
import android.widget.Toast;
+import com.android.internal.logging.MetricsLogger;
import com.android.settings.R;
import com.android.settings.search.Index;
import com.android.settings.widget.SwitchBar;
@@ -209,7 +210,8 @@ public class WifiEnabler implements SwitchBar.OnSwitchChangeListener {
(wifiApState == WifiManager.WIFI_AP_STATE_ENABLED))) {
mWifiManager.setWifiApEnabled(null, false);
}
-
+ MetricsLogger.action(mContext,
+ isChecked ? MetricsLogger.ACTION_WIFI_ON : MetricsLogger.ACTION_WIFI_OFF);
if (!mWifiManager.setWifiEnabled(isChecked)) {
// Error
mSwitchBar.setEnabled(true);
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 0d0462295..238db6943 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -369,6 +369,7 @@ public class WifiSettings extends RestrictedSettingsFragment
showDialog(WPS_PIN_DIALOG_ID);
return true;
case MENU_ID_SCAN:
+ MetricsLogger.action(getActivity(), MetricsLogger.ACTION_WIFI_FORCE_SCAN);
mWifiTracker.forceScan();
return true;
case MENU_ID_ADD_NETWORK:
@@ -707,6 +708,7 @@ public class WifiSettings extends RestrictedSettingsFragment
}
/* package */ void forget() {
+ MetricsLogger.action(getActivity(), MetricsLogger.ACTION_WIFI_FORGET);
if (!mSelectedAccessPoint.isSaved()) {
if (mSelectedAccessPoint.getNetworkInfo().getState() != State.DISCONNECTED) {
// Network is active but has no network ID - must be ephemeral.
@@ -728,10 +730,12 @@ public class WifiSettings extends RestrictedSettingsFragment
}
protected void connect(final WifiConfiguration config) {
+ MetricsLogger.action(getActivity(), MetricsLogger.ACTION_WIFI_CONNECT);
mWifiManager.connect(config, mConnectListener);
}
protected void connect(final int networkId) {
+ MetricsLogger.action(getActivity(), MetricsLogger.ACTION_WIFI_CONNECT);
mWifiManager.connect(networkId, mConnectListener);
}
@@ -748,6 +752,7 @@ public class WifiSettings extends RestrictedSettingsFragment
* Called when "add network" button is pressed.
*/
/* package */ void onAddNetworkPressed() {
+ MetricsLogger.action(getActivity(), MetricsLogger.ACTION_WIFI_ADD_NETWORK);
// No exact access point is selected.
mSelectedAccessPoint = null;
showDialog(null, true);