Rebase some patches for LAOS

This commit is contained in:
Tad 2017-01-17 18:17:50 -05:00
parent f753233d32
commit 661a94ee87
4 changed files with 204 additions and 399 deletions

View File

@ -1,24 +1,26 @@
From 9e22fca4c687d84ba84428788d55b356069e29c7 Mon Sep 17 00:00:00 2001 From 269eca0bb61728b592134368ce12917e8ed3ba72 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us> From: Tad <tad@spotco.us>
Date: Thu, 17 Nov 2016 15:40:05 -0500 Date: Tue, 17 Jan 2017 18:14:28 -0500
Subject: [PATCH] Remove Sprint DM Subject: [PATCH] Remove Sprint Blobs
Change-Id: I94d44bb4753cac72106f7c49997d69a0ec5556bd Change-Id: Ie2a25519742b16a90afd44a22de34b1246d58756
--- ---
proprietary-files.txt | 15 --------------- proprietary-files.txt | 18 ------------------
1 file changed, 15 deletions(-) 1 file changed, 18 deletions(-)
diff --git a/proprietary-files.txt b/proprietary-files.txt diff --git a/proprietary-files.txt b/proprietary-files.txt
index f97d3e6..3675ce9 100644 index ddde463..3675ce9 100644
--- a/proprietary-files.txt --- a/proprietary-files.txt
+++ b/proprietary-files.txt +++ b/proprietary-files.txt
@@ -290,21 +290,6 @@ lib64/libqti-iop.so @@ -290,24 +290,6 @@ lib64/libqti-iop.so
vendor/lib/libqti-iop-client.so vendor/lib/libqti-iop-client.so
vendor/lib64/libqti-iop-client.so vendor/lib64/libqti-iop-client.so
-# DM/Sprint -# DM/Sprint
--app/DMConfigUpdateLight/DMConfigUpdateLight.apk --app/DMConfigUpdate/DMConfigUpdate.apk
--app/HiddenMenuLight/HiddenMenuLight.apk --app/HiddenMenu/HiddenMenu.apk
-etc/permissions/com.android.omadm.service.xml
-etc/sysconfig/whitelist_com.android.omadm.service.xml
-lib/libdmengine.so -lib/libdmengine.so
-lib/libdmjavaplugin.so -lib/libdmjavaplugin.so
--priv-app/CQATest/CQATest.apk --priv-app/CQATest/CQATest.apk
@ -28,6 +30,7 @@ index f97d3e6..3675ce9 100644
-lib/libdmengine.so:priv-app/DMService/lib/arm/libdmengine.so -lib/libdmengine.so:priv-app/DMService/lib/arm/libdmengine.so
-lib/libdmjavaplugin.so:priv-app/DMService/lib/arm/libdmjavaplugin.so -lib/libdmjavaplugin.so:priv-app/DMService/lib/arm/libdmjavaplugin.so
--priv-app/DiagMon/DiagMon.apk --priv-app/DiagMon/DiagMon.apk
--priv-app/GCS/GCS.apk:priv-app/GCS/GCS.apk:PRESIGNED
--priv-app/LifetimeData/LifetimeData.apk --priv-app/LifetimeData/LifetimeData.apk
--priv-app/SprintDM/SprintDM.apk --priv-app/SprintDM/SprintDM.apk
- -

View File

