From 0a041cf37aad7b77779d80bed616d91512929216 Mon Sep 17 00:00:00 2001 From: Wolfgang Wiedmeyer Date: Sun, 9 Jul 2017 15:20:16 +0200 Subject: Rebrand for Replicant Metrics setup is removed. The Wi-Fi setup page is disabled because none of the currently supported devices have the internal Wi-Fi working. Signed-off-by: Wolfgang Wiedmeyer --- res/drawable/logo.xml | 178 +++++++++++++++++---- res/layout/setup_cyanogen_services.xml | 48 ------ res/values/strings.xml | 4 +- .../setupwizard/setup/CMSetupWizardData.java | 3 - .../setupwizard/setup/CyanogenSettingsPage.java | 70 -------- 5 files changed, 150 insertions(+), 153 deletions(-) diff --git a/res/drawable/logo.xml b/res/drawable/logo.xml index a17c0dd..b2ce0d3 100644 --- a/res/drawable/logo.xml +++ b/res/drawable/logo.xml @@ -1,12 +1,14 @@ + android:width="505.60703dp" + android:height="805.48474dp" + android:viewportWidth="505.60703" + android:viewportHeight="805.48474"> + android:fillColor="#ff0000" + android:strokeColor="#ffffff" + android:strokeWidth="3.5743742" + android:pathData="M217.51,55.3726 C215.662,55.503,213.88,56.7404,212.947,60.3726 +C211.034,67.8251,218.904,95.7329,222.697,108.404 +C216.336,108.83,210.266,109.481,204.478,110.373 L166.948,81.6538 +C166.948,81.6538,155.829,80.6998,159.51,89.9976 +C161.542,95.1305,173.954,105.857,184.729,114.529 +C81.904,142.443,85.0086,248.239,85.5415,248.341 L397.76,248.341 +C397.76,248.341,397.759,107.841,239.323,107.841 +C239.113,107.841,238.907,107.841,238.698,107.841 L223.886,58.0285 +C223.886,58.0285,220.592,55.155,217.511,55.3723 Z" /> + + + + + + + + + android:fillColor="#ff0000" + android:strokeColor="#ffffff" + android:strokeWidth="3.5743742" + android:pathData="M262.093,345.755 L419.714,409.438 +C419.714,409.438,451.276,411.404,462.514,383.589 +C473.752,355.773,449.683,335.263,449.683,335.263 L292.062,271.58 +C292.062,271.58,260.5,269.614,249.262,297.429 +C238.024,325.245,262.317,346.713,262.093,345.755 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.20051087" + android:pathData="M140.519,612.182 C140.737,616.333,135.138,618.839,132.188,615.911 +C128.866,613.251,130.914,607.268,135.166,607.195 +C137.968,606.926,140.59,609.368,140.52,612.182 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.11059568" + android:pathData="M117.721,593.184 C117.939,597.335,112.34,599.841,109.39,596.913 +C106.068,594.253,108.116,588.27,112.368,588.197 +C115.17,587.928,117.792,590.37,117.722,593.184 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.20051087" + android:pathData="M96.0941,571.416 C96.3122,575.567,90.7128,578.073,87.7627,575.145 +C84.4409,572.485,86.489,566.502,90.7404,566.429 +C93.5425,566.16,96.1644,568.602,96.0941,571.416 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.29042608" + android:pathData="M252.308,635.181 C252.48,638.891,247.9,641.518,244.784,639.497 +C241.41,637.736,241.571,632.287,245.04,630.725 +C248.212,628.976,252.427,631.558,252.308,635.181 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.20051087" + android:pathData="M286.705,636.88 C286.877,640.59,282.297,643.217,279.181,641.196 +C275.807,639.435,275.968,633.986,279.437,632.424 +C282.609,630.675,286.824,633.257,286.705,636.88 Z" /> + android:fillColor="#ffffff" + android:strokeColor="#ffffff" + android:strokeWidth="0.20051087" + android:pathData="M314.701,634.98 C314.873,638.69,310.293,641.317,307.177,639.296 +C303.803,637.535,303.964,632.086,307.433,630.524 +C310.605,628.775,314.82,631.357,314.701,634.98 Z" /> diff --git a/res/layout/setup_cyanogen_services.xml b/res/layout/setup_cyanogen_services.xml index 203376a..9547afc 100644 --- a/res/layout/setup_cyanogen_services.xml +++ b/res/layout/setup_cyanogen_services.xml @@ -38,18 +38,6 @@ android:layout_height="match_parent" style="@style/PageContent"> - - - - - - - - - - - - Setup Wizard cyanogenmod - LineageOS + Replicant Material Next @@ -68,7 +68,7 @@ Emergency call - LineageOS features + Replicant features These services work for you to extend the capabilities of your tablet. Data will be used in accordance with LineageOS\'s %s. These services work for you to extend the capabilities of your phone. Data will be used in accordance with LineageOS\'s %s. Privacy Policy diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index 5c90b4e..da86a23 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -55,9 +55,6 @@ public class CMSetupWizardData extends AbstractSetupData { pages.add(new WelcomePage(mContext, this)); pages.add(new LocalePage(mContext, this)); pages.add(new DateTimePage(mContext, this)); - if (SetupWizardUtils.hasWifi(mContext)) { - pages.add(new WifiSetupPage(mContext, this)); - } if (SetupWizardUtils.hasTelephony(mContext)) { pages.add(new SimCardMissingPage(mContext, this) .setHidden(isSimInserted())); diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java index 866371d..a52925f 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java @@ -55,7 +55,6 @@ public class CyanogenSettingsPage extends SetupPage { public static final String TAG = "CyanogenSettingsPage"; - public static final String KEY_SEND_METRICS = "send_metrics"; public static final String DISABLE_NAV_KEYS = "disable_nav_keys"; public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme"; public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight"; @@ -131,21 +130,10 @@ public class CyanogenSettingsPage extends SetupPage { } } }); - handleEnableMetrics(); handleDefaultThemeSetup(); handlePrivacyGuard(); } - private void handleEnableMetrics() { - Bundle privacyData = getData(); - if (privacyData != null - && privacyData.containsKey(KEY_SEND_METRICS)) { - CMSettings.Secure.putInt(mContext.getContentResolver(), - CMSettings.Secure.STATS_COLLECTION, privacyData.getBoolean(KEY_SEND_METRICS) - ? 1 : 0); - } - } - private void handleDefaultThemeSetup() { Bundle privacyData = getData(); if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals( @@ -193,11 +181,9 @@ public class CyanogenSettingsPage extends SetupPage { private View mKillSwitchView; private TextView mKillSwitchTitle; private ImageView mKillSwitchStatus; - private View mMetricsRow; private View mDefaultThemeRow; private View mNavKeysRow; private View mPrivacyGuardRow; - private CheckBox mMetrics; private CheckBox mDefaultTheme; private CheckBox mNavKeys; private CheckBox mPrivacyGuard; @@ -206,15 +192,6 @@ public class CyanogenSettingsPage extends SetupPage { private boolean mHideThemeRow = false; - private View.OnClickListener mMetricsClickListener = new View.OnClickListener() { - @Override - public void onClick(View view) { - boolean checked = !mMetrics.isChecked(); - mMetrics.setChecked(checked); - mPage.getData().putBoolean(KEY_SEND_METRICS, checked); - } - }; - private View.OnClickListener mDefaultThemeClickListener = new View.OnClickListener() { @Override public void onClick(View view) { @@ -244,30 +221,6 @@ public class CyanogenSettingsPage extends SetupPage { @Override protected void initializePage() { - String privacy_policy = getString(R.string.services_privacy_policy); - String policySummary = getString(R.string.services_explanation, privacy_policy); - SpannableString ss = new SpannableString(policySummary); - ClickableSpan clickableSpan = new ClickableSpan() { - @Override - public void onClick(View textView) { - // At this point of the setup, the device has already been unlocked (if frp - // had been enabled), so there should be no issues regarding security - final Intent intent = new Intent(Intent.ACTION_VIEW, - Uri.parse(PRIVACY_POLICY_URI)); - try { - getActivity().startActivity(intent); - } catch (Exception e) { - Log.e(TAG, "Unable to start activity " + intent.toString(), e); - } - } - }; - ss.setSpan(clickableSpan, - policySummary.length() - privacy_policy.length() - 1, - policySummary.length() - 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); - TextView privacyPolicy = (TextView) mRootView.findViewById(R.id.privacy_policy); - privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance()); - privacyPolicy.setText(ss); - mKillSwitchView = mRootView.findViewById(R.id.killswitch); mKillSwitchTitle = (TextView)mRootView.findViewById(R.id.killswitch_title); mKillSwitchStatus = (ImageView)mRootView.findViewById(R.id.killswitch_check); @@ -283,19 +236,6 @@ public class CyanogenSettingsPage extends SetupPage { } } - mMetricsRow = mRootView.findViewById(R.id.metrics); - mMetricsRow.setOnClickListener(mMetricsClickListener); - String metricsHelpImproveCM = - getString(R.string.services_help_improve_cm, getString(R.string.os_name)); - String metricsSummary = getString(R.string.services_metrics_label, - metricsHelpImproveCM, getString(R.string.os_name)); - final SpannableStringBuilder metricsSpan = new SpannableStringBuilder(metricsSummary); - metricsSpan.setSpan(new android.text.style.StyleSpan(android.graphics.Typeface.BOLD), - 0, metricsHelpImproveCM.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); - TextView metrics = (TextView) mRootView.findViewById(R.id.enable_metrics_summary); - metrics.setText(metricsSpan); - mMetrics = (CheckBox) mRootView.findViewById(R.id.enable_metrics_checkbox); - mDefaultThemeRow = mRootView.findViewById(R.id.theme); mHideThemeRow = hideThemeSwitch(getActivity()); if (mHideThemeRow) { @@ -350,19 +290,9 @@ public class CyanogenSettingsPage extends SetupPage { public void onResume() { super.onResume(); updateDisableNavkeysOption(); - updateMetricsOption(); updateThemeOption(); } - private void updateMetricsOption() { - final Bundle myPageBundle = mPage.getData(); - boolean metricsChecked = - !myPageBundle.containsKey(KEY_SEND_METRICS) || myPageBundle - .getBoolean(KEY_SEND_METRICS); - mMetrics.setChecked(metricsChecked); - myPageBundle.putBoolean(KEY_SEND_METRICS, metricsChecked); - } - private void updateThemeOption() { if (!mHideThemeRow) { final Bundle myPageBundle = mPage.getData(); -- cgit v1.1