Readd AOKPStats

Squashed commit that includes the following:

----------------------------------------------------

AOKPStats - anonymous user statistics. credit: CM

Patch set 4: rebased, modified regexp to match jellybean releases

ro.aokp.version should be aokp_device_jb-build-x or aokp_device_jb-milestone-y from now on

Signed-off-by: sethyx <sethyx@gmail.com>

Change-Id: I5fbee961dd9485c894f0b0eef83bbacf3979e2b8

----------------------------------------------------

Stats - amend regexp to match nightlies

Change-Id: Ib0ef700b4b7f7aaeda13a8df6e00127336d9e5a2
Signed-off-by: sethyx <sethyx@gmail.com>

----------------------------------------------------

Stats: report jb-nightly instead of reporting date

PS2: report english locale only, stay with date

Change-Id: Id82128aca865ba954f8c8856cbc318598f6554d5
Signed-off-by: sethyx <sethyx@gmail.com>

----------------------------------------------------

Settings: adjust stats regexp to match new unofficial version

Change-Id: I5680d41e4619dbbcd131a1933c13aba7bf24e27d
Signed-off-by: sethyx <sethyx@gmail.com>

----------------------------------------------------

report jb version

Change-Id: I071ebbce8198025efbb36901bbd1b9fe535a2c31
Signed-off-by: Gergely Szell <sethyx@gmail.com>

----------------------------------------------------

Stats: fix regex for jb-mr1 builds

Change-Id: Iff8175b4e229bbe0a7746a00f66d4484340e6064
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

----------------------------------------------------

Use a hashed MAC address instead of IMEI for stats collection.

PS2: always use hashed Wifi MAC address to avoid zombies when wiping

Change-Id: I7379c5b380273e35b5aab582f5268d6946e0a255

----------------------------------------------------

Adjust aokpstats

Change-Id: I7f40da5313b0754862aab40db06555d752a719d8
Signed-off-by: Gergely Szell (sethyx) <szell@hu.ibm.com>

----------------------------------------------------

AOKPStats: update regex to reflect recent changes

Change-Id: I039bbf64487861cf0e8a820f3a64b5947a40564b
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

----------------------------------------------------

Add Google Analytics support

PS2: add custom dimensions and override app-name & app-version
PS3: report unified version name (branch + milestone-X|nightly|unofficial)
PS4-6: further reporting changes
PS7: add back own stats reporting

Change-Id: Ieb69944ba0e67cbaddb0e94c1b87fc99510bdd36

----------------------------------------------------

Squashed Stats commits from CM

Remove the notification on boot. Users are thinking they need to opt out to get rid of the notification.
The setting to opt-out still exists in the Settings app.
If the user does not opt out within 'tFrame' time (1 day), the checkin service will now run; prior
to this, the checkin service would not run until the next reboot. That next reboot could occur within a
few minutes (startup crash, which then automatically checks in before the user has a chance to opt out)
or even the possibility of never. This is unpredictable and buggy.
Change the checkin frequency from 7 days to 1 day.

CMStats: fix up the logic and potential sync failures

Clean up CMStats code.

Besides the cleanup, make sure to wait a bit between retries if upload fails for whatever reason.

Change-Id: Ib83e35bab2dc3d643751f032f810569dc71cafcc

----------------------------------------------------

Statistics: update for client id and current view

use hashed Mac address as client id and store device name
as current view

Change-Id: Ia2b26cd674035fc97ca415ba0ca1f78e1628745f
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>

----------------------------------------------------

fix statistics after changing version naming

Due to changing the version name in http://gerrit.aokp.co/12081
the returned version for Google Analytics needs to be updated.

----------------------------------------------------

Change-Id: Ifc9cfa5970de2c5d860923677f260a2066ed2885
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>