@ -1,25 +1,25 @@
From 3b221ea04b84cf9df2098598c0d4979446b0c914 Mon Sep 17 00:00:00 2001 From 526dadc1170fb3deea60fd3d2e93ab62e54a00ab Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us> From: Tad <tad@spotco.us>
Date: Fri, 23 Dec 2016 23:09:33 -0500 Date: Tue, 17 Jan 2017 18:04:09 -0500
Subject: [PATCH] Remove stats Subject: [PATCH] Remove stats
Change-Id: I13313c99c3a839f6ae53d5d87a9999da23fb1103 Change-Id: If22fca4b2b641f8b68247ece20441b5cc7724709
--- ---
AndroidManifest.xml | 25 -- AndroidManifest.xml | 25 ---
proguard.flags | 1 - proguard.flags | 1 -
res/values/config.xml | 5 - res/values/config.xml | 3 -
res/values/strings.xml | 22 -- res/values/strings.xml | 22 ---
res/xml/anonymous_stats.xml | 32 --- res/xml/anonymous_stats.xml | 32 ----
res/xml/parts_catalog.xml | 5 - res/xml/parts_catalog.xml | 5 -
res/xml/preview_data.xml | 52 ---- res/xml/preview_data.xml | 52 ------
res/xml/privacy_settings.xml | 8 - res/xml/privacy_settings.xml | 8 -
.../cmparts/cmstats/AnonymousStats.java | 101 ------- .../cmparts/cmstats/AnonymousStats.java | 73 --------
.../cyanogenmod/cmparts/cmstats/PreviewData.java | 49 ---- .../cyanogenmod/cmparts/cmstats/PreviewData.java | 49 -----
.../cmparts/cmstats/ReportingService.java | 106 -------- .../cmparts/cmstats/ReportingService.java | 82 ---------
.../cmparts/cmstats/ReportingServiceManager.java | 123 --------- .../cmparts/cmstats/ReportingServiceManager.java | 109 -----------
.../cmparts/cmstats/StatsUploadJobService.java | 291 --------------------- .../cmparts/cmstats/StatsUploadJobService.java | 205 ---------------------
src/org/cyanogenmod/cmparts/cmstats/Utilities.java | 102 -------- src/org/cyanogenmod/cmparts/cmstats/Utilities.java | 102 ----------
14 files changed, 922 deletions(-) 14 files changed, 768 deletions(-)
delete mode 100644 res/xml/anonymous_stats.xml delete mode 100644 res/xml/anonymous_stats.xml
delete mode 100644 res/xml/preview_data.xml delete mode 100644 res/xml/preview_data.xml
delete mode 100644 src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java delete mode 100644 src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java
@ -30,10 +30,10 @@ Change-Id: I13313c99c3a839f6ae53d5d87a9999da23fb1103
delete mode 100644 src/org/cyanogenmod/cmparts/cmstats/Utilities.java delete mode 100644 src/org/cyanogenmod/cmparts/cmstats/Utilities.java
diff --git a/AndroidManifest.xml b/AndroidManifest.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 1bdf33d..ceec90e 100644 index d4f37a2..a574d98 100644
--- a/AndroidManifest.xml --- a/AndroidManifest.xml
+++ b/AndroidManifest.xml +++ b/AndroidManifest.xml
@@ -179,31 +179,6 @@ @@ -180,31 +180,6 @@
android:value="status_bar_settings" /> android:value="status_bar_settings" />
</activity-alias> </activity-alias>
@ -78,23 +78,21 @@ index 581d61f..61c9254 100644
-keep class org.cyanogenmod.cmparts.hardware.* -keep class org.cyanogenmod.cmparts.hardware.*
-keep class org.cyanogenmod.cmparts.input.* -keep class org.cyanogenmod.cmparts.input.*
diff --git a/res/values/config.xml b/res/values/config.xml diff --git a/res/values/config.xml b/res/values/config.xml
index f66ec0e..318c7dd 100644 index be0cc53..57ab696 100644
--- a/res/values/config.xml --- a/res/values/config.xml
+++ b/res/values/config.xml +++ b/res/values/config.xml
@@ -16,11 +16,6 @@ @@ -17,9 +17,6 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Metrics server endpoints --> - <!-- Metrics server endpoint -->
- <string name="stats_cm_url">https://stats.cyanogenmod.org/submit</string> - <string name="stats_cm_url">https://stats.lineageos.org/api/v1/stats</string>
- <string name="stats_cyanogen_url">https://shopvac.cyngn.com/community/heartbeat</string>
- <string name="stats_cyanogen_token_url">https://account.cyngn.com/api/v1/community/heartbeat_token</string>
- -
<!-- When true, weather options will be displayed in settings dashboard --> <!-- When true, weather options will be displayed in settings dashboard -->
<bool name="config_showWeatherMenu">true</bool> <bool name="config_showWeatherMenu">true</bool>
diff --git a/res/values/strings.xml b/res/values/strings.xml diff --git a/res/values/strings.xml b/res/values/strings.xml
index 0557279..cfcf049 100644 index 3037cdd..79988d6 100644
--- a/res/values/strings.xml --- a/res/values/strings.xml
+++ b/res/values/strings.xml +++ b/res/values/strings.xml
@@ -483,28 +483,6 @@ @@ -483,28 +483,6 @@
@ -103,11 +101,11 @@ index 0557279..cfcf049 100644
- <!-- Anonymous Statistics #CM --> - <!-- Anonymous Statistics #CM -->
- <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. --> - <!-- About device screen, list item title. Takes the user to the screen about opting in or out of anonymous statistics. -->
- <string name="anonymous_statistics_title">CyanogenMod statistics</string> - <string name="anonymous_statistics_title">LineageOS statistics</string>
- <string name="anonymous_statistics_summary">Help make CyanogenMod better by opting into anonymous statistics reporting</string> - <string name="anonymous_statistics_summary">Help make LineageOS better by opting into anonymous statistics reporting</string>
- <string name="anonymous_statistics_warning_title">About</string> - <string name="anonymous_statistics_warning_title">About</string>
- <string name="anonymous_statistics_warning">Opting into CyanogenMod Statistics will allow non-personal data to be submitted to the - <string name="anonymous_statistics_warning">Opting into LineageOS Statistics will allow non-personal data to be submitted to the
- developers of CyanogenMod to track unique installations across devices. The information submitted includes an unique identifier, - developers of LineageOS to track unique installations across devices. The information submitted includes an unique identifier,
- which does not compromise your privacy or personal data. The data is submitted during each boot.\n\nFor an example of the data that is submitted, tap on Preview Data.</string> - which does not compromise your privacy or personal data. The data is submitted during each boot.\n\nFor an example of the data that is submitted, tap on Preview Data.</string>
- <string name="enable_reporting_title">Enable reporting</string> - <string name="enable_reporting_title">Enable reporting</string>
- <string name="preview_data_title">Preview data</string> - <string name="preview_data_title">Preview data</string>
@ -257,10 +255,10 @@ index 5ae923a..45df2a1 100644
</PreferenceScreen> </PreferenceScreen>
diff --git a/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java b/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java diff --git a/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java b/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java
deleted file mode 100644 deleted file mode 100644
index 7c6294e..0000000 index 3a6669d..0000000
--- a/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java --- a/src/org/cyanogenmod/cmparts/cmstats/AnonymousStats.java
+++ /dev/null +++ /dev/null
@@ -1,101 +0,0 @@ @@ -1,73 +0,0 @@
-/* -/*
- * Copyright (C) 2015 The CyanogenMod Project - * Copyright (C) 2015 The CyanogenMod Project
- * - *
@ -283,16 +281,9 @@ index 7c6294e..0000000
-import android.content.SharedPreferences; -import android.content.SharedPreferences;
-import android.os.Bundle; -import android.os.Bundle;
- -
-import android.os.UserHandle;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.PreferenceScreen;
-import android.support.v14.preference.SwitchPreference;
-
-import org.cyanogenmod.cmparts.R; -import org.cyanogenmod.cmparts.R;
-import org.cyanogenmod.cmparts.SettingsPreferenceFragment; -import org.cyanogenmod.cmparts.SettingsPreferenceFragment;
- -
-import cyanogenmod.providers.CMSettings;
-
-public class AnonymousStats extends SettingsPreferenceFragment { -public class AnonymousStats extends SettingsPreferenceFragment {
- -
- private static final String PREF_FILE_NAME = "CMStats"; - private static final String PREF_FILE_NAME = "CMStats";
@ -302,10 +293,6 @@ index 7c6294e..0000000
- /* package */ static final String KEY_LAST_JOB_ID = "last_job_id"; - /* package */ static final String KEY_LAST_JOB_ID = "last_job_id";
- /* package */ static final int QUEUE_MAX_THRESHOLD = 1000; - /* package */ static final int QUEUE_MAX_THRESHOLD = 1000;
- -
- public static final String KEY_STATS = "stats_collection";
-
- SwitchPreference mStatsSwitch;
-
- public static SharedPreferences getPreferences(Context context) { - public static SharedPreferences getPreferences(Context context) {
- return context.getSharedPreferences(PREF_FILE_NAME, 0); - return context.getSharedPreferences(PREF_FILE_NAME, 0);
- } - }
@ -314,23 +301,6 @@ index 7c6294e..0000000
- public void onCreate(Bundle savedInstanceState) { - public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState); - super.onCreate(savedInstanceState);
- addPreferencesFromResource(R.xml.anonymous_stats); - addPreferencesFromResource(R.xml.anonymous_stats);
- mStatsSwitch = (SwitchPreference) findPreference(KEY_STATS);
- }
-
- @Override
- public boolean onPreferenceTreeClick(Preference preference) {
- if (preference == mStatsSwitch) {
- boolean checked = mStatsSwitch.isChecked();
- if (checked) {
- // clear opt out flags
- CMSettings.Secure.putIntForUser(getContentResolver(),
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 0, UserHandle.USER_OWNER);
- }
- // will initiate opt out sequence if necessary
- ReportingServiceManager.setAlarm(getActivity());
- return true;
- }
- return super.onPreferenceTreeClick(preference);
- } - }
- -
- public static void updateLastSynced(Context context) { - public static void updateLastSynced(Context context) {
@ -419,12 +389,13 @@ index a14f76b..0000000
-} -}
diff --git a/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java b/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java diff --git a/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java b/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java
deleted file mode 100644 deleted file mode 100644
index 0725676..0000000 index d1cd8e6..0000000
--- a/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java --- a/src/org/cyanogenmod/cmparts/cmstats/ReportingService.java
+++ /dev/null +++ /dev/null
@@ -1,106 +0,0 @@ @@ -1,82 +0,0 @@
-/* -/*
- * Copyright (C) 2015 The CyanogenMod Project - * Copyright (C) 2015 The CyanogenMod Project
- * (C) 2017 The LineageOS Project
- * - *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. - * you may not use this file except in compliance with the License.
@ -458,8 +429,6 @@ index 0725676..0000000
- /* package */ static final String TAG = "CMStats"; - /* package */ static final String TAG = "CMStats";
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); - private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
- -
- public static final String EXTRA_OPTING_OUT = "cmstats::opt_out";
-
- public ReportingService() { - public ReportingService() {
- super(ReportingService.class.getSimpleName()); - super(ReportingService.class.getSimpleName());
- } - }
@ -474,41 +443,24 @@ index 0725676..0000000
- String deviceCountry = Utilities.getCountryCode(getApplicationContext()); - String deviceCountry = Utilities.getCountryCode(getApplicationContext());
- String deviceCarrier = Utilities.getCarrier(getApplicationContext()); - String deviceCarrier = Utilities.getCarrier(getApplicationContext());
- String deviceCarrierId = Utilities.getCarrierId(getApplicationContext()); - String deviceCarrierId = Utilities.getCarrierId(getApplicationContext());
- boolean optOut = intent.getBooleanExtra(EXTRA_OPTING_OUT, false);
- -
- final int cyanogenJobId = AnonymousStats.getNextJobId(getApplicationContext());
- final int cmOrgJobId = AnonymousStats.getNextJobId(getApplicationContext()); - final int cmOrgJobId = AnonymousStats.getNextJobId(getApplicationContext());
- -
- if (DEBUG) Log.d(TAG, "scheduling jobs id: " + cyanogenJobId + ", " + cmOrgJobId); - if (DEBUG) Log.d(TAG, "scheduling job id: " + cmOrgJobId);
- -
- PersistableBundle cyanogenBundle = new PersistableBundle(); - PersistableBundle cmBundle = new PersistableBundle();
- cyanogenBundle.putBoolean(StatsUploadJobService.KEY_OPT_OUT, optOut); - cmBundle.putString(StatsUploadJobService.KEY_DEVICE_NAME, deviceName);
- cyanogenBundle.putString(StatsUploadJobService.KEY_DEVICE_NAME, deviceName); - cmBundle.putString(StatsUploadJobService.KEY_UNIQUE_ID, deviceId);
- cyanogenBundle.putString(StatsUploadJobService.KEY_UNIQUE_ID, deviceId); - cmBundle.putString(StatsUploadJobService.KEY_VERSION, deviceVersion);
- cyanogenBundle.putString(StatsUploadJobService.KEY_VERSION, deviceVersion); - cmBundle.putString(StatsUploadJobService.KEY_COUNTRY, deviceCountry);
- cyanogenBundle.putString(StatsUploadJobService.KEY_COUNTRY, deviceCountry); - cmBundle.putString(StatsUploadJobService.KEY_CARRIER, deviceCarrier);
- cyanogenBundle.putString(StatsUploadJobService.KEY_CARRIER, deviceCarrier); - cmBundle.putString(StatsUploadJobService.KEY_CARRIER_ID, deviceCarrierId);
- cyanogenBundle.putString(StatsUploadJobService.KEY_CARRIER_ID, deviceCarrierId); - cmBundle.putLong(StatsUploadJobService.KEY_TIMESTAMP, System.currentTimeMillis());
- cyanogenBundle.putLong(StatsUploadJobService.KEY_TIMESTAMP, System.currentTimeMillis());
-
- // get snapshot and persist it
- PersistableBundle cmBundle = new PersistableBundle(cyanogenBundle);
- -
- // set job types - // set job types
- cyanogenBundle.putInt(StatsUploadJobService.KEY_JOB_TYPE,
- StatsUploadJobService.JOB_TYPE_CYANOGEN);
- cmBundle.putInt(StatsUploadJobService.KEY_JOB_TYPE, - cmBundle.putInt(StatsUploadJobService.KEY_JOB_TYPE,
- StatsUploadJobService.JOB_TYPE_CMORG); - StatsUploadJobService.JOB_TYPE_CMORG);
- -
- // schedule cyanogen stats upload
- js.schedule(new JobInfo.Builder(cyanogenJobId, new ComponentName(getPackageName(),
- StatsUploadJobService.class.getName()))
- .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)
- .setMinimumLatency(1000)
- .setExtras(cyanogenBundle)
- .setPersisted(true)
- .build());
-
- // schedule cmorg stats upload - // schedule cmorg stats upload
- js.schedule(new JobInfo.Builder(cmOrgJobId, new ComponentName(getPackageName(), - js.schedule(new JobInfo.Builder(cmOrgJobId, new ComponentName(getPackageName(),
- StatsUploadJobService.class.getName())) - StatsUploadJobService.class.getName()))
@ -518,12 +470,6 @@ index 0725676..0000000
- .setPersisted(true) - .setPersisted(true)
- .build()); - .build());
- -
- if (optOut) {
- // we've successfully scheduled the opt out.
- CMSettings.Secure.putIntForUser(getContentResolver(),
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 1, UserHandle.USER_OWNER);
- }
-
- // reschedule - // reschedule
- AnonymousStats.updateLastSynced(this); - AnonymousStats.updateLastSynced(this);
- ReportingServiceManager.setAlarm(this); - ReportingServiceManager.setAlarm(this);
@ -531,12 +477,13 @@ index 0725676..0000000
-} -}
diff --git a/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java b/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java diff --git a/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java b/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java
deleted file mode 100644 deleted file mode 100644
index 8264739..0000000 index ef53a0a..0000000
--- a/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java --- a/src/org/cyanogenmod/cmparts/cmstats/ReportingServiceManager.java
+++ /dev/null +++ /dev/null
@@ -1,123 +0,0 @@ @@ -1,109 +0,0 @@
-/* -/*
- * Copyright (C) 2012 The CyanogenMod Project - * Copyright (C) 2012 The CyanogenMod Project
- * (C) 2017 The LineageOS Project
- * - *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. - * you may not use this file except in compliance with the License.
@ -584,27 +531,12 @@ index 8264739..0000000
- } - }
- } - }
- -
- /**
- * opt out if we haven't yet
- */
- public static void initiateOptOut(Context context) {
- final boolean optOutReported = CMSettings.Secure.getIntForUser(context.getContentResolver(),
- CMSettings.Secure.STATS_COLLECTION_REPORTED, 0, UserHandle.USER_OWNER) == 1;
- if (!optOutReported) {
- Intent intent = new Intent();
- intent.setClass(context, ReportingService.class);
- intent.putExtra(ReportingService.EXTRA_OPTING_OUT, true);
- context.startServiceAsUser(intent, UserHandle.OWNER);
- }
- }
-
- public static void setAlarm(Context context) { - public static void setAlarm(Context context) {
- SharedPreferences prefs = AnonymousStats.getPreferences(context); - SharedPreferences prefs = AnonymousStats.getPreferences(context);
- if (prefs.contains(AnonymousStats.ANONYMOUS_OPT_IN)) { - if (prefs.contains(AnonymousStats.ANONYMOUS_OPT_IN)) {
- migrate(context, prefs); - migrate(context, prefs);
- } - }
- if (!Utilities.isStatsCollectionEnabled(context)) { - if (!Utilities.isStatsCollectionEnabled(context)) {
- initiateOptOut(context);
- return; - return;
- } - }
- long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0); - long lastSynced = prefs.getLong(AnonymousStats.ANONYMOUS_LAST_CHECKED, 0);
@ -660,12 +592,13 @@ index 8264739..0000000
-} -}
diff --git a/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java b/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java diff --git a/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java b/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java
deleted file mode 100644 deleted file mode 100644
index 09f4ea1..0000000 index 16f918b..0000000
--- a/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java --- a/src/org/cyanogenmod/cmparts/cmstats/StatsUploadJobService.java
+++ /dev/null +++ /dev/null
@@ -1,291 +0,0 @@ @@ -1,205 +0,0 @@
-/* -/*
- * Copyright (C) 2015 The CyanogenMod Project - * Copyright (C) 2015 The CyanogenMod Project
- * (C) 2017 The LineageOS project
- * - *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. - * you may not use this file except in compliance with the License.
@ -712,8 +645,7 @@ index 09f4ea1..0000000
- private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); - private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
- -
- public static final String KEY_JOB_TYPE = "job_type"; - public static final String KEY_JOB_TYPE = "job_type";
- public static final int JOB_TYPE_CYANOGEN = 1; - public static final int JOB_TYPE_CMORG = 1;
- public static final int JOB_TYPE_CMORG = 2;
- -
- public static final String KEY_UNIQUE_ID = "uniqueId"; - public static final String KEY_UNIQUE_ID = "uniqueId";
- public static final String KEY_DEVICE_NAME = "deviceName"; - public static final String KEY_DEVICE_NAME = "deviceName";
@ -722,7 +654,6 @@ index 09f4ea1..0000000
- public static final String KEY_CARRIER = "carrier"; - public static final String KEY_CARRIER = "carrier";
- public static final String KEY_CARRIER_ID = "carrierId"; - public static final String KEY_CARRIER_ID = "carrierId";
- public static final String KEY_TIMESTAMP = "timeStamp"; - public static final String KEY_TIMESTAMP = "timeStamp";
- public static final String KEY_OPT_OUT = "optOut";
- -
- private final Map<JobParameters, StatsUploadTask> mCurrentJobs - private final Map<JobParameters, StatsUploadTask> mCurrentJobs
- = Collections.synchronizedMap(new ArrayMap<JobParameters, StatsUploadTask>()); - = Collections.synchronizedMap(new ArrayMap<JobParameters, StatsUploadTask>());
@ -731,6 +662,11 @@ index 09f4ea1..0000000
- public boolean onStartJob(JobParameters jobParameters) { - public boolean onStartJob(JobParameters jobParameters) {
- if (DEBUG) - if (DEBUG)
- Log.d(TAG, "onStartJob() called with " + "jobParameters = [" + jobParameters + "]"); - Log.d(TAG, "onStartJob() called with " + "jobParameters = [" + jobParameters + "]");
-
- if (!Utilities.isStatsCollectionEnabled(this)) {
- return false;
- }
-
- final StatsUploadTask uploadTask = new StatsUploadTask(jobParameters); - final StatsUploadTask uploadTask = new StatsUploadTask(jobParameters);
- mCurrentJobs.put(jobParameters, uploadTask); - mCurrentJobs.put(jobParameters, uploadTask);
- uploadTask.execute((Void) null); - uploadTask.execute((Void) null);
@ -774,37 +710,18 @@ index 09f4ea1..0000000
- String deviceCarrier = extras.getString(KEY_CARRIER); - String deviceCarrier = extras.getString(KEY_CARRIER);
- String deviceCarrierId = extras.getString(KEY_CARRIER_ID); - String deviceCarrierId = extras.getString(KEY_CARRIER_ID);
- long timeStamp = extras.getLong(KEY_TIMESTAMP); - long timeStamp = extras.getLong(KEY_TIMESTAMP);
- boolean optOut = extras.getBoolean(KEY_OPT_OUT);
- -
- boolean success = false; - boolean success = false;
- int jobType = extras.getInt(KEY_JOB_TYPE, -1); - int jobType = extras.getInt(KEY_JOB_TYPE, -1);
- if (!isCancelled()) { - if (!isCancelled()) {
- switch (jobType) { - switch (jobType) {
- case JOB_TYPE_CYANOGEN:
- try {
- JSONObject json = new JSONObject();
- json.put("optOut", optOut);
- json.put("uniqueId", deviceId);
- json.put("deviceName", deviceName);
- json.put("version", deviceVersion);
- json.put("country", deviceCountry);
- json.put("carrier", deviceCarrier);
- json.put("carrierId", deviceCarrierId);
- json.put("timestamp", timeStamp);
-
- success = uploadToCyanogen(json);
- } catch (IOException | JSONException e) {
- Log.e(TAG, "Could not upload stats checkin to cyanogen server", e);
- success = false;
- }
- break;
-
- case JOB_TYPE_CMORG: - case JOB_TYPE_CMORG:
- try { - try {
- success = uploadToCM(deviceId, deviceName, deviceVersion, deviceCountry, - JSONObject json = buildStatsRequest(deviceId, deviceName,
- deviceCarrier, deviceCarrierId, optOut); - deviceVersion, deviceCountry, deviceCarrier, deviceCarrierId);
- } catch (IOException e) { - success = uploadToCM(json);
- Log.e(TAG, "Could not upload stats checkin to commnity server", e); - } catch (IOException | JSONException e) {
- Log.e(TAG, "Could not upload stats checkin to community server", e);
- success = false; - success = false;
- } - }
- break; - break;
@ -823,26 +740,32 @@ index 09f4ea1..0000000
- } - }
- } - }
- -
- private JSONObject buildStatsRequest(String deviceId, String deviceName, String deviceVersion,
- String deviceCountry, String deviceCarrier,
- String deviceCarrierId) throws JSONException {
- JSONObject request = new JSONObject();
- request.put("device_hash", deviceId);
- request.put("device_name", deviceName);
- request.put("device_version", deviceVersion);
- request.put("device_country", deviceCountry);
- request.put("device_carrier", deviceCarrier);
- request.put("device_carrier_id", deviceCarrierId);
- return request;
- }
- -
- private boolean uploadToCM(String deviceId, String deviceName, String deviceVersion, - private boolean uploadToCM(JSONObject json) throws IOException {
- String deviceCountry, String deviceCarrier, String deviceCarrierId, - final Uri uri = Uri.parse(getString(R.string.stats_cm_url));
- boolean optOut)
- throws IOException {
-
- final Uri uri = Uri.parse(getString(R.string.stats_cm_url)).buildUpon()
- .appendQueryParameter("opt_out", optOut ? "1" : "0")
- .appendQueryParameter("device_hash", deviceId)
- .appendQueryParameter("device_name", deviceName)
- .appendQueryParameter("device_version", deviceVersion)
- .appendQueryParameter("device_country", deviceCountry)
- .appendQueryParameter("device_carrier", deviceCarrier)
- .appendQueryParameter("device_carrier_id", deviceCarrierId).build();
- URL url = new URL(uri.toString()); - URL url = new URL(uri.toString());
- HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); - HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
- try { - try {
- urlConnection.setInstanceFollowRedirects(true); - urlConnection.setInstanceFollowRedirects(true);
- urlConnection.setDoOutput(true); - urlConnection.setDoOutput(true);
- urlConnection.connect(); - urlConnection.setDoInput(true);
- urlConnection.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
-
- OutputStream os = urlConnection.getOutputStream();
- os.write(json.toString().getBytes("UTF-8"));
- os.close();
- -
- final int responseCode = urlConnection.getResponseCode(); - final int responseCode = urlConnection.getResponseCode();
- if (DEBUG) Log.d(TAG, "cm server response code=" + responseCode); - if (DEBUG) Log.d(TAG, "cm server response code=" + responseCode);
@ -858,83 +781,6 @@ index 09f4ea1..0000000
- -
- } - }
- -
- private boolean uploadToCyanogen(JSONObject json)
- throws IOException, JSONException {
- String authToken = getAuthToken();
-
- if (authToken.isEmpty()) {
- Log.w(TAG, "no auth token!");
- }
-
- URL url = new URL(getString(R.string.stats_cyanogen_url));
- HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
- try {
- urlConnection.setInstanceFollowRedirects(true);
- urlConnection.setDoInput(true);
- urlConnection.setDoOutput(true);
-
- urlConnection.setRequestProperty("Accept-Encoding", "identity");
- urlConnection.setRequestProperty("Authorization", authToken);
- urlConnection.setRequestProperty("Content-Type", "application/json");
-
- OutputStream os = urlConnection.getOutputStream();
- BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, "UTF-8"));
- writer.write(json.toString());
- writer.flush();
- writer.close();
- os.close();
-
- urlConnection.connect();
-
- final int responseCode = urlConnection.getResponseCode();
- final boolean success = responseCode == HttpURLConnection.HTTP_OK;
-
- final String response = getResponse(urlConnection, !success);
- if (DEBUG)
- Log.d(TAG, "server responseCode: " + responseCode +", response=" + response);
-
- if (!success) {
- Log.w(TAG, "failed sending, server returned: " + response);
- }
- return success;
- } finally {
- urlConnection.disconnect();
- }
- }
-
- private String getAuthToken() {
- HttpURLConnection urlConnection = null;
- try {
- URL url = new URL(getString(R.string.stats_cyanogen_token_url));
- urlConnection = (HttpURLConnection) url.openConnection();
- urlConnection.setInstanceFollowRedirects(true);
- urlConnection.setDoInput(true);
-
- urlConnection.setRequestProperty("Accept-Encoding", "identity");
- urlConnection.setRequestProperty("Content-Type", "text/plain");
-
- urlConnection.connect();
-
- final int responseCode = urlConnection.getResponseCode();
- final boolean success = responseCode == HttpURLConnection.HTTP_OK;
- if (DEBUG) Log.d(TAG, "server auth response code=" + responseCode);
- final String response = getResponse(urlConnection, !success);
- if (DEBUG)
- Log.d(TAG, "server auth response=" + response);
-
- if (success) {
- return response;
- }
- } catch (IOException e) {
- Log.e(TAG, "error getting auth token", e);
- } finally {
- if (urlConnection != null) {
- urlConnection.disconnect();
- }
- }
- return "";
- }
-
- private String getResponse(HttpURLConnection httpUrlConnection, boolean errorStream) - private String getResponse(HttpURLConnection httpUrlConnection, boolean errorStream)
- throws IOException { - throws IOException {
- InputStream responseStream = new BufferedInputStream(errorStream - InputStream responseStream = new BufferedInputStream(errorStream
@ -957,7 +803,7 @@ index 09f4ea1..0000000
-} -}
diff --git a/src/org/cyanogenmod/cmparts/cmstats/Utilities.java b/src/org/cyanogenmod/cmparts/cmstats/Utilities.java diff --git a/src/org/cyanogenmod/cmparts/cmstats/Utilities.java b/src/org/cyanogenmod/cmparts/cmstats/Utilities.java
deleted file mode 100644 deleted file mode 100644
index eefafba..0000000 index efb7379..0000000
--- a/src/org/cyanogenmod/cmparts/cmstats/Utilities.java --- a/src/org/cyanogenmod/cmparts/cmstats/Utilities.java
+++ /dev/null +++ /dev/null
@@ -1,102 +0,0 @@ @@ -1,102 +0,0 @@
@ -1035,7 +881,7 @@ index eefafba..0000000
- -
- public static String digest(String input) { - public static String digest(String input) {
- try { - try {
- MessageDigest md = MessageDigest.getInstance("MD5"); - MessageDigest md = MessageDigest.getInstance("SHA-256");
- return new BigInteger(1, md.digest(input.getBytes())).toString(16).toUpperCase(); - return new BigInteger(1, md.digest(input.getBytes())).toString(16).toUpperCase();
- } catch (Exception e) { - } catch (Exception e) {
- return null; - return null;

View File

@ -1,35 +1,35 @@
From 16ad98fe210328d994c264e258d77379e350d8fb Mon Sep 17 00:00:00 2001 From 4261628fb0a6636c10e07467f18565e264d6b0f6 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us> From: Tad <tad@spotco.us>
Date: Fri, 23 Dec 2016 22:21:15 -0500 Date: Tue, 17 Jan 2017 18:12:24 -0500
Subject: [PATCH] Remove stats Subject: [PATCH] Remove stats
Change-Id: I4fbf5ce0d2878d7ffce49771b025d6a35b12ed29 Change-Id: I878ab8ddb22a256ab0e4a4a851325d611ae79b73
--- ---
AndroidManifest.xml | 1 - AndroidManifest.xml | 1 -
.../setupwizard/cmstats/SetupStats.java | 163 --------------------- .../setupwizard/cmstats/SetupStats.java | 163 ---------------------
.../setupwizard/cmstats/StatsUtils.java | 44 ------ .../setupwizard/cmstats/StatsUtils.java | 44 ------
.../setupwizard/setup/BluetoothSetupPage.java | 7 - .../setupwizard/setup/BluetoothSetupPage.java | 7 -
.../setupwizard/setup/ChooseDataSimPage.java | 6 +- .../setupwizard/setup/ChooseDataSimPage.java | 4 -
.../setupwizard/setup/CyanogenServicesPage.java | 13 -- .../setupwizard/setup/CyanogenSettingsPage.java | 19 ---
.../setupwizard/setup/CyanogenSettingsPage.java | 20 ---
.../setupwizard/setup/DateTimePage.java | 19 --- .../setupwizard/setup/DateTimePage.java | 19 ---
.../setupwizard/setup/FingerprintSetupPage.java | 4 - .../setupwizard/setup/FingerprintSetupPage.java | 4 -
.../setupwizard/setup/GmsAccountPage.java | 25 +--- .../setupwizard/setup/GmsAccountPage.java | 22 ---
.../cyanogenmod/setupwizard/setup/LocalePage.java | 12 --
.../setupwizard/setup/MobileDataPage.java | 4 - .../setupwizard/setup/MobileDataPage.java | 4 -
.../setupwizard/setup/OtherSettingsPage.java | 13 -- .../setupwizard/setup/OtherSettingsPage.java | 13 --
.../setupwizard/setup/ScreenLockSetupPage.java | 4 - .../setupwizard/setup/ScreenLockSetupPage.java | 4 -
.../cyanogenmod/setupwizard/setup/SetupPage.java | 7 - .../cyanogenmod/setupwizard/setup/SetupPage.java | 7 -
.../cyanogenmod/setupwizard/setup/WelcomePage.java | 16 -- .../cyanogenmod/setupwizard/setup/WelcomePage.java | 5 -
.../setupwizard/setup/WifiSetupPage.java | 25 ---- .../setupwizard/setup/WifiSetupPage.java | 25 ----
.../setupwizard/ui/SetupPageFragment.java | 3 - .../setupwizard/ui/SetupPageFragment.java | 3 -
.../setupwizard/ui/SetupWizardActivity.java | 6 - .../setupwizard/ui/SetupWizardActivity.java | 6 -
.../util/EnableAccessibilityController.java | 3 - .../util/EnableAccessibilityController.java | 3 -
19 files changed, 2 insertions(+), 381 deletions(-) 19 files changed, 365 deletions(-)
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java
delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java delete mode 100644 src/com/cyanogenmod/setupwizard/cmstats/StatsUtils.java
diff --git a/AndroidManifest.xml b/AndroidManifest.xml diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index deb607c..c5878fa 100644 index 2353fb7..51ba684 100644
--- a/AndroidManifest.xml --- a/AndroidManifest.xml
+++ b/AndroidManifest.xml +++ b/AndroidManifest.xml
@@ -43,7 +43,6 @@ @@ -43,7 +43,6 @@
@ -260,10 +260,10 @@ index 8be8fad..0000000
- } - }
-} -}
diff --git a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
index 915abec..8609dbb 100644 index d1532ac..829f24f 100644
--- a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java --- a/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/BluetoothSetupPage.java
@@ -28,7 +28,6 @@ import android.util.Log; @@ -29,7 +29,6 @@ import android.util.Log;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -271,7 +271,7 @@ index 915abec..8609dbb 100644
import com.cyanogenmod.setupwizard.ui.LoadingFragment; import com.cyanogenmod.setupwizard.ui.LoadingFragment;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -91,9 +90,6 @@ public class BluetoothSetupPage extends SetupPage { @@ -96,9 +95,6 @@ public class BluetoothSetupPage extends SetupPage {
@Override @Override
public boolean onActivityResult(int requestCode, int resultCode, Intent data) { public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH) { if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH) {
@ -281,7 +281,7 @@ index 915abec..8609dbb 100644
getCallbacks().onNextPage(); getCallbacks().onNextPage();
} else { } else {
return false; return false;
@@ -111,9 +107,6 @@ public class BluetoothSetupPage extends SetupPage { @@ -116,9 +112,6 @@ public class BluetoothSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -292,10 +292,10 @@ index 915abec..8609dbb 100644
SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH, options.toBundle()); SetupWizardApp.REQUEST_CODE_SETUP_BLUETOOTH, options.toBundle());
} }
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
index a302d8f..5505031 100644 index 073d6d9..6ab9ae9 100644
--- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java --- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java
@@ -48,7 +48,6 @@ import com.android.internal.telephony.TelephonyIntents; @@ -49,7 +49,6 @@ import com.android.internal.telephony.TelephonyIntents;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -303,68 +303,21 @@ index a302d8f..5505031 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -355,10 +354,7 @@ public class ChooseDataSimPage extends SetupPage { @@ -360,9 +359,6 @@ public class ChooseDataSimPage extends SetupPage {
for (int i = 0; i < mCheckBoxes.size(); i++) { for (int i = 0; i < mCheckBoxes.size(); i++) {
if (subInfoRecord.getSimSlotIndex() == i) { if (subInfoRecord.getSimSlotIndex() == i) {
mCheckBoxes.get(i).setChecked(true); mCheckBoxes.get(i).setChecked(true);
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED, - SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
- SetupStats.Action.PREFERRED_DATA_SIM, - SetupStats.Action.PREFERRED_DATA_SIM,
- SetupStats.Label.SLOT, String.valueOf(i + 1)); - SetupStats.Label.SLOT, String.valueOf(i + 1));
- } else { } else {
+ } else {
mCheckBoxes.get(i).setChecked(false); mCheckBoxes.get(i).setChecked(false);
} }
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
index e71dd79..5bfe3b0 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java
@@ -32,7 +32,6 @@ 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.util.SetupWizardUtils;
@@ -95,10 +94,6 @@ public class CyanogenServicesPage extends SetupPage {
public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN) {
if (resultCode == Activity.RESULT_OK || resultCode == Activity.RESULT_FIRST_USER) {
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
- SetupStats.Label.CYANOGEN_ACCOUNT,
- resultCode == Activity.RESULT_OK ? "success" : "skipped");
if (SetupWizardUtils.accountExists(mContext,
mContext.getString(R.string.cm_account_type))) {
if (SetupWizardUtils.isDeviceLocked()) {
@@ -108,9 +103,6 @@ public class CyanogenServicesPage extends SetupPage {
}
getCallbacks().onNextPage();
} else if (resultCode == Activity.RESULT_CANCELED) {
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
- SetupStats.Action.EXTERNAL_PAGE_RESULT,
- SetupStats.Label.CYANOGEN_ACCOUNT, "canceled");
getCallbacks().onPreviousPage();
}
}
@@ -136,11 +128,6 @@ public class CyanogenServicesPage 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.CYANOGEN_ACCOUNT);
mFragment.startActivityForResult(intent,
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
options.toBundle());
diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
index 03a04b6..080e9b1 100644 index 866371d..e989484 100644
--- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java
@@ -42,7 +42,6 @@ import android.widget.TextView; @@ -43,7 +43,6 @@ import android.widget.TextView;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -372,7 +325,7 @@ index 03a04b6..080e9b1 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -116,37 +115,18 @@ public class CyanogenSettingsPage extends SetupPage { @@ -123,10 +122,6 @@ public class CyanogenSettingsPage extends SetupPage {
@Override @Override
public void run() { public void run() {
if (getData().containsKey(DISABLE_NAV_KEYS)) { if (getData().containsKey(DISABLE_NAV_KEYS)) {
@ -383,9 +336,8 @@ index 03a04b6..080e9b1 100644
writeDisableNavkeysOption(mContext, getData().getBoolean(DISABLE_NAV_KEYS)); writeDisableNavkeysOption(mContext, getData().getBoolean(DISABLE_NAV_KEYS));
} }
} }
}); @@ -136,25 +131,11 @@ public class CyanogenSettingsPage extends SetupPage {
- handleEnableMetrics(); handlePrivacyGuard();
handleDefaultThemeSetup();
} }
- private void handleEnableMetrics() { - private void handleEnableMetrics() {
@ -411,10 +363,10 @@ index 03a04b6..080e9b1 100644
final ThemeManager tm = ThemeManager.getInstance(mContext); final ThemeManager tm = ThemeManager.getInstance(mContext);
tm.applyDefaultTheme(); tm.applyDefaultTheme();
diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
index 7a5922b..a669163 100644 index f42240f..7e045ad 100644
--- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java --- a/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java +++ b/src/com/cyanogenmod/setupwizard/setup/DateTimePage.java
@@ -42,7 +42,6 @@ import android.widget.TextView; @@ -43,7 +43,6 @@ import android.widget.TextView;
import android.widget.TimePicker; import android.widget.TimePicker;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
@ -422,7 +374,7 @@ index 7a5922b..a669163 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import org.xmlpull.v1.XmlPullParserException; import org.xmlpull.v1.XmlPullParserException;
@@ -136,8 +135,6 @@ public class DateTimePage extends SetupPage { @@ -142,8 +141,6 @@ public class DateTimePage extends SetupPage {
mDateView.setOnClickListener(new View.OnClickListener() { mDateView.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -431,7 +383,7 @@ index 7a5922b..a669163 100644
showDatePicker(); showDatePicker();
} }
}); });
@@ -145,8 +142,6 @@ public class DateTimePage extends SetupPage { @@ -151,8 +148,6 @@ public class DateTimePage extends SetupPage {
mTimeView.setOnClickListener(new View.OnClickListener() { mTimeView.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -440,7 +392,7 @@ index 7a5922b..a669163 100644
showTimePicker(); showTimePicker();
} }
}); });
@@ -167,17 +162,11 @@ public class DateTimePage extends SetupPage { @@ -173,17 +168,11 @@ public class DateTimePage extends SetupPage {
final Map<?, ?> map = (Map<?, ?>) adapterView.getItemAtPosition(position); final Map<?, ?> map = (Map<?, ?>) adapterView.getItemAtPosition(position);
final String tzId = (String) map.get(KEY_ID); final String tzId = (String) map.get(KEY_ID);
if (mCurrentTimeZone != null && !mCurrentTimeZone.getID().equals(tzId)) { if (mCurrentTimeZone != null && !mCurrentTimeZone.getID().equals(tzId)) {
@ -458,7 +410,7 @@ index 7a5922b..a669163 100644
} }
} }
@@ -232,10 +221,6 @@ public class DateTimePage extends SetupPage { @@ -238,10 +227,6 @@ public class DateTimePage extends SetupPage {
if (activity != null) { if (activity != null) {
setDate(activity, year, month, day); setDate(activity, year, month, day);
updateTimeAndDateDisplay(activity); updateTimeAndDateDisplay(activity);
@ -469,7 +421,7 @@ index 7a5922b..a669163 100644
} }
} }
@@ -245,10 +230,6 @@ public class DateTimePage extends SetupPage { @@ -251,10 +236,6 @@ public class DateTimePage extends SetupPage {
if (activity != null) { if (activity != null) {
setTime(activity, hourOfDay, minute); setTime(activity, hourOfDay, minute);
updateTimeAndDateDisplay(activity); updateTimeAndDateDisplay(activity);
@ -481,10 +433,10 @@ index 7a5922b..a669163 100644
} }
diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
index 890a4f6..c9174c6 100644 index 8d78127..f079146 100644
--- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java --- a/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/FingerprintSetupPage.java
@@ -28,7 +28,6 @@ import android.widget.TextView; @@ -29,7 +29,6 @@ import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils; import com.android.internal.widget.LockPatternUtils;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -492,7 +444,7 @@ index 890a4f6..c9174c6 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
public class FingerprintSetupPage extends SetupPage { public class FingerprintSetupPage extends SetupPage {
@@ -113,9 +112,6 @@ public class FingerprintSetupPage extends SetupPage { @@ -119,9 +118,6 @@ public class FingerprintSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(getActivity(), ActivityOptions.makeCustomAnimation(getActivity(),
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -503,10 +455,10 @@ index 890a4f6..c9174c6 100644
options.toBundle()); options.toBundle());
} }
diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
index 436da08..79b5f2c 100644 index 747765e..a646997 100644
--- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java --- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java
@@ -35,7 +35,6 @@ import android.util.Log; @@ -36,7 +36,6 @@ import android.util.Log;
import com.android.setupwizardlib.util.ResultCodes; import com.android.setupwizardlib.util.ResultCodes;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -514,18 +466,17 @@ index 436da08..79b5f2c 100644
import com.cyanogenmod.setupwizard.ui.LoadingFragment; import com.cyanogenmod.setupwizard.ui.LoadingFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -148,10 +147,6 @@ public class GmsAccountPage extends SetupPage { @@ -155,9 +154,6 @@ public class GmsAccountPage extends SetupPage {
boolean restorePicker = !data.hasExtra(EXTRA_RESTORE_TOKEN)
&& !data.hasExtra(EXTRA_RESTORE_ACCOUNT) && && !data.hasExtra(EXTRA_RESTORE_ACCOUNT) &&
data.hasExtra(EXTRA_AUTH_ACCOUNT); data.hasExtra(EXTRA_AUTH_ACCOUNT);
-
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD, - SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
- SetupStats.Action.EXTERNAL_PAGE_RESULT, - SetupStats.Action.EXTERNAL_PAGE_RESULT,
- SetupStats.Label.GMS_ACCOUNT, "success"); - SetupStats.Label.GMS_ACCOUNT, "success");
launchGmsRestorePage(restorePicker); launchGmsRestorePage(restorePicker);
} else { } else {
handleResult(requestCode, resultCode); handleResult(requestCode, resultCode);
@@ -179,24 +174,12 @@ public class GmsAccountPage extends SetupPage { @@ -185,24 +181,12 @@ public class GmsAccountPage extends SetupPage {
private void handleResult(int requestCode, int resultCode) { private void handleResult(int requestCode, int resultCode) {
if (resultCode == Activity.RESULT_CANCELED) { if (resultCode == Activity.RESULT_CANCELED) {
@ -550,7 +501,7 @@ index 436da08..79b5f2c 100644
getCallbacks().onNextPage(); getCallbacks().onNextPage();
} else { } else {
getCallbacks().onPreviousPage(); getCallbacks().onPreviousPage();
@@ -236,9 +219,6 @@ public class GmsAccountPage extends SetupPage { @@ -242,9 +226,6 @@ public class GmsAccountPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -560,23 +511,58 @@ index 436da08..79b5f2c 100644
mFragment.startActivityForResult( mFragment.startActivityForResult(
intent, intent,
SetupWizardApp.REQUEST_CODE_RESTORE_GMS, options.toBundle()); SetupWizardApp.REQUEST_CODE_RESTORE_GMS, options.toBundle());
@@ -310,10 +290,7 @@ public class GmsAccountPage extends SetupPage { @@ -316,9 +297,6 @@ public class GmsAccountPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
- SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD, - SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD,
- SetupStats.Action.EXTERNAL_PAGE_LAUNCH, - SetupStats.Action.EXTERNAL_PAGE_LAUNCH,
- SetupStats.Label.PAGE, SetupStats.Label.GMS_ACCOUNT); - SetupStats.Label.PAGE, SetupStats.Label.GMS_ACCOUNT);
- mFragment.startActivityForResult(intent, mFragment.startActivityForResult(intent,
+ mFragment.startActivityForResult(intent,
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle()); SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
} catch (OperationCanceledException e) { } catch (OperationCanceledException e) {
error = true; diff --git a/src/com/cyanogenmod/setupwizard/setup/LocalePage.java b/src/com/cyanogenmod/setupwizard/setup/LocalePage.java
index e9717a5..e8a86ac 100644
--- a/src/com/cyanogenmod/setupwizard/setup/LocalePage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/LocalePage.java
@@ -43,7 +43,6 @@ import android.widget.Toast;
import com.android.internal.telephony.MccTable;
import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp;
-import com.cyanogenmod.setupwizard.cmstats.SetupStats;
import com.cyanogenmod.setupwizard.ui.LocalePicker;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -90,9 +89,6 @@ public class LocalePage extends SetupPage {
confirmCyanogenCredentials(mLocaleFragment);
return true;
} else {
- if (mLocaleFragment != null) {
- mLocaleFragment.sendLocaleStats();
- }
return super.doNextAction();
}
}
@@ -248,14 +244,6 @@ public class LocalePage extends SetupPage {
return R.layout.setup_locale;
}
- public void sendLocaleStats() {
- if (!mCurrentLocale.equals(mInitialLocale)) {
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
- SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE,
- mCurrentLocale.getDisplayName());
- }
- }
-
public void fetchAndUpdateSimLocale() {
if (mIgnoreSimLocale || isDetached()) {
return;
diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
index 9f96b1d..cfbc676 100644 index 32a5c86..eb1484c 100644
--- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java --- a/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/MobileDataPage.java
@@ -38,7 +38,6 @@ import android.widget.TextView; @@ -39,7 +39,6 @@ import android.widget.TextView;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -584,7 +570,7 @@ index 9f96b1d..cfbc676 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -147,9 +146,6 @@ public class MobileDataPage extends SetupPage { @@ -153,9 +152,6 @@ public class MobileDataPage extends SetupPage {
} else { } else {
onDataStateReady(); onDataStateReady();
} }
@ -595,10 +581,10 @@ index 9f96b1d..cfbc676 100644
}; };
diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
index 7ed23dc..270ac41 100644 index 5c0b91d..980b974 100644
--- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java --- a/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/OtherSettingsPage.java
@@ -17,7 +17,6 @@ @@ -18,7 +18,6 @@
package com.cyanogenmod.setupwizard.setup; package com.cyanogenmod.setupwizard.setup;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
@ -606,7 +592,7 @@ index 7ed23dc..270ac41 100644
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -229,10 +228,6 @@ public class OtherSettingsPage extends SetupPage { @@ -231,10 +230,6 @@ public class OtherSettingsPage extends SetupPage {
} }
private void onToggleLocationAccess(boolean checked) { private void onToggleLocationAccess(boolean checked) {
@ -617,7 +603,7 @@ index 7ed23dc..270ac41 100644
if (checked) { if (checked) {
setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY); setLocationMode(Settings.Secure.LOCATION_MODE_SENSORS_ONLY);
} else { } else {
@@ -241,10 +236,6 @@ public class OtherSettingsPage extends SetupPage { @@ -243,10 +238,6 @@ public class OtherSettingsPage extends SetupPage {
} }
private void onToggleBatterySaving(boolean checked) { private void onToggleBatterySaving(boolean checked) {
@ -628,7 +614,7 @@ index 7ed23dc..270ac41 100644
if (checked) { if (checked) {
setLocationMode(Settings.Secure.LOCATION_MODE_BATTERY_SAVING); setLocationMode(Settings.Secure.LOCATION_MODE_BATTERY_SAVING);
} else { } else {
@@ -253,10 +244,6 @@ public class OtherSettingsPage extends SetupPage { @@ -255,10 +246,6 @@ public class OtherSettingsPage extends SetupPage {
} }
private void onToggleNetwork(boolean checked) { private void onToggleNetwork(boolean checked) {
@ -640,18 +626,18 @@ index 7ed23dc..270ac41 100644
setLocationMode(Settings.Secure.LOCATION_MODE_HIGH_ACCURACY); setLocationMode(Settings.Secure.LOCATION_MODE_HIGH_ACCURACY);
} else { } else {
diff --git a/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java
index 3c9da33..72ee3f7 100644 index abbb2de..3483764 100644
--- a/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java --- a/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java
@@ -27,7 +27,6 @@ import android.view.View; @@ -28,7 +28,6 @@ import android.widget.Button;
import android.widget.TextView; import android.view.View;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
-import com.cyanogenmod.setupwizard.cmstats.SetupStats; -import com.cyanogenmod.setupwizard.cmstats.SetupStats;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
public class ScreenLockSetupPage extends SetupPage { public class ScreenLockSetupPage extends SetupPage {
@@ -106,9 +105,6 @@ public class ScreenLockSetupPage extends SetupPage { @@ -112,9 +111,6 @@ public class ScreenLockSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(getActivity(), ActivityOptions.makeCustomAnimation(getActivity(),
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -693,28 +679,18 @@ index 05bf9c5..142c04a 100644
fragment.setEnterTransition(t); fragment.setEnterTransition(t);
fragmentManager.beginTransaction() fragmentManager.beginTransaction()
diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
index 460a0ac..3a3d029 100644 index 2e63085..73d1e1a 100644
--- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java --- a/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java +++ b/src/com/cyanogenmod/setupwizard/setup/WelcomePage.java
@@ -42,7 +42,6 @@ import android.widget.Toast; @@ -27,7 +27,6 @@ import android.os.Bundle;
import com.android.internal.telephony.MccTable;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
-import com.cyanogenmod.setupwizard.cmstats.SetupStats; -import com.cyanogenmod.setupwizard.cmstats.SetupStats;
import com.cyanogenmod.setupwizard.ui.LocalePicker;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -86,9 +85,6 @@ public class WelcomePage extends SetupPage { public class WelcomePage extends SetupPage {
confirmCyanogenCredentials(mWelcomeFragment); @@ -79,10 +78,6 @@ public class WelcomePage extends SetupPage {
return true;
} else {
- if (mWelcomeFragment != null) {
- mWelcomeFragment.sendLocaleStats();
- }
return super.doNextAction();
}
}
@@ -102,10 +98,6 @@ public class WelcomePage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -725,26 +701,11 @@ index 460a0ac..3a3d029 100644
mContext.startActivity(intent, options.toBundle()); mContext.startActivity(intent, options.toBundle());
return true; return true;
} }
@@ -269,14 +261,6 @@ public class WelcomePage extends SetupPage {
return R.layout.setup_welcome_page;
}
- public void sendLocaleStats() {
- if (!mCurrentLocale.equals(mInitialLocale)) {
- SetupStats.addEvent(SetupStats.Categories.SETTING_CHANGED,
- SetupStats.Action.CHANGE_LOCALE, SetupStats.Label.LOCALE,
- mCurrentLocale.getDisplayName());
- }
- }
-
public void fetchAndUpdateSimLocale() {
if (mIgnoreSimLocale || isDetached()) {
return;
diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java diff --git a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
index 2d8084a..3a131f7 100644 index 051cbc3..22ad6b7 100644
--- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java --- a/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
+++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/WifiSetupPage.java
@@ -31,7 +31,6 @@ import android.util.Log; @@ -32,7 +32,6 @@ import android.util.Log;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
import com.cyanogenmod.setupwizard.SetupWizardApp; import com.cyanogenmod.setupwizard.SetupWizardApp;
@ -752,7 +713,7 @@ index 2d8084a..3a131f7 100644
import com.cyanogenmod.setupwizard.ui.LoadingFragment; import com.cyanogenmod.setupwizard.ui.LoadingFragment;
import com.cyanogenmod.setupwizard.ui.SetupPageFragment; import com.cyanogenmod.setupwizard.ui.SetupPageFragment;
import com.cyanogenmod.setupwizard.util.SetupWizardUtils; import com.cyanogenmod.setupwizard.util.SetupWizardUtils;
@@ -86,9 +85,6 @@ public class WifiSetupPage extends SetupPage { @@ -87,9 +86,6 @@ public class WifiSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -762,7 +723,7 @@ index 2d8084a..3a131f7 100644
mLoadingFragment.startActivityForResult(intent, mLoadingFragment.startActivityForResult(intent,
SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL, SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL,
options.toBundle()); options.toBundle());
@@ -157,19 +153,10 @@ public class WifiSetupPage extends SetupPage { @@ -162,19 +158,10 @@ public class WifiSetupPage extends SetupPage {
public boolean onActivityResult(int requestCode, int resultCode, Intent data) { public boolean onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) { if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_WIFI) {
if (resultCode == Activity.RESULT_CANCELED) { if (resultCode == Activity.RESULT_CANCELED) {
@ -782,7 +743,7 @@ index 2d8084a..3a131f7 100644
getCallbacks().onNextPage(); getCallbacks().onNextPage();
} }
} else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) { } else if (requestCode == SetupWizardApp.REQUEST_CODE_SETUP_CAPTIVE_PORTAL) {
@@ -179,20 +166,11 @@ public class WifiSetupPage extends SetupPage { @@ -184,20 +171,11 @@ public class WifiSetupPage extends SetupPage {
} }
String token = data.getStringExtra("response_token"); String token = data.getStringExtra("response_token");
if (token != null && !token.equals(mResponseToken)) { if (token != null && !token.equals(mResponseToken)) {
@ -803,7 +764,7 @@ index 2d8084a..3a131f7 100644
getCallbacks().onNextPage(); getCallbacks().onNextPage();
} }
} }
@@ -256,9 +234,6 @@ public class WifiSetupPage extends SetupPage { @@ -261,9 +239,6 @@ public class WifiSetupPage extends SetupPage {
ActivityOptions.makeCustomAnimation(mContext, ActivityOptions.makeCustomAnimation(mContext,
android.R.anim.fade_in, android.R.anim.fade_in,
android.R.anim.fade_out); android.R.anim.fade_out);
@ -814,10 +775,10 @@ index 2d8084a..3a131f7 100644
SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle()); SetupWizardApp.REQUEST_CODE_SETUP_WIFI, options.toBundle());
} }
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
index b0df440..33c61c7 100644 index 2ec8e3a..2770b14 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java --- a/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupPageFragment.java
@@ -26,7 +26,6 @@ import android.view.ViewGroup; @@ -27,7 +27,6 @@ import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
import com.cyanogenmod.setupwizard.R; import com.cyanogenmod.setupwizard.R;
@ -825,7 +786,7 @@ index b0df440..33c61c7 100644
import com.cyanogenmod.setupwizard.setup.Page; import com.cyanogenmod.setupwizard.setup.Page;
import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks; import com.cyanogenmod.setupwizard.setup.SetupDataCallbacks;
@@ -43,8 +42,6 @@ public abstract class SetupPageFragment extends Fragment { @@ -45,8 +44,6 @@ public abstract class SetupPageFragment extends Fragment {
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setRetainInstance(true); setRetainInstance(true);
@ -835,7 +796,7 @@ index b0df440..33c61c7 100644
@Override @Override
diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java diff --git a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
index 9f3b27a..bcc4425 100644 index d371bff..6cc651a 100644
--- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java --- a/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
+++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java +++ b/src/com/cyanogenmod/setupwizard/ui/SetupWizardActivity.java
@@ -45,7 +45,6 @@ import android.widget.ProgressBar; @@ -45,7 +45,6 @@ import android.widget.ProgressBar;
@ -854,7 +815,7 @@ index 9f3b27a..bcc4425 100644
sLaunchTime = System.nanoTime(); sLaunchTime = System.nanoTime();
} }
setContentView(R.layout.setup_main); setContentView(R.layout.setup_main);
@@ -371,9 +369,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks, @@ -361,9 +359,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
@Override @Override
public void finishSetup() { public void finishSetup() {
if (!mIsFinishing) { if (!mIsFinishing) {
@ -864,7 +825,7 @@ index 9f3b27a..bcc4425 100644
final SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication(); final SetupWizardApp setupWizardApp = (SetupWizardApp)getApplication();
setupWizardApp.sendStickyBroadcastAsUser( setupWizardApp.sendStickyBroadcastAsUser(
new Intent(SetupWizardApp.ACTION_FINISHED), new Intent(SetupWizardApp.ACTION_FINISHED),
@@ -463,7 +458,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks, @@ -453,7 +448,6 @@ public class SetupWizardActivity extends Activity implements SetupDataCallbacks,
} }
final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this); final ThemeManager tm = ThemeManager.getInstance(SetupWizardActivity.this);
tm.unregisterThemeChangeListener(SetupWizardActivity.this); tm.unregisterThemeChangeListener(SetupWizardActivity.this);

View File

@ -9,7 +9,7 @@
#rm -rf build vendor/cm device/motorola/clark device/oneplus/bacon device/lge/mako kernel/lge/mako kernel/oneplus/msm8974 kernel/motorola/msm8992 packages/apps/Settings frameworks/base build system/core external/sqlite packages/apps/Nfc packages/apps/Settings packages/apps/FDroid packages/apps/FDroidPrivilegedExtension packages/apps/GmsCore packages/apps/GsfProxy packages/apps/FakeStore kernel/lge/hammerhead kernel/moto/shamu bootable/recovery packages/apps/CMParts packages/apps/SetupWizard #rm -rf build vendor/cm device/motorola/clark device/oneplus/bacon device/lge/mako kernel/lge/mako kernel/oneplus/msm8974 kernel/motorola/msm8992 packages/apps/Settings frameworks/base build system/core external/sqlite packages/apps/Nfc packages/apps/Settings packages/apps/FDroid packages/apps/FDroidPrivilegedExtension packages/apps/GmsCore packages/apps/GsfProxy packages/apps/FakeStore kernel/lge/hammerhead kernel/moto/shamu bootable/recovery packages/apps/CMParts packages/apps/SetupWizard
#Start a build #Start a build
#repo sync -j24 --force-sync && sh ../../Scripts/LAOS-14.1_Patches.sh && source device/motorola/clark/setup-makefiles.sh && source build/envsetup.sh && export WITH_SU=true && export ANDROID_HOME="/home/tad/Android/SDK" && export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m" && export OTA_PACKAGE_SIGNING_KEY=../../Signing_Keys/releasekey && export SIGNING_KEY_DIR=../../Signing_Keys && brunch clark && brunch bacon && brunch mako #repo sync -j24 --force-sync && sh ../../Scripts/LAOS-14.1_Patches.sh && source device/motorola/clark/setup-makefiles.sh && source build/envsetup.sh && export WITH_SU=true && export ANDROID_HOME="/home/tad/Android/SDK" && export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096m" && export OTA_PACKAGE_SIGNING_KEY=../../Signing_Keys/releasekey && export SIGNING_KEY_DIR=../../Signing_Keys && brunch clark && brunch bacon && brunch mako && brunch thor
# #
#START OF PREPRATION #START OF PREPRATION
@ -73,7 +73,7 @@ enter "packages/apps/GmsCore"
patch -p1 < $patches"android_packages_apps_GmsCore/0001-Fixes.patch" #Update output paths and build tools patch -p1 < $patches"android_packages_apps_GmsCore/0001-Fixes.patch" #Update output paths and build tools
enter "packages/apps/GsfProxy" enter "packages/apps/GsfProxy"
#patch -p1 < $patches"android_packages_apps_GsfProxy/0001-Fixes.patch" #Update output paths and build tools patch -p1 < $patches"android_packages_apps_GsfProxy/0001-Fixes.patch" #Update output paths and build tools
enter "packages/apps/FakeStore" enter "packages/apps/FakeStore"
patch -p1 < $patches"android_packages_apps_FakeStore/0001-Fixes.patch" #Update output paths and build tools patch -p1 < $patches"android_packages_apps_FakeStore/0001-Fixes.patch" #Update output paths and build tools
@ -104,17 +104,14 @@ patch -p1 < $patches"android_vendor_cm/0002-Monochromium.patch" #Add Chromium we
enter "packages/apps/CMParts" enter "packages/apps/CMParts"
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CMParts refs/changes/15/113415/6 && git cherry-pick FETCH_HEAD #Network Traffic git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CMParts refs/changes/15/113415/6 && git cherry-pick FETCH_HEAD #Network Traffic
git revert 9b59f2772e6b2472c6525a9e47756be6fe224ecd 5b40a9be9e8bb3e5dee428c442cf7451a1d14c0c 4675ff3e918eba2156338753d81fbfb8351f077e fed965cd2980b3cab5d950f38921191d83b3c23d 3e7c02893affcd217d16bac9400ee361613b0692 ae1f124858943f7d99e9eb1e100e01297da5cc52 #revert stat changes patch -p1 < $patches"android_packages_apps_CMParts/0001-Remove_Analytics.patch" #Remove analytics
patch -p1 < $patches"android_packages_apps_CMParts/0001-Remove_Analytics.patch" #Remove analytics FIXME: Rebase
enter "packages/apps/SetupWizard" enter "packages/apps/SetupWizard"
git revert 52a78fd21c8d23bd9cecd393a03b8f36f1fd1cdd #rebase
patch -p1 < $patches"android_packages_apps_SetupWizard/0001-Remove_Analytics.patch" #Remove analytics patch -p1 < $patches"android_packages_apps_SetupWizard/0001-Remove_Analytics.patch" #Remove analytics
enter "frameworks/base" enter "frameworks/base"
git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/75/151975/2 && git cherry-pick FETCH_HEAD #Network Traffic git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/75/151975/2 && git cherry-pick FETCH_HEAD #Network Traffic
git revert 2aaa0472da8d254da1f07aa65a664012b52410f4 #re-enable doze on devices without gms git revert 2aaa0472da8d254da1f07aa65a664012b52410f4 #re-enable doze on devices without gms
#patch -p1 < $patches"android_frameworks_base/0001-Userspace_Location.patch" #Allow location providers outside of /system (MicroG/UnifiedNLP) XXX: This is insecure
#patch -p1 < $patches"android_frameworks_base/0002-Failed_Unlock_Shutdown.patch" #Shutdown after five failed unlock attempts FIXME: Update shutdown() to match new args #patch -p1 < $patches"android_frameworks_base/0002-Failed_Unlock_Shutdown.patch" #Shutdown after five failed unlock attempts FIXME: Update shutdown() to match new args
patch -p1 < $patches"android_frameworks_base/0003-Signature_Spoofing.patch" #Allow packages to spoof their signature (MicroG) patch -p1 < $patches"android_frameworks_base/0003-Signature_Spoofing.patch" #Allow packages to spoof their signature (MicroG)
patch -p1 < $patches"android_frameworks_base/0004-Hide_Passwords.patch" #Hide passwords by default patch -p1 < $patches"android_frameworks_base/0004-Hide_Passwords.patch" #Hide passwords by default
@ -128,9 +125,7 @@ rm core/res/res/values/config.xml.orig core/res/res/values/strings.xml.orig core
#START OF DEVICE CHANGES #START OF DEVICE CHANGES
# #
enter "device/motorola/clark" enter "device/motorola/clark"
#git fetch https://review.lineageos.org/LineageOS/android_device_motorola_clark refs/changes/75/23575/3 && git cherry-pick FETCH_HEAD #sepolicies patch -p1 < $patches"android_device_motorola_clark/0002-Remove_Sprint_DM.patch" #Removes Sprint Device Manager
git revert e80d30e3968308cd2941b893608279220dfcf34f #don't add more sprint blobs
patch -p1 < $patches"android_device_motorola_clark/0002-Remove_Sprint_DM.patch" #Removes Sprint Device Manager FIXME: Rebase
patch -p1 < $patches"android_device_motorola_clark/0003-Enable_Dex_Preopt.patch" #Force enables dex pre-optimization patch -p1 < $patches"android_device_motorola_clark/0003-Enable_Dex_Preopt.patch" #Force enables dex pre-optimization
patch -p1 < $patches"android_device_motorola_clark/0004-Remove_Widevine.patch" #Removes Google Widevine and disables the DRM server patch -p1 < $patches"android_device_motorola_clark/0004-Remove_Widevine.patch" #Removes Google Widevine and disables the DRM server
#patch -p1 < $patches"android_device_motorola_clark/0005-TWRP.patch" #Add TWRP support #patch -p1 < $patches"android_device_motorola_clark/0005-TWRP.patch" #Add TWRP support