Revert "Rebrand for Replicant"

This reverts commit 0a041cf37a.

Signed-off-by: Velsoth <velsoth@adhoc.zone>
This commit is contained in:
Fivel Sotheby 2019-11-15 15:47:32 +00:00
parent db62df3c71
commit 803cc9787f
5 changed files with 153 additions and 150 deletions

View File

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Copyright (c) 2011 Mirella Vedovetto Copyright (c) 2017 The LineageOS Project
Copyright (c) 2012 Paul Kocialkowski
Copyright (c) 2017 Wolfgang Wiedmeyer
This work is licensed under the Creative Commons Attribution-ShareAlike Licensed under the Apache License, Version 2.0 (the "License");
3.0 Unported License. To view a copy of this license, visit you may not use this file except in compliance with the License.
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to You may obtain a copy of the License at
Creative Commons, 444 Castro Street, Suite 900, Mountain View,
California, 94041, USA. http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
@ -17,153 +15,37 @@
limitations under the License. limitations under the License.
--> -->
<vector xmlns:android="http://schemas.android.com/apk/res/android" <vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="505.60703dp" android:width="512dp"
android:height="805.48474dp" android:height="320dp"
android:viewportWidth="505.60703" android:viewportWidth="512"
android:viewportHeight="805.48474"> android:viewportHeight="320">
<path <path
android:fillColor="#ff0000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M157.89,271.64a1.83,1.83,0,0,1-1.89-1.89V248.42h4.65v19.32H171v3.9Z" />
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" />
<path <path
android:fillColor="#ffffff" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M185,271.64V248.42h4.68v23.22Z" />
android:strokeWidth="1.33132184"
android:pathData="M332.261,143.257 C332.261,143.257,347.054,143.257,347.054,158.262
C347.054,173.267,332.261,173.267,332.261,173.267
C332.261,173.267,317.468,173.267,317.468,158.262
C317.468,143.257,333.048,143.755,332.261,143.257 Z" />
<path <path
android:strokeColor="#ffffff" android:fillColor="@color/accent"
android:strokeWidth="3.5743742" android:pathData="M221.17,248.42h4.26v22a1.23,1.23,0,0,1-.67,1.09,3.17,3.17,0,0,1-1.67 .41
android:pathData="M255.464,180.956 C315.464,240.956,395.464,240.956,395.464,240.956 ,4,4,0,0,1-1.71-.29,3.11,3.11,0,0,1-1.12-1L210,256v15.61h-4.32v-21.5a1.56,1.56,0,0,1,.68-1.4,3.18,3.18,0,0,1,1.79-.46,3.59,3.59,0,0,1,1.9
L395.464,240.956" /> .39 ,5.91,5.91,0,0,1,1.41,1.56l9.72,13.59Z" />
<path <path
android:fillColor="#ff0000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M256.9,252.36H246.2v5.5h9.63v3.93H246.2v5.89H256.6v4H241.51V250.31a1.74,1.74,0,0,1,.59-1.37,2,2,0,0,1,1.4-.52h13.4Z" />
android:strokeWidth="3.5743742"
android:pathData="M60.2857,391.135 L217.907,327.452
C217.907,327.452,241.976,306.942,230.738,279.126
C219.5,251.31,187.939,254.466,187.939,254.466 L30.3172,316.961
C30.3172,316.961,6.2477,337.471,17.4859,365.286
C28.7241,393.102,61.1127,391.669,60.2857,391.135 Z" />
<path <path
android:fillColor="#ff0000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M286.38,271.64l-2-5.76h-8.49l-2,5.76h-4.85l7.87-21.5q.68-1.85,3.15-1.85t3.19,1.89l7.87,21.46ZM277.27,262h5.82l-2.93-8.62Z" />
android:strokeWidth="3.5743742"
android:pathData="M217.854,429.28 L100.404,552.184
C100.404,552.184,86.9072,580.782,108.596,601.508
C130.285,622.234,158.241,607.454,158.241,607.454 L275.691,484.55
C275.691,484.55,289.188,455.952,267.499,435.226
C245.81,414.5,216.881,429.134,217.854,429.28 Z" />
<path <path
android:fillColor="#000000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M314.33,272a11,11,0,0,1-8.36-3.19,11.93,11.93,0,0,1-3.06-8.62,12.12,12.12,0,0,1,3.25-8.89,11.56,11.56,0,0,1,8.62-3.3,11.44,11.44,0,0,1,6,1.5,9,9,0,0,1,3.63,3.93l-3.74,2q-1.69-3.41-6-3.41a6.53,6.53,0,0,0-5.14,2.16,8.58,8.58,0,0,0-1.92,5.9,8.67,8.67,0,0,0,1.79,5.8,6.11,6.11,0,0,0,4.91,2.1,6.74,6.74,0,0,0,4.6-1.58,5.26,5.26,0,0,0,1.87-4h-5.89v-3.67h10.5v2.57a10.19,10.19,0,0,1-3.12,7.72A11.12,11.12,0,0,1,314.33,272Z" />
android:strokeWidth="3.5741291"
android:pathData="M92.7915,551.248 C82.6647,551.007,73.3921,559.596,72.8498,569.709
C71.8303,579.799,79.6957,589.704,89.7457,591.017
C94.268,590.032,92.3738,594.916,93.8423,597.662
C96.4192,605.617,104.421,611.38,112.791,611.247
C112.55,621.374,121.139,630.646,131.252,631.189
C141.342,632.209,151.247,624.343,152.56,614.293
C154.299,604.473,147.489,594.161,137.789,591.877
C134.693,591.343,131.764,591.77,132.478,587.707
C130.99,578.421,122.198,571.056,112.79,571.247
C112.986,560.455,103.594,551.052,92.79,551.247 Z" />
<path <path
android:fillColor="#ff0000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M356,252.36H345.3v5.5h9.63v3.93H345.3v5.89h10.41v4H340.62V250.31a1.74,1.74,0,0,1,.59-1.37,2,2,0,0,1,1.4-.52H356Z" />
android:strokeWidth="3.5743742"
android:pathData="M85.0297,253.442 C84.978,253.858,85.0293,454.567,85.0293,494.567
C85.0293,534.567,145.029,534.567,145.029,534.567
C145.029,534.567,245.029,534.567,245.029,534.567 L245.029,533.411
C264.916,533.411,338.435,533.411,338.435,533.411
C338.435,533.411,397.759,533.407,397.759,493.411
C397.759,453.415,397.814,253.858,397.759,253.442
C289.86,253.442,182.823,253.442,85.029,253.442 Z" />
<path <path
android:fillColor="#ff0000" android:fillColor="@color/accent"
android:strokeColor="#ffffff" android:pathData="M416,128a39.92,39.92,0,0,0-31.11,14.87l-1.5-.6A294.79,294.79,0,0,0,336,128.14s0-.09,0-.14a80,80,0,1,0-160,0s0,.09,0,.13l-1.72
android:strokeWidth="3.5743742" .38 a293.48,293.48,0,0,0-45.67,13.76l-1.5 .6
android:pathData="M239.005,442.14 L239.005,612.14 C239.005,612.14,249.005,642.14,279.005,642.14 a40,40,0,1,0,7.39,14.28h0a277.33,277.33,0,0,1,43.1-13,80,80,0,0,0,156.73,0,277.3,277.3,0,0,1,43.11,13h0A40,40,0,1,0,416,128ZM96,192a24,24,0,1,1,24-24A24,24,0,0,1,96,192Zm160,0a64,64,0,1,1,64-64A64.07,64.07,0,0,1,256,192Zm160,0a24,24,0,1,1,24-24A24,24,0,0,1,416,192ZM288,128a32,32,0,1,1-32-32A32,32,0,0,1,288,128Z" />
C309.005,642.14,319.005,612.14,319.005,612.14 L319.005,442.14
C319.005,442.14,309.005,412.14,279.005,412.14
C249.005,412.14,238.2,442.707,239.005,442.14 Z" />
<path
android:fillColor="#000000"
android:strokeColor="#ffffff"
android:strokeWidth="3.5741291"
android:pathData="M248.916,616.435 C237.87,616.435,228.916,625.389,228.916,636.435
C228.916,647.481,237.87,656.435,248.916,656.435
C255.467,656.435,261.237,653.271,264.885,648.404
C268.532,653.28,274.359,656.435,280.916,656.435
C286.899,656.435,292.22,653.787,295.885,649.622
C299.55,653.795,304.925,656.434,310.916,656.434
C321.962,656.434,330.916,647.48,330.916,636.434
C330.916,625.388,321.962,616.434,310.916,616.434
C304.928,616.434,299.55,619.077,295.885,623.246
C292.22,619.085,286.897,616.433,280.916,616.433
C274.359,616.433,268.532,619.589,264.885,624.464
C261.237,619.597,255.467,616.433,248.916,616.433 Z" />
<path
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" />
<path
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" />
<path
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" />
<path
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" />
<path
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" />
<path
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" />
<path
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" />
</vector> </vector>

