}
android {
- compileSdk 31
+ compileSdk 32
defaultConfig {
minSdk 23
// Include the following AndroidX libraries.
implementation 'androidx.arch.core:core-common:2.1.0'
implementation 'androidx.arch.core:core-runtime:2.1.0'
- implementation 'androidx.appcompat:appcompat:1.4.1'
+ implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
- implementation 'androidx.core:core-ktx:1.7.0'
+ implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
implementation 'androidx.preference:preference-ktx:1.2.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.webkit:webkit:1.4.0'
// Include the Kotlin standard library. This should be the same version number listed in project build.gradle.
- implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'
+ implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10'
// Include the Google material library.
- implementation 'com.google.android.material:material:1.6.0'
+ implementation 'com.google.android.material:material:1.6.1'
}
\ No newline at end of file
[Adblock Plus 2.0]
! Version: 2
! Title: UltraPrivacy
-! Last modified: 22 May 2019 18:11 UTC
+! Last modified: 2 June 2022 17:37 UTC
! Expires: 90 days (update frequency)
-! Homepage: https://www.stoutner.com/privacy-browser/blocklists/ultraprivacy/
+! Homepage: https://www.stoutner.com/privacy-browser-android/blocklists/ultraprivacy/
! Licence: GPLv3+ http://www.gnu.org/licenses/gpl-3.0.html
!
-! I can't imagine that anything that includes `analytics` is good for your privacy. https://redmine.stoutner.com/issues/312.
+! I can't imagine that anything that includes `analytics` is good for your privacy. <https://redmine.stoutner.com/issues/312>
analytics
-! Block Google Tag Services. https://redmine.stoutner.com/issues/449
+! Block Google Tag Services. <https://redmine.stoutner.com/issues/449>
googletagservices
+! There shall be no connecting to Facebook on the backend. <https://redmine.stoutner.com/issues/858>
+connect.facebook
\ No newline at end of file
import androidx.viewpager.widget.ViewPager;
import androidx.webkit.WebSettingsCompat;
import androidx.webkit.WebViewFeature;
-import kotlin.Pair;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper;
import com.stoutner.privacybrowser.helpers.DomainsDatabaseHelper;
import com.stoutner.privacybrowser.helpers.ProxyHelper;
+import com.stoutner.privacybrowser.helpers.SanitizeUrlHelper;
import com.stoutner.privacybrowser.views.NestedScrollWebView;
import java.io.ByteArrayInputStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
+import kotlin.Pair;
+
public class MainWebViewActivity extends AppCompatActivity implements CreateBookmarkDialog.CreateBookmarkListener, CreateBookmarkFolderDialog.CreateBookmarkFolderListener,
EditBookmarkFolderDialog.EditBookmarkFolderListener, FontSizeDialog.UpdateFontSizeListener, NavigationView.OnNavigationItemSelectedListener, OpenDialog.OpenListener,
PinnedMismatchDialog.PinnedMismatchListener, PopulateBlocklists.PopulateBlocklistsListener, SaveDialog.SaveListener, UrlHistoryDialog.NavigateHistoryListener,
private int defaultProgressViewStartOffset;
private int defaultProgressViewEndOffset;
- // The URL sanitizers are set in `applyAppSettings()` and used in `sanitizeUrl()`.
- private boolean sanitizeGoogleAnalytics;
- private boolean sanitizeFacebookClickIds;
- private boolean sanitizeTwitterAmpRedirects;
+ // Declare the helpers.
+ private BookmarksDatabaseHelper bookmarksDatabaseHelper;
+ private DomainsDatabaseHelper domainsDatabaseHelper;
+ private ProxyHelper proxyHelper;
+ private SanitizeUrlHelper sanitizeUrlHelper;
// Declare the class variables
- private BookmarksDatabaseHelper bookmarksDatabaseHelper;
private boolean bottomAppBar;
private boolean displayingFullScreenVideo;
private boolean downloadWithExternalApp;
private boolean inFullScreenBrowsingMode;
private boolean loadingNewIntent;
private BroadcastReceiver orbotStatusBroadcastReceiver;
- private ProxyHelper proxyHelper;
private boolean reapplyAppSettingsOnRestart;
private boolean reapplyDomainSettingsOnRestart;
+ private boolean sanitizeAmpRedirects;
+ private boolean sanitizeTrackingQueries;
private boolean scrollAppBar;
private boolean waitingForProxy;
private String webViewDefaultUserAgent;
// Store up to 100 tabs in memory.
webViewPager.setOffscreenPageLimit(100);
- // Instantiate the proxy helper.
+ // Instantiate the helpers.
+ bookmarksDatabaseHelper = new BookmarksDatabaseHelper(this);
+ domainsDatabaseHelper = new DomainsDatabaseHelper(this);
proxyHelper = new ProxyHelper();
+ sanitizeUrlHelper = new SanitizeUrlHelper();
// Initialize the app.
initializeApp();
Uri currentUri = Uri.parse(currentWebView.getUrl());
String currentDomain = currentUri.getHost();
- // Initialize the database handler.
- DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this);
-
// Create the domain and store the database ID.
int newDomainDatabaseId = domainsDatabaseHelper.addDomain(currentDomain);
drawerLayout.setDrawerTitle(GravityCompat.START, getString(R.string.navigation_drawer));
drawerLayout.setDrawerTitle(GravityCompat.END, getString(R.string.bookmarks));
- // Initialize the bookmarks database helper.
- bookmarksDatabaseHelper = new BookmarksDatabaseHelper(this);
-
// Initialize `currentBookmarksFolder`. `""` is the home folder in the database.
currentBookmarksFolder = "";
// Store the values from the shared preferences in variables.
incognitoModeEnabled = sharedPreferences.getBoolean("incognito_mode", false);
- sanitizeGoogleAnalytics = sharedPreferences.getBoolean("google_analytics", true);
- sanitizeFacebookClickIds = sharedPreferences.getBoolean("facebook_click_ids", true);
- sanitizeTwitterAmpRedirects = sharedPreferences.getBoolean("twitter_amp_redirects", true);
+ sanitizeTrackingQueries = sharedPreferences.getBoolean(getString(R.string.tracking_queries_key), true);
+ sanitizeAmpRedirects = sharedPreferences.getBoolean(getString(R.string.amp_redirects_key), true);
proxyMode = sharedPreferences.getString("proxy", getString(R.string.proxy_default_value));
fullScreenBrowsingModeEnabled = sharedPreferences.getBoolean("full_screen_browsing_mode", false);
downloadWithExternalApp = sharedPreferences.getBoolean(getString(R.string.download_with_external_app_key), false);
}
}
- // Initialize the database handler.
- DomainsDatabaseHelper domainsDatabaseHelper = new DomainsDatabaseHelper(this);
-
- // Get a full cursor from `domainsDatabaseHelper`.
+ // Get a full domain name cursor.
Cursor domainNameCursor = domainsDatabaseHelper.getDomainNameCursorOrderedByDomain();
// Initialize `domainSettingsSet`.
}
private String sanitizeUrl(String url) {
- // Sanitize Google Analytics.
- if (sanitizeGoogleAnalytics) {
- // Remove `?utm_`.
- if (url.contains("?utm_")) {
- url = url.substring(0, url.indexOf("?utm_"));
- }
+ // Sanitize tracking queries.
+ if (sanitizeTrackingQueries)
+ url = sanitizeUrlHelper.sanitizeTrackingQueries(url);
- // Remove `&utm_`.
- if (url.contains("&utm_")) {
- url = url.substring(0, url.indexOf("&utm_"));
- }
- }
-
- // Sanitize Facebook Click IDs.
- if (sanitizeFacebookClickIds) {
- // Remove `?fbclid=`.
- if (url.contains("?fbclid=")) {
- url = url.substring(0, url.indexOf("?fbclid="));
- }
-
- // Remove `&fbclid=`.
- if (url.contains("&fbclid=")) {
- url = url.substring(0, url.indexOf("&fbclid="));
- }
-
- // Remove `?fbadid=`.
- if (url.contains("?fbadid=")) {
- url = url.substring(0, url.indexOf("?fbadid="));
- }
-
- // Remove `&fbadid=`.
- if (url.contains("&fbadid=")) {
- url = url.substring(0, url.indexOf("&fbadid="));
- }
- }
-
- // Sanitize Twitter AMP redirects.
- if (sanitizeTwitterAmpRedirects) {
- // Remove `?amp=1`.
- if (url.contains("?amp=1")) {
- url = url.substring(0, url.indexOf("?amp=1"));
- }
- }
+ // Sanitize AMP redirects.
+ if (sanitizeAmpRedirects)
+ url = sanitizeUrlHelper.sanitizeAmpRedirects(url);
// Return the sanitized URL.
return url;
private val activityWeakReference: WeakReference<Activity> = WeakReference(activity)
private val alertDialogWeakReference: WeakReference<AlertDialog> = WeakReference(alertDialog)
+ @Deprecated("Deprecated in Java")
override fun doInBackground(vararg domainName: String): SpannableStringBuilder {
// Get handles for the activity and the alert dialog.
val activity = activityWeakReference.get()
}
// `onPostExecute()` operates on the UI thread.
+ @Deprecated("Deprecated in Java")
override fun onPostExecute(ipAddresses: SpannableStringBuilder) {
// Get handles for the activity and the alert dialog.
val activity = activityWeakReference.get()
private Preference ultraListPreference;
private Preference ultraPrivacyPreference;
private Preference blockAllThirdPartyRequestsPreference;
- private Preference googleAnalyticsPreference;
- private Preference facebookClickIdsPreference;
- private Preference twitterAmpRedirectsPreference;
+ private Preference trackingQueriesPreference;
+ private Preference ampRedirectsPreference;
private Preference searchPreference;
private Preference searchCustomURLPreference;
private Preference proxyPreference;
ultraListPreference = findPreference("ultralist");
ultraPrivacyPreference = findPreference("ultraprivacy");
blockAllThirdPartyRequestsPreference = findPreference("block_all_third_party_requests");
- googleAnalyticsPreference = findPreference("google_analytics");
- facebookClickIdsPreference = findPreference("facebook_click_ids");
- twitterAmpRedirectsPreference = findPreference("twitter_amp_redirects");
+ trackingQueriesPreference = findPreference(getString(R.string.tracking_queries_key));
+ ampRedirectsPreference = findPreference(getString(R.string.amp_redirects_key));
searchPreference = findPreference("search");
searchCustomURLPreference = findPreference("search_custom_url");
proxyPreference = findPreference("proxy");
assert ultraListPreference != null;
assert ultraPrivacyPreference != null;
assert blockAllThirdPartyRequestsPreference != null;
- assert googleAnalyticsPreference != null;
- assert facebookClickIdsPreference != null;
- assert twitterAmpRedirectsPreference != null;
+ assert trackingQueriesPreference != null;
+ assert ampRedirectsPreference != null;
assert searchPreference != null;
assert searchCustomURLPreference != null;
assert proxyPreference != null;
blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled);
}
- // Set the Google Analytics icon.
- if (sharedPreferences.getBoolean("google_analytics", true)) {
- googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled);
+ // Set the Tracking Queries icon.
+ if (sharedPreferences.getBoolean(getString(R.string.tracking_queries_key), true)) {
+ trackingQueriesPreference.setIcon(R.drawable.modify_url_enabled);
} else {
- googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled);
+ trackingQueriesPreference.setIcon(R.drawable.modify_url_disabled);
}
- // Set the Facebook Click IDs icon.
- if (sharedPreferences.getBoolean("facebook_click_ids", true)) {
- facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled);
+ // Set the AMP Redirects icon.
+ if (sharedPreferences.getBoolean(getString(R.string.amp_redirects_key), true)) {
+ ampRedirectsPreference.setIcon(R.drawable.modify_url_enabled);
} else {
- facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled);
- }
-
- // Set the Twitter AMP redirects icon.
- if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) {
- twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled);
- } else {
- twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled);
+ ampRedirectsPreference.setIcon(R.drawable.modify_url_disabled);
}
// Set the search custom URL icon.
}
break;
- case "google_analytics":
- // Update the icon.
- if (sharedPreferences.getBoolean("google_analytics", true)) {
- googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled);
- } else {
- googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled);
- }
- break;
-
- case "facebook_click_ids":
+ case "tracking_queries":
// Update the icon.
- if (sharedPreferences.getBoolean("facebook_click_ids", true)) {
- facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled);
+ if (sharedPreferences.getBoolean(context.getString(R.string.tracking_queries_key), true)) {
+ trackingQueriesPreference.setIcon(R.drawable.modify_url_enabled);
} else {
- facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled);
+ trackingQueriesPreference.setIcon(R.drawable.modify_url_disabled);
}
break;
- case "twitter_amp_redirects":
+ case "amp_redirects":
// Update the icon.
- if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) {
- twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled);
+ if (sharedPreferences.getBoolean(context.getString(R.string.amp_redirects_key), true)) {
+ ampRedirectsPreference.setIcon(R.drawable.modify_url_enabled);
} else {
- twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled);
+ ampRedirectsPreference.setIcon(R.drawable.modify_url_disabled);
}
break;
const val FAVORITE_ICON = "favoriteicon"
// Define the public table creation constant.
- const val CREATE_BOOKMARKS_TABLE = "CREATE TABLE " + BOOKMARKS_TABLE + " (" +
- ID + " INTEGER PRIMARY KEY, " +
- BOOKMARK_NAME + " TEXT, " +
- BOOKMARK_URL + " TEXT, " +
- PARENT_FOLDER + " TEXT, " +
- DISPLAY_ORDER + " INTEGER, " +
- IS_FOLDER + " BOOLEAN, " +
- FAVORITE_ICON + " BLOB)"
+ const val CREATE_BOOKMARKS_TABLE = "CREATE TABLE $BOOKMARKS_TABLE (" +
+ "$ID INTEGER PRIMARY KEY, " +
+ "$BOOKMARK_NAME TEXT, " +
+ "$BOOKMARK_URL TEXT, " +
+ "$PARENT_FOLDER TEXT, " +
+ "$DISPLAY_ORDER INTEGER, " +
+ "$IS_FOLDER BOOLEAN, " +
+ "$FAVORITE_ICON BLOB)"
}
override fun onCreate(bookmarksDatabase: SQLiteDatabase) {
* You should have received a copy of the GNU General Public License
* along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>.
*/
+
package com.stoutner.privacybrowser.helpers
import android.app.Activity
const val IP_ADDRESSES = "ip_addresses"
// The table creation constant.
- const val CREATE_DOMAINS_TABLE = "CREATE TABLE " + DOMAINS_TABLE + " (" +
- ID + " INTEGER PRIMARY KEY, " +
- DOMAIN_NAME + " TEXT, " +
- ENABLE_JAVASCRIPT + " BOOLEAN, " +
- COOKIES + " BOOLEAN, " +
- ENABLE_DOM_STORAGE + " BOOLEAN, " +
- ENABLE_FORM_DATA + " BOOLEAN, " +
- ENABLE_EASYLIST + " BOOLEAN, " +
- ENABLE_EASYPRIVACY + " BOOLEAN, " +
- ENABLE_FANBOYS_ANNOYANCE_LIST + " BOOLEAN, " +
- ENABLE_FANBOYS_SOCIAL_BLOCKING_LIST + " BOOLEAN, " +
- ULTRALIST + " BOOLEAN, " +
- ENABLE_ULTRAPRIVACY + " BOOLEAN, " +
- BLOCK_ALL_THIRD_PARTY_REQUESTS + " BOOLEAN, " +
- USER_AGENT + " TEXT, " +
- FONT_SIZE + " INTEGER, " +
- SWIPE_TO_REFRESH + " INTEGER, " +
- WEBVIEW_THEME + " INTEGER, " +
- WIDE_VIEWPORT + " INTEGER, " +
- DISPLAY_IMAGES + " INTEGER, " +
- PINNED_SSL_CERTIFICATE + " BOOLEAN, " +
- SSL_ISSUED_TO_COMMON_NAME + " TEXT, " +
- SSL_ISSUED_TO_ORGANIZATION + " TEXT, " +
- SSL_ISSUED_TO_ORGANIZATIONAL_UNIT + " TEXT, " +
- SSL_ISSUED_BY_COMMON_NAME + " TEXT, " +
- SSL_ISSUED_BY_ORGANIZATION + " TEXT, " +
- SSL_ISSUED_BY_ORGANIZATIONAL_UNIT + " TEXT, " +
- SSL_START_DATE + " INTEGER, " +
- SSL_END_DATE + " INTEGER, " +
- PINNED_IP_ADDRESSES + " BOOLEAN, " +
- IP_ADDRESSES + " TEXT)"
+ const val CREATE_DOMAINS_TABLE = "CREATE TABLE $DOMAINS_TABLE (" +
+ "$ID INTEGER PRIMARY KEY, " +
+ "$DOMAIN_NAME TEXT, " +
+ "$ENABLE_JAVASCRIPT BOOLEAN, " +
+ "$COOKIES BOOLEAN, " +
+ "$ENABLE_DOM_STORAGE BOOLEAN, " +
+ "$ENABLE_FORM_DATA BOOLEAN, " +
+ "$ENABLE_EASYLIST BOOLEAN, " +
+ "$ENABLE_EASYPRIVACY BOOLEAN, " +
+ "$ENABLE_FANBOYS_ANNOYANCE_LIST BOOLEAN, " +
+ "$ENABLE_FANBOYS_SOCIAL_BLOCKING_LIST BOOLEAN, " +
+ "$ULTRALIST BOOLEAN, " +
+ "$ENABLE_ULTRAPRIVACY BOOLEAN, " +
+ "$BLOCK_ALL_THIRD_PARTY_REQUESTS BOOLEAN, " +
+ "$USER_AGENT TEXT, " +
+ "$FONT_SIZE INTEGER, " +
+ "$SWIPE_TO_REFRESH INTEGER, " +
+ "$WEBVIEW_THEME INTEGER, " +
+ "$WIDE_VIEWPORT INTEGER, " +
+ "$DISPLAY_IMAGES INTEGER, " +
+ "$PINNED_SSL_CERTIFICATE BOOLEAN, " +
+ "$SSL_ISSUED_TO_COMMON_NAME TEXT, " +
+ "$SSL_ISSUED_TO_ORGANIZATION TEXT, " +
+ "$SSL_ISSUED_TO_ORGANIZATIONAL_UNIT TEXT, " +
+ "$SSL_ISSUED_BY_COMMON_NAME TEXT, " +
+ "$SSL_ISSUED_BY_ORGANIZATION TEXT, " +
+ "$SSL_ISSUED_BY_ORGANIZATIONAL_UNIT TEXT, " +
+ "$SSL_START_DATE INTEGER, " +
+ "$SSL_END_DATE INTEGER, " +
+ "$PINNED_IP_ADDRESSES BOOLEAN, " +
+ "$IP_ADDRESSES TEXT)"
}
override fun onCreate(domainsDatabase: SQLiteDatabase) {
import java.io.OutputStream
// Define the private class constants.
-private const val SCHEMA_VERSION = 14
+private const val SCHEMA_VERSION = 15
private const val PREFERENCES_TABLE = "preferences"
// Define the private preferences constants.
private const val ULTRALIST = "ultralist"
private const val ULTRAPRIVACY = "ultraprivacy"
private const val BLOCK_ALL_THIRD_PARTY_REQUESTS = "block_all_third_party_requests"
-private const val GOOGLE_ANALYTICS = "google_analytics"
-private const val FACEBOOK_CLICK_IDS = "facebook_click_ids"
-private const val TWITTER_AMP_REDIRECTS = "twitter_amp_redirects"
+private const val TRACKING_QUERIES = "tracking_queries"
+private const val AMP_REDIRECTS = "amp_redirects"
private const val SEARCH = "search"
private const val SEARCH_CUSTOM_URL = "search_custom_url"
private const val PROXY = "proxy"
// Upgrade from schema version 2, first used in Privacy Browser 2.14, to schema version 3, first used in Privacy Browser 2.15.
if (importDatabaseVersion < 3) {
- // Once the SQLite version is >= 3.25.0 (API >= 30) `ALTER TABLE RENAME COLUMN` can be used. <https://www.sqlite.org/lang_altertable.html> <https://www.sqlite.org/changes.html>
+ // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. <https://www.sqlite.org/lang_altertable.html> <https://www.sqlite.org/changes.html>
// <https://developer.android.com/reference/android/database/sqlite/package-summary>
// In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database.
// Upgrade from schema version 6, first used in Privacy Browser 3.0, to schema version 7, first used in Privacy Browser 3.1.
if (importDatabaseVersion < 7) {
+ // Previously this upgrade added `facebook_click_ids` to the Preferences table. But that is now removed in schema version 15.
+
// Add the wide viewport column to the domains table.
importDatabase.execSQL("ALTER TABLE ${DomainsDatabaseHelper.DOMAINS_TABLE} ADD COLUMN ${DomainsDatabaseHelper.WIDE_VIEWPORT} INTEGER")
- // Add the Google Analytics, Facebook Click IDs, Twitter AMP redirects, and wide viewport columns to the preferences table.
- importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $GOOGLE_ANALYTICS BOOLEAN")
- importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $FACEBOOK_CLICK_IDS BOOLEAN")
- importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $TWITTER_AMP_REDIRECTS BOOLEAN")
+ // Add the Google Analytics, Twitter AMP redirects, and wide viewport columns to the preferences table.
+ importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN google_analytics BOOLEAN")
+ importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN twitter_amp_redirects BOOLEAN")
importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $WIDE_VIEWPORT BOOLEAN")
// Get the current preference values.
- val googleAnalytics = sharedPreferences.getBoolean(GOOGLE_ANALYTICS, true)
- val facebookClickIds = sharedPreferences.getBoolean(FACEBOOK_CLICK_IDS, true)
- val twitterAmpRedirects = sharedPreferences.getBoolean(TWITTER_AMP_REDIRECTS, true)
+ val trackingQueries = sharedPreferences.getBoolean(TRACKING_QUERIES, true)
+ val ampRedirects = sharedPreferences.getBoolean(AMP_REDIRECTS, true)
val wideViewport = sharedPreferences.getBoolean(WIDE_VIEWPORT, true)
- // Populate the preferences with the current Google Analytics value.
+ // Populate the preferences with the current Tracking Queries value. Google Analytics was renamed Tracking Queries in schema version 15.
// This can switch to using the variables directly once the API >= 30. <https://www.sqlite.org/datatype3.html#boolean_datatype>
// <https://developer.android.com/reference/android/database/sqlite/package-summary>
- if (googleAnalytics) {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $GOOGLE_ANALYTICS = 1")
- } else {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $GOOGLE_ANALYTICS = 0")
- }
-
- // Populate the preferences with the current Facebook Click IDs value.
- if (facebookClickIds) {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $FACEBOOK_CLICK_IDS = 1")
+ if (trackingQueries) {
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET google_analytics = 1")
} else {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $FACEBOOK_CLICK_IDS = 0")
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET google_analytics = 0")
}
- // Populate the preferences table with the current Twitter AMP redirects value.
- if (twitterAmpRedirects) {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TWITTER_AMP_REDIRECTS = 1")
+ // Populate the preferences table with the current AMP Redirects value. Twitter AMP Redirects was renamed AMP Redirects in schema version 15.
+ if (ampRedirects) {
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET twitter_amp_redirects = 1")
} else {
- importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TWITTER_AMP_REDIRECTS = 0")
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET twitter_amp_redirects = 0")
}
// Populate the preferences table with the current wide viewport value.
if (importDatabaseVersion < 14) {
// `enabledthirdpartycookies` was removed from the domains table. `do_not_track` and `third_party_cookies` were removed from the preferences table.
- // Once the SQLite version is >= 3.25.0 `ALTER TABLE RENAME COLUMN` can be used. <https://www.sqlite.org/lang_altertable.html> <https://www.sqlite.org/changes.html>
+ // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. <https://www.sqlite.org/lang_altertable.html> <https://www.sqlite.org/changes.html>
// <https://developer.android.com/reference/android/database/sqlite/package-summary>
// In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database.
}
}
+ // Upgrade from schema version 14, first used in Privacy Browser 3.8, to schema version 15, first used in Privacy Browser 3.11.
+ if (importDatabaseVersion < 15) {
+ // `facebook_click_ids` was removed from the preferences table.
+
+ // Once the SQLite version is >= 3.25.0 (Android API >= 30) `ALTER TABLE RENAME COLUMN` can be used. <https://www.sqlite.org/lang_altertable.html> <https://www.sqlite.org/changes.html>
+ // <https://developer.android.com/reference/android/database/sqlite/package-summary>
+ // In the meantime, a new column must be created with the new name. There is no need to delete the old column on the temporary import database.
+
+ // Create the new URL modification columns.
+ importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $TRACKING_QUERIES BOOLEAN")
+ importDatabase.execSQL("ALTER TABLE $PREFERENCES_TABLE ADD COLUMN $AMP_REDIRECTS BOOLEAN")
+
+ // Copy the data from the old columns to the new ones.
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $TRACKING_QUERIES = google_analytics")
+ importDatabase.execSQL("UPDATE $PREFERENCES_TABLE SET $AMP_REDIRECTS = twitter_amp_redirects")
+ }
+
// Get a cursor for the bookmarks table.
val importBookmarksCursor = importDatabase.rawQuery("SELECT * FROM ${BookmarksDatabaseHelper.BOOKMARKS_TABLE}", null)
.putBoolean(ULTRALIST, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(ULTRALIST)) == 1)
.putBoolean(ULTRAPRIVACY, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(ULTRAPRIVACY)) == 1)
.putBoolean(BLOCK_ALL_THIRD_PARTY_REQUESTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(BLOCK_ALL_THIRD_PARTY_REQUESTS)) == 1)
- .putBoolean(GOOGLE_ANALYTICS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(GOOGLE_ANALYTICS)) == 1)
- .putBoolean(FACEBOOK_CLICK_IDS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(FACEBOOK_CLICK_IDS)) == 1)
- .putBoolean(TWITTER_AMP_REDIRECTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(TWITTER_AMP_REDIRECTS)) == 1)
+ .putBoolean(TRACKING_QUERIES, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(TRACKING_QUERIES)) == 1)
+ .putBoolean(AMP_REDIRECTS, importPreferencesCursor.getInt(importPreferencesCursor.getColumnIndexOrThrow(AMP_REDIRECTS)) == 1)
.putString(SEARCH, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(SEARCH)))
.putString(SEARCH_CUSTOM_URL, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(SEARCH_CUSTOM_URL)))
.putString(PROXY, importPreferencesCursor.getString(importPreferencesCursor.getColumnIndexOrThrow(PROXY)))
// Prepare the preferences table SQL creation string.
- val createPreferencesTable = "CREATE TABLE " + PREFERENCES_TABLE + " (" +
- ID + " INTEGER PRIMARY KEY, " +
- JAVASCRIPT + " BOOLEAN, " +
- COOKIES + " BOOLEAN, " +
- DOM_STORAGE + " BOOLEAN, " +
- SAVE_FORM_DATA + " BOOLEAN, " +
- USER_AGENT + " TEXT, " +
- CUSTOM_USER_AGENT + " TEXT, " +
- INCOGNITO_MODE + " BOOLEAN, " +
- ALLOW_SCREENSHOTS + " BOOLEAN, " +
- EASYLIST + " BOOLEAN, " +
- EASYPRIVACY + " BOOLEAN, " +
- FANBOYS_ANNOYANCE_LIST + " BOOLEAN, " +
- FANBOYS_SOCIAL_BLOCKING_LIST + " BOOLEAN, " +
- ULTRALIST + " BOOLEAN, " +
- ULTRAPRIVACY + " BOOLEAN, " +
- BLOCK_ALL_THIRD_PARTY_REQUESTS + " BOOLEAN, " +
- GOOGLE_ANALYTICS + " BOOLEAN, " +
- FACEBOOK_CLICK_IDS + " BOOLEAN, " +
- TWITTER_AMP_REDIRECTS + " BOOLEAN, " +
- SEARCH + " TEXT, " +
- SEARCH_CUSTOM_URL + " TEXT, " +
- PROXY + " TEXT, " +
- PROXY_CUSTOM_URL + " TEXT, " +
- FULL_SCREEN_BROWSING_MODE + " BOOLEAN, " +
- HIDE_APP_BAR + " BOOLEAN, " +
- CLEAR_EVERYTHING + " BOOLEAN, " +
- CLEAR_COOKIES + " BOOLEAN, " +
- CLEAR_DOM_STORAGE + " BOOLEAN, " +
- CLEAR_FORM_DATA + " BOOLEAN, " +
- CLEAR_LOGCAT + " BOOLEAN, " +
- CLEAR_CACHE + " BOOLEAN, " +
- HOMEPAGE + " TEXT, " +
- FONT_SIZE + " TEXT, " +
- OPEN_INTENTS_IN_NEW_TAB + " BOOLEAN, " +
- SWIPE_TO_REFRESH + " BOOLEAN, " +
- DOWNLOAD_WITH_EXTERNAL_APP + " BOOLEAN, " +
- SCROLL_APP_BAR + " BOOLEAN, " +
- BOTTOM_APP_BAR + " BOOLEAN, " +
- DISPLAY_ADDITIONAL_APP_BAR_ICONS + " BOOLEAN, " +
- APP_THEME + " TEXT, " +
- WEBVIEW_THEME + " TEXT, " +
- WIDE_VIEWPORT + " BOOLEAN, " +
- DISPLAY_WEBPAGE_IMAGES + " BOOLEAN)"
+ val createPreferencesTable = "CREATE TABLE $PREFERENCES_TABLE (" +
+ "$ID INTEGER PRIMARY KEY, " +
+ "$JAVASCRIPT BOOLEAN, " +
+ "$COOKIES BOOLEAN, " +
+ "$DOM_STORAGE BOOLEAN, " +
+ "$SAVE_FORM_DATA BOOLEAN, " +
+ "$USER_AGENT TEXT, " +
+ "$CUSTOM_USER_AGENT TEXT, " +
+ "$INCOGNITO_MODE BOOLEAN, " +
+ "$ALLOW_SCREENSHOTS BOOLEAN, " +
+ "$EASYLIST BOOLEAN, " +
+ "$EASYPRIVACY BOOLEAN, " +
+ "$FANBOYS_ANNOYANCE_LIST BOOLEAN, " +
+ "$FANBOYS_SOCIAL_BLOCKING_LIST BOOLEAN, " +
+ "$ULTRALIST BOOLEAN, " +
+ "$ULTRAPRIVACY BOOLEAN, " +
+ "$BLOCK_ALL_THIRD_PARTY_REQUESTS BOOLEAN, " +
+ "$TRACKING_QUERIES BOOLEAN, " +
+ "$AMP_REDIRECTS BOOLEAN, " +
+ "$SEARCH TEXT, " +
+ "$SEARCH_CUSTOM_URL TEXT, " +
+ "$PROXY TEXT, " +
+ "$PROXY_CUSTOM_URL TEXT, " +
+ "$FULL_SCREEN_BROWSING_MODE BOOLEAN, " +
+ "$HIDE_APP_BAR BOOLEAN, " +
+ "$CLEAR_EVERYTHING BOOLEAN, " +
+ "$CLEAR_COOKIES BOOLEAN, " +
+ "$CLEAR_DOM_STORAGE BOOLEAN, " +
+ "$CLEAR_FORM_DATA BOOLEAN, " +
+ "$CLEAR_LOGCAT BOOLEAN, " +
+ "$CLEAR_CACHE BOOLEAN, " +
+ "$HOMEPAGE TEXT, " +
+ "$FONT_SIZE TEXT, " +
+ "$OPEN_INTENTS_IN_NEW_TAB BOOLEAN, " +
+ "$SWIPE_TO_REFRESH BOOLEAN, " +
+ "$DOWNLOAD_WITH_EXTERNAL_APP BOOLEAN, " +
+ "$SCROLL_APP_BAR BOOLEAN, " +
+ "$BOTTOM_APP_BAR BOOLEAN, " +
+ "$DISPLAY_ADDITIONAL_APP_BAR_ICONS BOOLEAN, " +
+ "$APP_THEME TEXT, " +
+ "$WEBVIEW_THEME TEXT, " +
+ "$WIDE_VIEWPORT BOOLEAN, " +
+ "$DISPLAY_WEBPAGE_IMAGES BOOLEAN)"
// Create the temporary export database preferences table.
temporaryExportDatabase.execSQL(createPreferencesTable)
preferencesContentValues.put(ULTRALIST, sharedPreferences.getBoolean(ULTRALIST, true))
preferencesContentValues.put(ULTRAPRIVACY, sharedPreferences.getBoolean(ULTRAPRIVACY, true))
preferencesContentValues.put(BLOCK_ALL_THIRD_PARTY_REQUESTS, sharedPreferences.getBoolean(BLOCK_ALL_THIRD_PARTY_REQUESTS, false))
- preferencesContentValues.put(GOOGLE_ANALYTICS, sharedPreferences.getBoolean(GOOGLE_ANALYTICS, true))
- preferencesContentValues.put(FACEBOOK_CLICK_IDS, sharedPreferences.getBoolean(FACEBOOK_CLICK_IDS, true))
- preferencesContentValues.put(TWITTER_AMP_REDIRECTS, sharedPreferences.getBoolean(TWITTER_AMP_REDIRECTS, true))
+ preferencesContentValues.put(TRACKING_QUERIES, sharedPreferences.getBoolean(TRACKING_QUERIES, true))
+ preferencesContentValues.put(AMP_REDIRECTS, sharedPreferences.getBoolean(AMP_REDIRECTS, true))
preferencesContentValues.put(SEARCH, sharedPreferences.getString(SEARCH, context.getString(R.string.search_default_value)))
preferencesContentValues.put(SEARCH_CUSTOM_URL, sharedPreferences.getString(SEARCH_CUSTOM_URL, context.getString(R.string.search_custom_url_default_value)))
preferencesContentValues.put(PROXY, sharedPreferences.getString(PROXY, context.getString(R.string.proxy_default_value)))
class ProxyHelper {
companion object {
- // Define the public companion object constants. These can be moved to public class constants once the entire project has migrated to Kotlin.
+ // Define the public static companion object constants.
const val NONE = "None"
const val TOR = "Tor"
const val I2P = "I2P"
--- /dev/null
+/*
+ * Copyright ©2022 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
+ *
+ * Privacy Browser Android is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser Android is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser Android. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser.helpers
+
+private val trackingQueriesList = listOf(
+ "__hsfp=", // HubSpot.
+ "__hssc=", // HubSpot.
+ "__hstc=", // HubSpot.
+ "__s=", // Drip.com.
+ "_hsenc=", // HubSpot.
+ "_openstat=", // Yandex.
+ "dclid=", // DoubleClick ID.
+ "fbadid=", // FaceBook Ad ID.
+ "fbclid=", // FaceBook Click ID.
+ "gclid=", // Google Click ID.
+ "hsCtaTracking=", // HubSpot.
+ "igshid=", // Instagram.
+ "mc_eid=", // MailChimp Email ID.
+ "?mkt_tok=", // Adobe Marketo.
+ "ml_subscriber=", // MailerLite.
+ "ml_subscriber_hash=", // MailerLite.
+ "msclkid=", // Microsoft Click ID.
+ "oly_anon_id=", // Omeda Anonymous ID.
+ "oly_enc_id=", // Omeda ID.
+ "rb_clickid=", // Unknown tracker.
+ "s_cid=", // Adobe Site Catalyst.
+ "utm_", // Google Analytics.
+ "vero_conv=", // Vero.
+ "vero_id=", // Vero ID.
+ "wickedid=", // Wicked Reports ID.
+ "yclid=" // Yandex Click ID.
+)
+
+class SanitizeUrlHelper {
+ fun sanitizeTrackingQueries(inputUrl: String): String {
+ // Make a copy of the input URL so that it can be modified.
+ var url = inputUrl
+
+ // Remove each tracking query from the URL.
+ trackingQueriesList.forEach {
+ if (url.contains("?$it")) { // Check for an initial query
+ // Remove the first query and anything after it.
+ url = url.substring(0, url.indexOf("?$it"))
+ }
+ else if (url.contains("&$it")) { // Check for a subsequent query.
+ // Remove the query and anything after it.
+ url = url.substring(0, url.indexOf("&$it"))
+ }
+ }
+
+ // Return the sanitized URL.
+ return url
+ }
+
+ fun sanitizeAmpRedirects(inputUrl: String): String {
+ // Make a copy of the input URL so that it can be modified.
+ var url = inputUrl
+
+ // Remove Twitter `amp=1`.
+ if (url.contains("?amp"))
+ url = url.substring(0, url.indexOf("?amp"))
+ else if (url.contains("&"))
+ url = url.substring(0, url.indexOf("&"))
+
+ // Return the sanitized URL.
+ return url
+ }
+}
\ No newline at end of file
<string name="block_all_third_party_requests">Alle Zugriffe auf Dritt-Anbieter-Inhalte blockieren</string>
<string name="block_all_third_party_requests_summary">Alle Zugriffe auf Dritt-Anbieter-Inhalte zu blockieren verbessert die Privatsphäre, kann jedoch Webseiten verunstalten.</string>
<string name="url_modification">URL-Bereinigung</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Entfernt “?utm_” und “&utm_” sowie alles danach aus URLs.</string>
- <string name="facebook_click_ids">Facebook Click-IDs</string>
- <string name="facebook_click_ids_summary">Entfernt “?fbclid=”, “&fbclid=”, “?fbadid=” und “&fbadid=” sowie alles danach aus URLs.</string>
- <string name="twitter_amp_redirects">Twitter AMP-Umleitungen</string>
- <string name="twitter_amp_redirects_summary">Entfernt “?amp=1” sowie alles danach URLs.</string>
<string name="search">Suche</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="block_all_third_party_requests">Bloquear todas las solicitudes de terceras partes</string>
<string name="block_all_third_party_requests_summary">Bloquear todas las solicitudes de terceras partes aumenta la privacidad, pero rompe muchas páginas web.</string>
<string name="url_modification">Modificación de URL</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Eliminar “?utm_”, “&utm_” y cualquier cosa tras ello de las URLs.</string>
- <string name="facebook_click_ids">IDs de clics en Facebook</string>
- <string name="facebook_click_ids_summary">Eliminar “?fbclid=”, “&fbclid=”, “?fbadid=”, “&fbadid=” y cualquier cosa tras ello de las URLs.</string>
- <string name="twitter_amp_redirects">Redirecciones de Twitter AMP</string>
- <string name="twitter_amp_redirects_summary">Eliminar “?amp=1” y cualquier cosa después de esto de las URLs.</string>
<string name="search">Búsqueda</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="add_to_home_screen">Ajouter à l\'écran d\'accueil</string>
<string name="view_source">Voir Source</string>
<string name="share">Partager</string>
+ <string name="share_message">Partager le message</string>
<string name="share_url">Partager URL</string>
<string name="open_with_app">Ouvrir avec une application</string>
<string name="open_with_browser">Ouvrir dans le navigateur</string>
<string name="block_all_third_party_requests">Bloquer toutes les requêtes tierces</string>
<string name="block_all_third_party_requests_summary">Le blocage de toutes les requêtes tierces augmente la vie privée, mais détruit de nombreux sites Web.</string>
<string name="url_modification">Modifications d\'URL</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Supprime “?utm_” et “&utm_” et tout ce qui suit après ces URLs.</string>
- <string name="facebook_click_ids">Facebook Click IDs</string>
- <string name="facebook_click_ids_summary">Supprime “?fbclid=”, “&fbclid=”, “?fbadid=” et “&fbadid=” et tout ce qui suit après ces URLs.</string>
- <string name="twitter_amp_redirects">Twitter AMP</string>
- <string name="twitter_amp_redirects_summary">Supprime “?amp=1” et tout ce qui suit après cette URL.</string>
<string name="search">Moteur de Recherche</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="api">API</string>
<string name="security_patch">Patch si sicurezza:</string>
<string name="build">Build:</string>
+ <string name="kernel">Kernel:</string>
<string name="webview_provider">Provider di WebView:</string>
<string name="webview_version">Versione di WebView:</string>
<string name="orbot">Orbot:</string>
<string name="block_all_third_party_requests">Blocca tutte le richieste di Terze Parti</string>
<string name="block_all_third_party_requests_summary">Il blocco di tutte le richieste di Terze Parti aumenta privacy, ma impedisce la visualizzazione di molti siti web.</string>
<string name="url_modification">Modifica delle URL</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Rimuovi “?utm_” e “&utm_” e tutto quello che segue dalle URL.</string>
- <string name="facebook_click_ids">Facebook Click ID</string>
- <string name="facebook_click_ids_summary">Rimuovi “?fbclid=”, “&fbclid=”, “?fbadid=”, e “&fbadid=” e tutto quello che segue dalle URL.</string>
- <string name="twitter_amp_redirects">Reindirizzamenti Twitter AMP</string>
- <string name="twitter_amp_redirects_summary">Rimuovi “?amp=1” e tutto quello che segue dalle URL.</string>
<string name="search">Ricerca</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="api">API</string>
<string name="security_patch">Patch de segurança:</string>
<string name="build">Build:</string>
+ <string name="kernel">Kernel:</string>
<string name="webview_provider">Fornecedor WebView:</string>
<string name="webview_version">Versão do WebView:</string>
<string name="orbot">Orbot:</string>
<string name="block_all_third_party_requests">Bloquear todas as solicitações de terceiros</string>
<string name="block_all_third_party_requests_summary">Bloquear todas as solicitações de terceiros aumenta a privacidade, mas quebra muitos sites.</string>
<string name="url_modification">Modificação de URL</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Remova utm_ e amp; utm_ e qualquer coisa depois deles dos URLs.</string>
- <string name="facebook_click_ids">IDs de clique do Facebook</string>
- <string name="facebook_click_ids_summary">Remover “?fbclid=†, “&fbclid=†, “?fbadid=†, e “&fbadid=†e qualquer coisa depois deles a partir de URLs.</string>
- <string name="twitter_amp_redirects">Redirecionamentos de AMP do Twitter</string>
- <string name="twitter_amp_redirects_summary">Remover “?amp=1†e qualquer coisa depois de URLs.</string>
<string name="search">Search</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="api">API</string>
<string name="security_patch">Патч безопасности:</string>
<string name="build">Сборка:</string>
+ <string name="kernel">Ядро:</string>
<string name="webview_provider">Провайдер WebView:</string>
<string name="webview_version">Версия WebView:</string>
<string name="orbot">Orbot:</string>
<string name="block_all_third_party_requests">Блокировать все сторонние запросы</string>
<string name="block_all_third_party_requests_summary">Блокировка всех сторонних запросов повышает конфиденциальность, но ломает многие веб-сайты.</string>
<string name="url_modification">Модификация URL</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Удалять из URL “?utm_” и “&utm_” и все что будет после.</string>
- <string name="facebook_click_ids">Идентификаторы кликов в Facebook</string>
- <string name="facebook_click_ids_summary">Удалять из URL “?fbclid=”, “&fbclid=”, “?fbadid=”, и “&fbadid=” и все что будет после.</string>
- <string name="twitter_amp_redirects">AMP-перенаправления в Twitter</string>
- <string name="twitter_amp_redirects_summary">Удалять из URL “?amp=1” и все что будет после.</string>
<string name="search">Поиск</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="block_all_third_party_requests">Tüm üçüncü taraf istekleri engelle</string>
<string name="block_all_third_party_requests_summary">Tüm üçüncü taraf istekleri engellemek gizliliği arttırır, fakat çoğu web sitesinin çökmesine sebep olur.</string>
<string name="url_modification">URL Modifikasyonu</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">URL\'lerde “?utm_” ve “&utm_” ve onlardan sonra gelen her şey kaldırıldı.</string>
- <string name="facebook_click_ids">Facebook Tık ID\'leri</string>
- <string name="facebook_click_ids_summary">URL\'lerde “?fbclid=”, “&fbclid=”, “?fbadid=”, ve “&fbadid=” ve onlardan sonra gelen her şey kaldırıldı.</string>
- <string name="twitter_amp_redirects">Twitter AMP yönlendirmeleri</string>
- <string name="twitter_amp_redirects_summary">URL\'den sonra gelen “?amp=1” ve diğer şeyleri kaldırır.</string>
<string name="search">Arama</string>
<string-array name="search_entries">
<item>Mojeek</item>
<string name="block_all_third_party_requests">Block all third-party requests</string>
<string name="block_all_third_party_requests_summary">Blocking all third-party requests increases privacy, but it breaks many websites.</string>
<string name="url_modification">URL Modification</string>
- <string name="google_analytics">Google Analytics</string>
- <string name="google_analytics_summary">Remove “?utm_” and “&utm_” and anything after them from URLs.</string>
- <string name="facebook_click_ids">Facebook Click IDs</string>
- <string name="facebook_click_ids_summary">Remove “?fbclid=”, “&fbclid=”, “?fbadid=”, and “&fbadid=” and anything after them from URLs.</string>
- <string name="twitter_amp_redirects">Twitter AMP redirects</string>
- <string name="twitter_amp_redirects_summary">Remove “?amp=1” and anything after it from URLs.</string>
+ <string name="tracking_queries">Tracking queries</string>
+ <string name="tracking_queries_summary">Remove known tracking queries from URLs.</string>
+ <string name="amp_redirects">AMP redirects</string>
+ <string name="amp_redirects_summary">Remove known AMP (Accelerated Mobil Pages) redirect queries from URLs.</string>
<string name="search">Search</string>
<string-array name="search_entries">
<item>Mojeek</item>
<!-- Non-translatable preference keys. -->
<string name="allow_screenshots_key" translatable="false">allow_screenshots</string>
+ <string name="amp_redirects_key" translatable="false">amp_redirects</string>
<string name="bottom_app_bar_key" translatable="false">bottom_app_bar</string>
<string name="cookies_key" translatable="false">cookies</string>
<string name="clear_logcat_key" translatable="false">clear_logcat</string>
<string name="display_additional_app_bar_icons_key" translatable="false">display_additional_app_bar_icons</string>
<string name="proxy_custom_url_key" translatable="false">proxy_custom_url</string>
<string name="scroll_app_bar_key" translatable="false">scroll_app_bar</string>
+ <string name="tracking_queries_key" translatable="false">tracking_queries</string>
<!-- Non-translatable preference default values. -->
<string name="app_theme_default_value" translatable="false">System default</string>
android:title="@string/url_modification" >
<SwitchPreference
- android:key="google_analytics"
- android:title="@string/google_analytics"
- android:summary="@string/google_analytics_summary"
+ android:key="tracking_queries"
+ android:title="@string/tracking_queries"
+ android:summary="@string/tracking_queries_summary"
android:defaultValue="true" />
<SwitchPreference
- android:key="facebook_click_ids"
- android:title="@string/facebook_click_ids"
- android:summary="@string/facebook_click_ids_summary"
- android:defaultValue="true" />
-
- <SwitchPreference
- android:key="twitter_amp_redirects"
- android:title="@string/twitter_amp_redirects"
- android:summary="@string/twitter_amp_redirects_summary"
+ android:key="amp_redirects"
+ android:title="@string/amp_redirects"
+ android:summary="@string/amp_redirects_summary"
android:defaultValue="true" />
</PreferenceCategory>
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21"
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files