summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/cmstats
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-04-01 18:09:14 -0700
committerKoushik Dutta <koushd@gmail.com>2013-04-01 18:09:23 -0700
commit84e35b60634ce02d5dabc6ae135500197c3be871 (patch)
tree0d701523ff1b030e0018ea46b309daea261772b1 /src/com/android/settings/cmstats
parentd47add2ac591cd6ac679daf00c02ff961c6ac630 (diff)
downloadpackages_apps_settings-84e35b60634ce02d5dabc6ae135500197c3be871.zip
packages_apps_settings-84e35b60634ce02d5dabc6ae135500197c3be871.tar.gz
packages_apps_settings-84e35b60634ce02d5dabc6ae135500197c3be871.tar.bz2
FIx up analytics results by normalizing the version by stripping the device info, which is redundant.
Change-Id: If4fc97c28fff6a82206a5491c256b05444da1a34
Diffstat (limited to 'src/com/android/settings/cmstats')
-rw-r--r--src/com/android/settings/cmstats/ReportingService.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/settings/cmstats/ReportingService.java b/src/com/android/settings/cmstats/ReportingService.java
index fa23b19..465eaa1 100644
--- a/src/com/android/settings/cmstats/ReportingService.java
+++ b/src/com/android/settings/cmstats/ReportingService.java
@@ -80,6 +80,19 @@ public class ReportingService extends Service {
GoogleAnalytics ga = GoogleAnalytics.getInstance(this);
Tracker tracker = ga.getTracker(getString(R.string.ga_trackingId));
tracker.sendEvent(deviceName, deviceVersion, deviceCountry, null);
+ // this really should be set at build time...
+ // format of version should be:
+ // version[-date-type]-device
+ String[] parts = deviceVersion.split("-");
+ String deviceVersionNoDevice = null;
+ if (parts.length == 2) {
+ deviceVersionNoDevice = parts[0];
+ }
+ else if (parts.length == 4) {
+ deviceVersionNoDevice = parts[0] + "-" + parts[2];
+ }
+ if (deviceVersionNoDevice != null)
+ tracker.sendEvent("checkin", deviceName, deviceVersionNoDevice, null);
tracker.close();
// report to the cmstats service