From 1326644f0e695266010461ba80543eba403c64e5 Mon Sep 17 00:00:00 2001 From: Tad Date: Wed, 28 Feb 2018 08:12:03 -0500 Subject: [PATCH] Remove analytics Change-Id: I189e9362c828569512e819cf655b03bfa3436830 --- res/layout/setup_lineage_settings.xml | 36 ------------------- .../lineageos/setupwizard/FinishActivity.java | 12 ------- .../setupwizard/LineageSettingsActivity.java | 31 ---------------- .../lineageos/setupwizard/SetupWizardApp.java | 1 - 4 files changed, 80 deletions(-) diff --git a/res/layout/setup_lineage_settings.xml b/res/layout/setup_lineage_settings.xml index b75af3c..15c2755 100644 --- a/res/layout/setup_lineage_settings.xml +++ b/res/layout/setup_lineage_settings.xml @@ -51,42 +51,6 @@ android:text="@string/services_explanation" android:clickable="true"/> - - - - - - - - - - { - boolean checked = !mMetrics.isChecked(); - mMetrics.setChecked(checked); - mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, checked); - }; - private View.OnClickListener mNavKeysClickListener = view -> { boolean checked = !mNavKeys.isChecked(); mNavKeys.setChecked(checked); @@ -101,19 +93,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance()); privacyPolicy.setText(ss); - View metricsRow = findViewById(R.id.metrics); - metricsRow.setOnClickListener(mMetricsClickListener); - String metricsHelpImproveLineage = - getString(R.string.services_help_improve_cm, getString(R.string.os_name)); - String metricsSummary = getString(R.string.services_metrics_label, - metricsHelpImproveLineage, getString(R.string.os_name)); - final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary); - metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), - 0, metricsHelpImproveLineage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - TextView metrics = (TextView) findViewById(R.id.enable_metrics_summary); - metrics.setText(metricsSpan); - mMetrics = (CheckBox) findViewById(R.id.enable_metrics_checkbox); - View navKeysRow = findViewById(R.id.nav_keys); navKeysRow.setOnClickListener(mNavKeysClickListener); mNavKeys = (CheckBox) findViewById(R.id.nav_keys_checkbox); @@ -130,7 +109,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { public void onResume() { super.onResume(); updateDisableNavkeysOption(); - updateMetricsOption(); } @Override @@ -154,15 +132,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity { return R.drawable.ic_features; } - private void updateMetricsOption() { - final Bundle myPageBundle = mSetupWizardApp.getSettingsBundle(); - boolean metricsChecked = - !myPageBundle.containsKey(KEY_SEND_METRICS) || myPageBundle - .getBoolean(KEY_SEND_METRICS); - mMetrics.setChecked(metricsChecked); - myPageBundle.putBoolean(KEY_SEND_METRICS, metricsChecked); - } - private void updateDisableNavkeysOption() { if (mSupportsKeyDisabler) { final Bundle myPageBundle = mSetupWizardApp.getSettingsBundle(); diff --git a/src/org/lineageos/setupwizard/SetupWizardApp.java b/src/org/lineageos/setupwizard/SetupWizardApp.java index 88581cf..757e0b1 100644 --- a/src/org/lineageos/setupwizard/SetupWizardApp.java +++ b/src/org/lineageos/setupwizard/SetupWizardApp.java @@ -63,7 +63,6 @@ public class SetupWizardApp extends Application { public static final String EXTRA_IS_SETUP_FLOW = "isSetupFlow"; public static final String KEY_DETECT_CAPTIVE_PORTAL = "captive_portal_detection_enabled"; - public static final String KEY_SEND_METRICS = "send_metrics"; public static final String DISABLE_NAV_KEYS = "disable_nav_keys"; public static final String ENABLE_RECOVERY_UPDATE = "enable_recovery_update"; public static final String UPDATE_RECOVERY_PROP = "persist.vendor.recovery_update"; -- 2.30.2