Rebrand for Adhoc

Signed-off-by: Velsoth <velsoth@adhoc.zone>
This commit is contained in:
Fivel Sotheby 2019-11-15 16:08:30 +00:00
parent 803cc9787f
commit 61e51943de
9 changed files with 2 additions and 172 deletions

BIN
res/drawable-hdpi/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
res/drawable-mdpi/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
res/drawable-xhdpi/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2017 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="320dp"
android:viewportWidth="512"
android:viewportHeight="320">
<path
android:fillColor="@color/accent"
android:pathData="M157.89,271.64a1.83,1.83,0,0,1-1.89-1.89V248.42h4.65v19.32H171v3.9Z" />
<path
android:fillColor="@color/accent"
android:pathData="M185,271.64V248.42h4.68v23.22Z" />
<path
android:fillColor="@color/accent"
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
,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
.39 ,5.91,5.91,0,0,1,1.41,1.56l9.72,13.59Z" />
<path
android:fillColor="@color/accent"
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" />
<path
android:fillColor="@color/accent"
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" />
<path
android:fillColor="@color/accent"
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" />
<path
android:fillColor="@color/accent"
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" />
<path
android:fillColor="@color/accent"
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
.38 a293.48,293.48,0,0,0-45.67,13.76l-1.5 .6
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" />
</vector>

View File

@ -38,19 +38,6 @@
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"
android:orientation="horizontal" android:orientation="horizontal"
@ -103,42 +90,6 @@
</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">LineageOS</string> <string name="os_name" translatable="false">Adhoc</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">LineageOS features</string> <string name="setup_services" translatable="false">Adhoc 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,7 +55,6 @@ 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";
@ -131,21 +130,10 @@ 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(
@ -193,11 +181,9 @@ 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;
@ -206,15 +192,6 @@ 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) {
@ -244,30 +221,6 @@ 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);
@ -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); mDefaultThemeRow = mRootView.findViewById(R.id.theme);
mHideThemeRow = hideThemeSwitch(getActivity()); mHideThemeRow = hideThemeSwitch(getActivity());
if (mHideThemeRow) { if (mHideThemeRow) {
@ -350,19 +290,9 @@ 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();