View File

@ -38,6 +38,18 @@
android:layout_height="match_parent" android:layout_height="match_parent"
style="@style/PageContent"> style="@style/PageContent">
<!-- The caption about privacy policy -->
<TextView
android:id="@+id/privacy_policy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="15sp"
android:layout_marginBottom="@dimen/summary_margin_bottom"
android:paddingLeft="@dimen/content_margin_left"
android:paddingRight="@dimen/content_margin_right"
style="@style/PageSummaryText"
android:text="@string/services_explanation"
android:clickable="true"/>
<LinearLayout <LinearLayout
android:id="@+id/killswitch" android:id="@+id/killswitch"
@ -91,6 +103,42 @@
</LinearLayout> </LinearLayout>
<!-- Whether or not to enable metrics -->
<LinearLayout
android:id="@+id/metrics"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/location_margin_left"
android:paddingRight="@dimen/content_margin_right"
android:background="?android:attr/selectableItemBackground"
android:clickable="true">
<CheckBox
android:id="@+id/enable_metrics_checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_marginTop="5dp"
android:duplicateParentState="true"
android:clickable="false"/>
<TextView
android:id="@+id/enable_metrics_summary"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="15sp"
android:lineSpacingExtra="@dimen/setup_line_spacing"
android:gravity="top"
android:layout_marginLeft="@dimen/location_text_margin_left"
android:layout_marginRight="@dimen/location_text_margin_right"
android:paddingBottom="@dimen/content_margin_bottom"
android:text="@string/services_metrics_label"/>
</LinearLayout>
<!-- Whether or not to enable default theme --> <!-- Whether or not to enable default theme -->
<LinearLayout <LinearLayout
android:id="@+id/theme" android:id="@+id/theme"

