mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Remove some broken patches
This commit is contained in:
parent
fcc8ffc5bd
commit
397ab78e21
@ -1,97 +0,0 @@
|
||||
From e5a4d460e3683bb382b17e709a0b541d552c8247 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Oliveira <rockytvbr@gmail.com>
|
||||
Date: Fri, 28 Jul 2017 18:05:18 -0300
|
||||
Subject: [PATCH] Jelly: add option to remove identifying headers
|
||||
|
||||
Based off anthonycr's commit for LightningBrowser:
|
||||
https://github.com/anthonycr/Lightning-Browser/commit/7a0c79d11ee1f0a19ebf61b37b8ebd53eee6eb57
|
||||
|
||||
Change-Id: If7c5978bd7ab5cdfd766585f2d2c479c4412e63f
|
||||
---
|
||||
app/src/main/java/org/lineageos/jelly/utils/PrefsUtils.java | 6 ++++++
|
||||
app/src/main/java/org/lineageos/jelly/webview/WebViewExt.java | 7 +++++++
|
||||
app/src/main/res/values/strings.xml | 4 ++++
|
||||
app/src/main/res/xml/settings.xml | 6 ++++++
|
||||
4 files changed, 23 insertions(+)
|
||||
|
||||
diff --git a/app/src/main/java/org/lineageos/jelly/utils/PrefsUtils.java b/app/src/main/java/org/lineageos/jelly/utils/PrefsUtils.java
|
||||
index 6b913d5..b554f30 100644
|
||||
--- a/app/src/main/java/org/lineageos/jelly/utils/PrefsUtils.java
|
||||
+++ b/app/src/main/java/org/lineageos/jelly/utils/PrefsUtils.java
|
||||
@@ -32,6 +32,7 @@
|
||||
private static final String KEY_DO_NOT_TRACK = "key_do_not_track";
|
||||
private static final String KEY_SAVE_FORM_DATA = "key_save_form_data";
|
||||
private static final String KEY_SUGGESTION_PROVIDER = "key_suggestion_provider";
|
||||
+ private static final String KEY_REMOVE_IDENTIFYING_HEADERS = "key_remove_identifying_headers";
|
||||
|
||||
public enum SuggestionProviderType {
|
||||
BAIDU,
|
||||
@@ -91,6 +92,11 @@ public static boolean getSaveFormData(Context context) {
|
||||
return prefs.getBoolean(KEY_SAVE_FORM_DATA, true);
|
||||
}
|
||||
|
||||
+ public static boolean getRemoveIdentifyingHeaders(Context context) {
|
||||
+ SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
+ return prefs.getBoolean(KEY_REMOVE_IDENTIFYING_HEADERS, false);
|
||||
+ }
|
||||
+
|
||||
public static SuggestionProviderType getSuggestionProvider(Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
try {
|
||||
diff --git a/app/src/main/java/org/lineageos/jelly/webview/WebViewExt.java b/app/src/main/java/org/lineageos/jelly/webview/WebViewExt.java
|
||||
index bc88c22..ae96204 100644
|
||||
--- a/app/src/main/java/org/lineageos/jelly/webview/WebViewExt.java
|
||||
+++ b/app/src/main/java/org/lineageos/jelly/webview/WebViewExt.java
|
||||
@@ -54,6 +54,8 @@
|
||||
|
||||
private final Map<String, String> mRequestHeaders = new ArrayMap<>();
|
||||
private static final String HEADER_DNT = "DNT";
|
||||
+ private static final String HEADER_REQUESTED_WITH = "X-Requested-With";
|
||||
+ private static final String HEADER_WAP_PROFILE = "X-Wap-Profile";
|
||||
|
||||
public WebViewExt(Context context) {
|
||||
super(context);
|
||||
@@ -145,6 +147,11 @@ public boolean onLongClick(View v) {
|
||||
if (PrefsUtils.getDoNotTrack(mActivity)) {
|
||||
mRequestHeaders.put(HEADER_DNT, "1");
|
||||
}
|
||||
+
|
||||
+ if (PrefsUtils.getRemoveIdentifyingHeaders(mActivity)) {
|
||||
+ mRequestHeaders.put(HEADER_REQUESTED_WITH, "");
|
||||
+ mRequestHeaders.put(HEADER_WAP_PROFILE, "");
|
||||
+ }
|
||||
}
|
||||
|
||||
public void init(WebViewExtActivity activity, EditText editText,
|
||||
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
|
||||
index 9784dc7..a325947 100644
|
||||
--- a/app/src/main/res/values/strings.xml
|
||||
+++ b/app/src/main/res/values/strings.xml
|
||||
@@ -116,6 +116,10 @@
|
||||
<string name="pref_save_form_data_title">Save form data</string>
|
||||
<!-- Settings: suggestions provider title -->
|
||||
<string name="pref_suggestions_provider">Suggestions provider</string>
|
||||
+ <!-- Settings: remove identifying headers preference title -->
|
||||
+ <string name="pref_remove_identifying_headers_title">Remove identifying headers</string>
|
||||
+ <!-- Settings: remove identifying headers preference summary -->
|
||||
+ <string name="pref_remove_identifying_headers_summary">Prevent some personally identifiable information from being sent to websites you visit</string>
|
||||
|
||||
<!-- History: title -->
|
||||
<string name="history_title">History</string>
|
||||
diff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml
|
||||
index 8bf0718..9bbf074 100644
|
||||
--- a/app/src/main/res/xml/settings.xml
|
||||
+++ b/app/src/main/res/xml/settings.xml
|
||||
@@ -73,6 +73,12 @@
|
||||
android:title="@string/pref_do_not_track_title" />
|
||||
|
||||
<SwitchPreference
|
||||
+ android:defaultValue="0"
|
||||
+ android:key="key_remove_identifying_headers"
|
||||
+ android:summary="@string/pref_remove_identifying_headers_summary"
|
||||
+ android:title="@string/pref_remove_identifying_headers_title" />
|
||||
+
|
||||
+ <SwitchPreference
|
||||
android:defaultValue="1"
|
||||
android:key="key_cookie"
|
||||
android:summary="@string/pref_cookie_summary"
|
@ -72,7 +72,6 @@ patch -p1 < $patches"android_external_sqlite/0001-Secure_Delete.patch" #Enable s
|
||||
|
||||
enter "frameworks/base"
|
||||
git revert 0326bb5e41219cf502727c3aa44ebf2daa19a5b3 #re-enable doze on devices without gms
|
||||
git fetch https://review.lineageos.org/LineageOS/android_frameworks_base refs/changes/75/151975/38 && git cherry-pick FETCH_HEAD #network traffic
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox
|
||||
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;
|
||||
@ -96,7 +95,6 @@ awk -i inplace '!/com.android.internal.R.bool.config_permissionReviewRequired/'
|
||||
|
||||
enter "packages/apps/CMParts"
|
||||
rm -rf src/org/cyanogenmod/cmparts/cmstats/ res/xml/anonymous_stats.xml res/xml/preview_data.xml #Nuke part of CMStats
|
||||
git fetch https://review.lineageos.org/LineageOS/android_packages_apps_CMParts refs/changes/15/113415/26 && git cherry-pick FETCH_HEAD #network traffic
|
||||
sed -i 's|config_showWeatherMenu">true|config_showWeatherMenu">false|' res/values/config.xml; #Disable Weather
|
||||
patch -p1 < $patches"android_packages_apps_CMParts/0001-Remove_Analytics.patch" #Remove the rest of CMStats
|
||||
patch -p1 < $patches"android_packages_apps_CMParts/0002-Reduced_Resolution.patch" #Allow reducing resolution to save power
|
||||
@ -128,9 +126,6 @@ sed -i 's|$(OUT_DIR)/target/|$(PWD)/$(OUT_DIR)/target/|' Android.mk;
|
||||
sed -i 's/compileSdkVersion 23/compileSdkVersion 25/' build.gradle;
|
||||
sed -i 's/buildToolsVersion "23.0.2"/buildToolsVersion "25.0.3"/' build.gradle;
|
||||
|
||||
enter "packages/apps/Jelly"
|
||||
git apply --3way $patches"android_packages_apps_Jelly/182322-3.patch" #Add option to remove identifying headers
|
||||
|
||||
enter "packages/apps/PackageInstaller"
|
||||
patch -p1 < $patches"android_packages_apps_PackageInstaller/64d8b44.diff" #Fix an issue with Permission Review
|
||||
|
||||
@ -188,7 +183,6 @@ sed -i 's/messaging/Silence/' config/telephony.mk; #Replace AOSP Messaging app w
|
||||
#sed -i 's/mka bacon/mka bacon target-files-package dist/' build/envsetup.sh; #Create target-files for incrementals
|
||||
|
||||
enter "vendor/cmsdk"
|
||||
git fetch https://review.lineageos.org/LineageOS/cm_platform_sdk refs/changes/21/148321/14 && git cherry-pick FETCH_HEAD #network traffic
|
||||
awk -i inplace '!/WeatherManagerServiceBroker/' cm/res/res/values/config.xml; #Disable Weather
|
||||
cp $patches"cm_platform_sdk/profile_default.xml" cm/res/res/xml/profile_default.xml; #Replace default profiles with *way* better ones
|
||||
#patch -p1 < $patches"cm_platform_sdk/0001-Radio.patch" #Add a QS tile to control radio power
|
||||
|
Loading…
Reference in New Issue
Block a user