15.1: Initial building support

This commit is contained in:
Tad 2018-02-12 04:57:49 -05:00
parent b02d40974c
commit e16aa10199
6 changed files with 205 additions and 22 deletions

View File

@ -6,7 +6,7 @@ Changelogs - GPLv3
Manifests - GPLv3
Misc - GPLv3
Patches/Android - Apache-2.0
Patches/LineageOS-14.1/
Patches/LineageOS-*/
android_packages_apps_FDroid* - GPLv2
android_packages_apps_Silence - GPLv2
android_kernel_* - GPLv2

View File

@ -0,0 +1,193 @@
From 2d5570d86d6eb950247a5b4792840c1626eaea94 Mon Sep 17 00:00:00 2001
From: Tad <tad@spotco.us>
Date: Wed, 18 Oct 2017 11:54:48 -0400
Subject: [PATCH] Remove analytics
Change-Id: I044dd6b137b8a1d4a6dde3a63c0aaa454309341f
---
res/layout/setup_lineage_settings.xml | 36 ----------------------
.../cyanogenmod/setupwizard/FinishActivity.java | 12 --------
.../setupwizard/LineageSettingsActivity.java | 35 ---------------------
.../cyanogenmod/setupwizard/SetupWizardApp.java | 1 -
4 files changed, 84 deletions(-)
diff --git a/res/layout/setup_lineage_settings.xml b/res/layout/setup_lineage_settings.xml
index 42b4c2d..5792c06 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"/>
- <!-- 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>
-
<!-- Checkbox for using on-screen nav keys -->
<LinearLayout
android:id="@+id/nav_keys"
diff --git a/src/com/cyanogenmod/setupwizard/FinishActivity.java b/src/com/cyanogenmod/setupwizard/FinishActivity.java
index cd25811..f927f46 100644
--- a/src/com/cyanogenmod/setupwizard/FinishActivity.java
+++ b/src/com/cyanogenmod/setupwizard/FinishActivity.java
@@ -21,7 +21,6 @@ import static com.cyanogenmod.setupwizard.SetupWizardApp.DISABLE_NAV_KEYS;
import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_APPLY_DEFAULT_THEME;
import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_BUTTON_BACKLIGHT;
import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_PRIVACY_GUARD;
-import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_SEND_METRICS;
import static com.cyanogenmod.setupwizard.SetupWizardApp.LOGV;
import android.animation.Animator;
@@ -174,7 +173,6 @@ public class FinishActivity extends BaseSetupWizardActivity {
mEnableAccessibilityController.onDestroy();
}
handlePrivacyGuard(mSetupWizardApp);
- handleEnableMetrics(mSetupWizardApp);
handleNavKeys(mSetupWizardApp);
final WallpaperManager wallpaperManager =
WallpaperManager.getInstance(mSetupWizardApp);
@@ -185,16 +183,6 @@ public class FinishActivity extends BaseSetupWizardActivity {
startActivityForResult(intent, NEXT_REQUEST);
}
- private static void handleEnableMetrics(SetupWizardApp setupWizardApp) {
- Bundle privacyData = setupWizardApp.getSettingsBundle();
- if (privacyData != null
- && privacyData.containsKey(KEY_SEND_METRICS)) {
- CMSettings.Secure.putInt(setupWizardApp.getContentResolver(),
- CMSettings.Secure.STATS_COLLECTION, privacyData.getBoolean(KEY_SEND_METRICS)
- ? 1 : 0);
- }
- }
-
private static void handlePrivacyGuard(SetupWizardApp setupWizardApp) {
Bundle mPrivacyData = setupWizardApp.getSettingsBundle();
if (mPrivacyData != null && mPrivacyData.containsKey(KEY_PRIVACY_GUARD)) {
diff --git a/src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java b/src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java
index b222c72..5bf8d9f 100644
--- a/src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java
+++ b/src/com/cyanogenmod/setupwizard/LineageSettingsActivity.java
@@ -20,7 +20,6 @@ package com.cyanogenmod.setupwizard;
import static com.cyanogenmod.setupwizard.SetupWizardApp.DISABLE_NAV_KEYS;
import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_APPLY_DEFAULT_THEME;
import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_PRIVACY_GUARD;
-import static com.cyanogenmod.setupwizard.SetupWizardApp.KEY_SEND_METRICS;
import android.app.Activity;
import android.content.Context;
@@ -57,24 +56,13 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
private SetupWizardApp mSetupWizardApp;
- private View mMetricsRow;
private View mNavKeysRow;
private View mPrivacyGuardRow;
- private CheckBox mMetrics;
private CheckBox mNavKeys;
private CheckBox mPrivacyGuard;
private boolean mHideNavKeysRow = false;
- private View.OnClickListener mMetricsClickListener = new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- boolean checked = !mMetrics.isChecked();
- mMetrics.setChecked(checked);
- mSetupWizardApp.getSettingsBundle().putBoolean(KEY_SEND_METRICS, checked);
- }
- };
-
private View.OnClickListener mNavKeysClickListener = new View.OnClickListener() {
@Override
public void onClick(View view) {
@@ -122,19 +110,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
privacyPolicy.setMovementMethod(LinkMovementMethod.getInstance());
privacyPolicy.setText(ss);
- mMetricsRow = 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) findViewById(R.id.enable_metrics_summary);
- metrics.setText(metricsSpan);
- mMetrics = (CheckBox) findViewById(R.id.enable_metrics_checkbox);
-
mNavKeysRow = findViewById(R.id.nav_keys);
mNavKeysRow.setOnClickListener(mNavKeysClickListener);
mNavKeys = (CheckBox) findViewById(R.id.nav_keys_checkbox);
@@ -163,7 +138,6 @@ public class LineageSettingsActivity extends BaseSetupWizardActivity {
public void onResume() {
super.onResume();
updateDisableNavkeysOption();
- updateMetricsOption();
updatePrivacyGuardOption();
}
@@ -198,15 +172,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 (!mHideNavKeysRow) {
final Bundle myPageBundle = mSetupWizardApp.getSettingsBundle();
diff --git a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
index f10a917..f916f5b 100644
--- a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
+++ b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java
@@ -59,7 +59,6 @@ public class SetupWizardApp extends Application {
public static final String EXTRA_RESULT_CODE = "com.android.setupwizard.ResultCode";
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 KEY_APPLY_DEFAULT_THEME = "apply_default_theme";
public static final String KEY_BUTTON_BACKLIGHT = "pre_navbar_button_backlight";
--
2.14.2

View File

@ -370,16 +370,6 @@ rm -rf vendor/samsung/nodevice;
#END OF DEBLOBBING
#
#Fixes marlin building, really janky (recursive symlinks) and probably not the best place for it [LAOS SPECIFIC]
cd vendor/google/marlin/proprietary;
ln -s . vendor;
ln -s . lib/lib;
ln -s . lib64/lib64;
ln -s . app/app;
ln -s . bin/bin;
ln -s . etc/etc;
ln -s . framework/framework;
ln -s . priv-app/priv-app;
cd $base;
echo "Deblobbing complete!"

View File

@ -58,7 +58,7 @@ export -f buildDevice;
buildAll() {
#Select devices are userdebug due to SELinux policy issues
#TODO: Add victara, griffin, athene, us997, us996, pme, t0lte, hlte
buildDevice d852
brunch lineage_d852-userdebug;
}
export -f buildAll;

View File

@ -58,8 +58,8 @@ echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/a
cp -r $patches"Fennec_DOS-Shim" $base"packages/apps/"; #Add a shim to install Fennec DOS without actually including the large APK
enterAndClear "build/make"
patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0
patch -p1 < $patches"android_build/0002-JustArchis_Optimizations-Rebased.patch" #JustArchi's Compiler Flags XXX: Breaks some devices, see buildAllN03()
#patch -p1 < $patches"android_build/0001-Automated_Build_Signing.patch" #Automated build signing. Disclaimer: From CopperheadOS 13.0 TODO: Rebase
#patch -p1 < $patches"android_build/0002-JustArchis_Optimizations.patch" #JustArchi's Compiler Flags XXX: Breaks some devices, see buildAllN03() TODO: Rebase
sed -i 's/messaging/Silence/' target/product/*.mk; #Replace AOSP Messaging app with Silence
enterAndClear "device/qcom/sepolicy"
@ -71,7 +71,7 @@ sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/
sed -i 's/com.android.messaging/org.smssecure.smssecure/' core/res/res/values/config.xml; #Change default SMS app to Silence
sed -i 's|config_permissionReviewRequired">false|config_permissionReviewRequired">true|' core/res/res/values/config.xml;
#patch -p1 < $patches"android_frameworks_base/0001-Reduced_Resolution.patch" #Allow reducing resolution to save power TODO: Rebase and add 800x480
patch -p1 < $patches"android_frameworks_base/0002-Signature_Spoofing.patch" #Allow packages to spoof their signature (MicroG)
patch -p1 < $patches"android_frameworks_base/0002-Signature_Spoofing.patch" #Allow packages to spoof their signature (microG)
patch -p1 < $patches"android_frameworks_base/0003-Harden_Sig_Spoofing.patch" #Restrict signature spoofing to system apps signed with the platform key
patch -p1 < $patches"android_frameworks_base/0004-OpenNIC.patch" #Change fallback and tethering DNS servers to OpenNIC AnyCast
rm -rf packages/PrintRecommendationService; #App that just creates popups to install proprietary print apps
@ -125,9 +125,9 @@ sed -i 's/compileSdkVersion 23/compileSdkVersion 25/' build.gradle;
sed -i 's/buildToolsVersion "23.0.2"/buildToolsVersion "25.0.3"/' build.gradle;
enterAndClear "packages/apps/LineageParts"
rm -rf src/org/lineageos/lineageparts/lineagestats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml #Nuke part of CMStats
rm -rf src/org/lineageos/lineageparts/lineagestats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml #Nuke part of the analytics
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather
patch -p1 < $patches"android_packages_apps_LineageParts/0001-Remove_Analytics.patch" #Remove the rest of CMStats
patch -p1 < $patches"android_packages_apps_LineageParts/0001-Remove_Analytics.patch" #Remove analytics
#patch -p1 < $patches"android_packages_apps_LineageParts/0002-Reduced_Resolution.patch" #Allow reducing resolution to save power #TODO: Rebase
enterAndClear "packages/apps/Settings"
@ -137,7 +137,7 @@ sed -i 's/GSETTINGS_PROVIDER = "com.google.settings";/GSETTINGS_PROVIDER = "com.
#patch -p1 < $patches"android_packages_apps_Settings/0001-Privacy_Guard-More_Perms.patch" #Allow more control over various permissions via Privacy Guard #TODO: Rebase
#enterAndClear "packages/apps/SetupWizard"
#patch -p1 < $patches"android_packages_apps_SetupWizard/0001-Remove_Analytics.patch" #Remove the rest of CMStats
#patch -p1 < $patches"android_packages_apps_SetupWizard/0001-Remove_Analytics.patch" #Remove analytics
enterAndClear "packages/apps/Silence"
cp $patches"android_packages_apps_Silence/Android.mk" Android.mk #Add a build file
@ -171,10 +171,10 @@ patch -p1 < $patches"android_system_vold/0001-AES256.patch" #Add a variable for
enterAndClear "vendor/lineage"
rm -rf overlay/common/vendor/lineage-sdk/packages #Remove analytics
awk -i inplace '!/50-lineage.sh/' config/common.mk; #Make sure our hosts is always used
patch -p1 < $patches"android_vendor_cm/0001-SCE.patch" #Include our extras such as MicroG and F-Droid
cp $patches"android_vendor_cm/sce.mk" config/sce.mk
cp -r $patches"android_vendor_cm/firmware_deblobber" .;
cp $patches"android_vendor_cm/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
patch -p1 < $patches"android_vendor_lineage/0001-SCE.patch" #Include our extras such as MicroG and F-Droid
cp $patches"android_vendor_lineage/sce.mk" config/sce.mk
cp -r $patches"android_vendor_lineage/firmware_deblobber" .;
cp $patches"android_vendor_lineage/firmware_deblobber.mk" build/tasks/firmware_deblobber.mk;
sed -i 's/LINEAGE_BUILDTYPE := UNOFFICIAL/LINEAGE_BUILDTYPE := dos/' config/common.mk; #Change buildtype
sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app with Silence
sed -i 's/config_enableRecoveryUpdater">false/config_enableRecoveryUpdater">true/' overlay/common/packages/apps/Settings/res/values/config.xml; #Expose option to update recovery