View File

@ -18,7 +18,7 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">Setup Wizard</string> <string name="app_name">Setup Wizard</string>
<string name="product_name" translatable="false">cyanogenmod</string> <string name="product_name" translatable="false">cyanogenmod</string>
<string name="os_name" translatable="false">Replicant</string> <string name="os_name" translatable="false">LineageOS</string>
<string name="default_theme_name" translatable="false">Material</string> <string name="default_theme_name" translatable="false">Material</string>
<string name="next">Next</string> <string name="next">Next</string>
@ -68,7 +68,7 @@
<string name="emergency_call">Emergency call</string> <string name="emergency_call">Emergency call</string>
<string name="setup_services" translatable="false">Replicant features</string> <string name="setup_services">LineageOS features</string>
<string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string> <string name="services_explanation" product="tablet">These services work for you to extend the capabilities of your tablet. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string> <string name="services_explanation" product="default">These services work for you to extend the capabilities of your phone. Data will be used in accordance with LineageOS\'s <xliff:g id="name" example="Privacy Policy">%s</xliff:g>.</string>
<string name="services_privacy_policy">Privacy Policy</string> <string name="services_privacy_policy">Privacy Policy</string>

View File

@ -55,6 +55,9 @@ public class CMSetupWizardData extends AbstractSetupData {
pages.add(new WelcomePage(mContext, this)); pages.add(new WelcomePage(mContext, this));
pages.add(new LocalePage(mContext, this)); pages.add(new LocalePage(mContext, this));
pages.add(new DateTimePage(mContext, this)); pages.add(new DateTimePage(mContext, this));
if (SetupWizardUtils.hasWifi(mContext)) {
pages.add(new WifiSetupPage(mContext, this));
}
if (SetupWizardUtils.hasTelephony(mContext)) { if (SetupWizardUtils.hasTelephony(mContext)) {
pages.add(new SimCardMissingPage(mContext, this) pages.add(new SimCardMissingPage(mContext, this)
.setHidden(isSimInserted())); .setHidden(isSimInserted()));

View File

@ -55,6 +55,7 @@ public class CyanogenSettingsPage extends SetupPage {
public static final String TAG = "CyanogenSettingsPage"; 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 DISABLE_NAV_KEYS = "disable_nav_keys";
public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme"; public static final String KEY_APPLY_DEFAULT_THEME = "apply_default_theme";
public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight"; public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight";
@ -130,10 +131,21 @@ public class CyanogenSettingsPage extends SetupPage {
} }
} }
}); });
handleEnableMetrics();
handleDefaultThemeSetup(); handleDefaultThemeSetup();
handlePrivacyGuard(); 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() { private void handleDefaultThemeSetup() {
Bundle privacyData = getData(); Bundle privacyData = getData();
if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals( if (!SetupWizardUtils.getDefaultThemePackageName(mContext).equals(
@ -181,9 +193,11 @@ public class CyanogenSettingsPage extends SetupPage {
private View mKillSwitchView; private View mKillSwitchView;
private TextView mKillSwitchTitle; private TextView mKillSwitchTitle;
private ImageView mKillSwitchStatus; private ImageView mKillSwitchStatus;
private View mMetricsRow;
private View mDefaultThemeRow; private View mDefaultThemeRow;
private View mNavKeysRow; private View mNavKeysRow;
private View mPrivacyGuardRow; private View mPrivacyGuardRow;
private CheckBox mMetrics;
private CheckBox mDefaultTheme; private CheckBox mDefaultTheme;
private CheckBox mNavKeys; private CheckBox mNavKeys;
private CheckBox mPrivacyGuard; private CheckBox mPrivacyGuard;
@ -192,6 +206,15 @@ public class CyanogenSettingsPage extends SetupPage {
private boolean mHideThemeRow = false; 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() { private View.OnClickListener mDefaultThemeClickListener = new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
@ -221,6 +244,30 @@ public class CyanogenSettingsPage extends SetupPage {
@Override @Override
protected void initializePage() { 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); mKillSwitchView = mRootView.findViewById(R.id.killswitch);
mKillSwitchTitle = (TextView)mRootView.findViewById(R.id.killswitch_title); mKillSwitchTitle = (TextView)mRootView.findViewById(R.id.killswitch_title);
mKillSwitchStatus = (ImageView)mRootView.findViewById(R.id.killswitch_check); mKillSwitchStatus = (ImageView)mRootView.findViewById(R.id.killswitch_check);
@ -236,6 +283,19 @@ 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); mDefaultThemeRow = mRootView.findViewById(R.id.theme);
mHideThemeRow = hideThemeSwitch(getActivity()); mHideThemeRow = hideThemeSwitch(getActivity());
if (mHideThemeRow) { if (mHideThemeRow) {
@ -290,9 +350,19 @@ public class CyanogenSettingsPage extends SetupPage {
public void onResume() { public void onResume() {
super.onResume(); super.onResume();
updateDisableNavkeysOption(); updateDisableNavkeysOption();
updateMetricsOption();
updateThemeOption(); 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() { private void updateThemeOption() {
if (!mHideThemeRow) { if (!mHideThemeRow) {
final Bundle myPageBundle = mPage.getData(); final Bundle myPageBundle = mPage.getData();