From b90e97cdb84542a787f1361633a662f57852d9d3 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Sat, 2 Apr 2016 11:31:27 -0400
Subject: [PATCH] Remove analytics

Change-Id: I4aa2a69fd7eb68d9ab8a4ba426532944901f2322
---
 host/migration/example-cm12.1-settings.txt                  |  3 +--
 host/migration/src/CMSettings.java                          |  7 -------
 packages/CMSettingsProvider/res/values/defaults.xml         |  3 ---
 .../src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java    |  3 ---
 .../cmsettings/tests/CMSettingsProviderDefaultsTest.java    |  3 ---
 sdk/src/java/cyanogenmod/providers/CMSettings.java          | 13 -------------
 6 files changed, 1 insertion(+), 31 deletions(-)

diff --git a/host/migration/example-cm12.1-settings.txt b/host/migration/example-cm12.1-settings.txt
index 7534be3..9f454aa 100644
--- a/host/migration/example-cm12.1-settings.txt
+++ b/host/migration/example-cm12.1-settings.txt
@@ -64,7 +64,6 @@ Row: 60 name=swap_volume_keys_on_rotation, type=s, value=0, type=s
 Row: 61 name=status_bar_brightness_control, type=s, value=0, type=s
 Row: 62 name=status_bar_notif_count, type=s, value=1, type=s
 Row: 63 name=dev_force_show_navbar, type=s, value=0, type=s
-Row: 64 name=stats_collection, type=s, value=1, type=s
 Row: 65 name=advanced_mode, type=s, value=1, type=s
 Row: 66 name=default_theme_package, type=s, value=com.cyngn.hexo, type=s
 Row: 67 name=default_theme_components, type=s, value=mods_overlays|mods_status_bar|mods_navigation_bar|mods_icons|mods_homescreen|mods_fonts, type=s
@@ -118,4 +117,4 @@ Row: 114 name=ring_home_button_behavior, type=s, value=1, type=s
 Row: 115 name=show_alarm_icon, type=s, value=1, type=s
 Row: 116 name=status_bar_am_pm, type=s, value=1, type=s
 Row: 117 name=status_bar_quick_qs_pulldown, type=s, value=1, type=s
-Row: 118 name=t9_search_input_locale, type=s, value=enUS, type=s
\ No newline at end of file
+Row: 118 name=t9_search_input_locale, type=s, value=enUS, type=s
diff --git a/host/migration/src/CMSettings.java b/host/migration/src/CMSettings.java
index 0d57b0d..b4f5be9 100644
--- a/host/migration/src/CMSettings.java
+++ b/host/migration/src/CMSettings.java
@@ -833,12 +833,6 @@ public final class CMSettings {
         public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
 
         /**
-         * Global stats collection
-         * @hide
-         */
-        public static final String STATS_COLLECTION = "stats_collection";
-
-        /**
          * Boolean value whether to link ringtone and notification volume
          *
          * @hide
@@ -1021,7 +1015,6 @@ public final class CMSettings {
                 CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
                 CMSettings.Secure.KEYBOARD_BRIGHTNESS,
                 CMSettings.Secure.POWER_MENU_ACTIONS,
-                CMSettings.Secure.STATS_COLLECTION,
                 CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
                 CMSettings.Secure.QS_TILES,
                 CMSettings.Secure.QS_USE_MAIN_TILES,
diff --git a/packages/CMSettingsProvider/res/values/defaults.xml b/packages/CMSettingsProvider/res/values/defaults.xml
index 5d590ad..916bb10 100644
--- a/packages/CMSettingsProvider/res/values/defaults.xml
+++ b/packages/CMSettingsProvider/res/values/defaults.xml
@@ -48,9 +48,6 @@
          Comma-delimited, quick settings tiles. See QSConstants.java for a list of all available tiles
     <string name="def_qs_tiles">wifi,bt,cell,airplane,rotation,flashlight,location,cast,hotspot,live_display</string> -->
 
-    <!-- Default for CMSettings.Secure.STATS_COLLECTION -->
-    <bool name="def_stats_collection">false</bool>
-
     <!-- Default for CMSettings.System.STATUS_BAR_BATTERY_STYLE
          * 0: Display the battery as icon in portrait mode
          * 2: Display the battery as a circle
diff --git a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
index 98064af..fff68da 100644
--- a/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
+++ b/packages/CMSettingsProvider/src/org/cyanogenmod/cmsettings/CMDatabaseHelper.java
@@ -255,9 +255,6 @@ public class CMDatabaseHelper extends SQLiteOpenHelper{
             loadBooleanSetting(stmt, CMSettings.Secure.QS_USE_MAIN_TILES,
                     R.bool.def_sysui_qs_main_tiles);
 
-            loadBooleanSetting(stmt, CMSettings.Secure.STATS_COLLECTION,
-                    R.bool.def_stats_collection);
-
             loadBooleanSetting(stmt, CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED,
                     R.bool.def_lockscreen_visualizer);
 
diff --git a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
index a2c4269..ff5583d 100644
--- a/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
+++ b/packages/CMSettingsProvider/tests/src/org/cyanogenmod/cmsettings/tests/CMSettingsProviderDefaultsTest.java
@@ -90,9 +90,6 @@ public class CMSettingsProviderDefaultsTest extends AndroidTestCase {
                 CMSettings.Secure.QS_USE_MAIN_TILES,
                 "R.bool.def_sysui_qs_main_tiles"));
         SECURE_SETTINGS_DEFAULTS.add(new Setting(
-                CMSettings.Secure.STATS_COLLECTION,
-                "R.bool.def_stats_collection"));
-        SECURE_SETTINGS_DEFAULTS.add(new Setting(
                 CMSettings.Secure.LOCKSCREEN_VISUALIZER_ENABLED,
                 "R.bool.def_lockscreen_visualizer"));
         SECURE_SETTINGS_DEFAULTS.add(new Setting(
diff --git a/sdk/src/java/cyanogenmod/providers/CMSettings.java b/sdk/src/java/cyanogenmod/providers/CMSettings.java
index 47cc524..6675da8 100644
--- a/sdk/src/java/cyanogenmod/providers/CMSettings.java
+++ b/sdk/src/java/cyanogenmod/providers/CMSettings.java
@@ -2484,18 +2484,6 @@ public final class CMSettings {
         public static final String QS_USE_MAIN_TILES = "sysui_qs_main_tiles";
 
         /**
-         * Global stats collection
-         * @hide
-         */
-        public static final String STATS_COLLECTION = "stats_collection";
-
-        /**
-         * Whether the global stats collection setting has been successfully reported to server
-         * @hide
-         */
-        public static final String STATS_COLLECTION_REPORTED = "stats_collection_reported";
-
-        /**
          * Whether newly installed apps should run with privacy guard by default
          * @hide
          */
@@ -2724,7 +2712,6 @@ public final class CMSettings {
                 CMSettings.Secure.DEV_FORCE_SHOW_NAVBAR,
                 CMSettings.Secure.KEYBOARD_BRIGHTNESS,
                 CMSettings.Secure.POWER_MENU_ACTIONS,
-                CMSettings.Secure.STATS_COLLECTION,
                 CMSettings.Secure.QS_SHOW_BRIGHTNESS_SLIDER,
                 CMSettings.Secure.QS_TILES,
                 CMSettings.Secure.QS_USE_MAIN_TILES,
-- 
2.8.0

