summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-03-26 13:34:02 -0400
committerChris Wren <cwren@android.com>2015-03-30 14:33:27 -0400
commitf22e8c4c2e81e499ea542c272c1cc1cfee94452e (patch)
tree7721f56cf163e0982396a88da40e6facb7ebf6f7 /src/com
parentec5a3373db706778d2bcde6700c270f33bf8f7f1 (diff)
downloadpackages_apps_Settings-f22e8c4c2e81e499ea542c272c1cc1cfee94452e.tar.gz
packages_apps_Settings-f22e8c4c2e81e499ea542c272c1cc1cfee94452e.tar.bz2
packages_apps_Settings-f22e8c4c2e81e499ea542c272c1cc1cfee94452e.zip
log wifi actions from settings
To start: enable disable forget connect add Depends-On: I60163e44602b8e23b643b9103c324fa0e0d2c4c4 Change-Id: I52f40298db63f410ced2dbf5ba05d3ad098a85a2
Diffstat (limited to 'src/com')
-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);