summaryrefslogtreecommitdiffstats
path: root/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
diff options
context:
space:
mode:
authorcretin45 <cretin45@gmail.com>2015-03-04 13:06:26 -0800
committercretin45 <cretin45@gmail.com>2015-03-04 13:08:00 -0800
commitef4cd78d5f5ca98cb2fdaa9e86d564bacb7f5f45 (patch)
treefe4c0d9d9c958856d789f7d6740274d8516ac4d3 /src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
parentc9c13f20c9a86ad23381bef95a100189e0d08bca (diff)
downloadpackages_apps_SetupWizard-ef4cd78d5f5ca98cb2fdaa9e86d564bacb7f5f45.zip
packages_apps_SetupWizard-ef4cd78d5f5ca98cb2fdaa9e86d564bacb7f5f45.tar.gz
packages_apps_SetupWizard-ef4cd78d5f5ca98cb2fdaa9e86d564bacb7f5f45.tar.bz2
SetupWizard: Add metrics for internal builds that ship with CMStats
Change-Id: Id932a105c18332e32605530d1502ff99b7cf380a
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java')
-rw-r--r--src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
index 2dc2c94..2559298 100644
--- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
@@ -29,6 +29,7 @@ import android.util.Log;
import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp;
+import com.cyanogenmod.setupwizard.cmstats.SetupStats;
import com.cyanogenmod.setupwizard.ui.LoadingFragment;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -75,6 +76,9 @@ public class WifiSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in,
android.R.anim.fade_out);
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
+ SetupStats.Label.PAGE, SetupStats.Label.CAPTIVE_PORTAL_LOGIN);
mLoadingFragment.startActivityForResult(intent,
SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL,
options.toBundle());
@@ -141,16 +145,31 @@ public class WifiSetupPage extends SetupPage {
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) {
if (resultCode == Activity.RESULT_CANCELED) {
- getCallbacks().onPreviousPage();
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_RESULT,
+ SetupStats.Label.WIFI_SETUP, "canceled");
+ getCallbacks().onPreviousPage();
} else if (resultCode == Activity.RESULT_OK) {
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_RESULT,
+ SetupStats.Label.WIFI_SETUP, "success");
checkForCaptivePortal();
} else {
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_RESULT,
+ SetupStats.Label.WIFI_SETUP, "skipped");
getCallbacks().onNextPage();
}
} else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) {
if (resultCode == Activity.RESULT_CANCELED) {
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_RESULT,
+ SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "canceled");
launchWifiSetup();
} else {
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_RESULT,
+ SetupStats.Label.CAPTIVE_PORTAL_LOGIN, "success");
getCallbacks().onNextPage();
}
} else {
@@ -210,6 +229,9 @@ public class WifiSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in,
android.R.anim.fade_out);
+ SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
+ SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
+ SetupStats.Label.PAGE, SetupStats.Label.WIFI_SETUP);
mLoadingFragment.startActivityForResult(intent,
SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle());
}