- final Preference javaScriptPreference = findPreference("javascript");
- final Preference firstPartyCookiesPreference = findPreference("first_party_cookies");
- final Preference thirdPartyCookiesPreference = findPreference("third_party_cookies");
- final Preference domStoragePreference = findPreference("dom_storage");
- final Preference saveFormDataPreference = findPreference("save_form_data"); // The form data preference can be removed once the minimum API >= 26.
- final Preference userAgentPreference = findPreference("user_agent");
- final Preference customUserAgentPreference = findPreference("custom_user_agent");
- final Preference incognitoModePreference = findPreference("incognito_mode");
- final Preference doNotTrackPreference = findPreference("do_not_track");
- final Preference allowScreenshotsPreference = findPreference("allow_screenshots");
- final Preference easyListPreference = findPreference("easylist");
- final Preference easyPrivacyPreference = findPreference("easyprivacy");
- final Preference fanboyAnnoyanceListPreference = findPreference("fanboys_annoyance_list");
- final Preference fanboySocialBlockingListPreference = findPreference("fanboys_social_blocking_list");
- final Preference ultraPrivacyPreference = findPreference("ultraprivacy");
- final Preference blockAllThirdPartyRequestsPreference = findPreference("block_all_third_party_requests");
- final Preference proxyThroughOrbotPreference = findPreference("proxy_through_orbot");
- final Preference torHomepagePreference = findPreference("tor_homepage");
- final Preference torSearchPreference = findPreference("tor_search");
- final Preference torSearchCustomURLPreference = findPreference("tor_search_custom_url");
- final Preference searchPreference = findPreference("search");
- final Preference searchCustomURLPreference = findPreference("search_custom_url");
- final Preference fullScreenBrowsingModePreference = findPreference("full_screen_browsing_mode");
- final Preference hideAppBarPreference = findPreference("hide_app_bar");
- final Preference clearEverythingPreference = findPreference("clear_everything");
- final Preference clearCookiesPreference = findPreference("clear_cookies");
- final Preference clearDomStoragePreference = findPreference("clear_dom_storage");
- final Preference clearFormDataPreference = findPreference("clear_form_data"); // The clear form data preference can be removed once the minimum API >= 26.
- final Preference clearCachePreference = findPreference("clear_cache");
- final Preference homepagePreference = findPreference("homepage");
- final Preference fontSizePreference = findPreference("font_size");
- final Preference swipeToRefreshPreference = findPreference("swipe_to_refresh");
- final Preference scrollAppBarPreference = findPreference("scroll_app_bar");
- final Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons");
- final Preference downloadWithExternalAppPreference = findPreference("download_with_external_app");
- final Preference darkThemePreference = findPreference("dark_theme");
- final Preference nightModePreference = findPreference("night_mode");
- final Preference displayWebpageImagesPreference = findPreference("display_webpage_images");
-
- // Set dependencies.
- torHomepagePreference.setDependency("proxy_through_orbot");
- torSearchPreference.setDependency("proxy_through_orbot");
+ Preference javaScriptPreference = findPreference("javascript");
+ Preference firstPartyCookiesPreference = findPreference("first_party_cookies");
+ Preference thirdPartyCookiesPreference = findPreference("third_party_cookies");
+ Preference domStoragePreference = findPreference("dom_storage");
+ Preference formDataPreference = findPreference("save_form_data"); // The form data preference can be removed once the minimum API >= 26.
+ Preference userAgentPreference = findPreference("user_agent");
+ Preference customUserAgentPreference = findPreference("custom_user_agent");
+ Preference incognitoModePreference = findPreference("incognito_mode");
+ Preference doNotTrackPreference = findPreference("do_not_track");
+ Preference allowScreenshotsPreference = findPreference("allow_screenshots");
+ Preference easyListPreference = findPreference("easylist");
+ Preference easyPrivacyPreference = findPreference("easyprivacy");
+ Preference fanboyAnnoyanceListPreference = findPreference("fanboys_annoyance_list");
+ Preference fanboySocialBlockingListPreference = findPreference("fanboys_social_blocking_list");
+ Preference ultraListPreference = findPreference("ultralist");
+ Preference ultraPrivacyPreference = findPreference("ultraprivacy");
+ Preference blockAllThirdPartyRequestsPreference = findPreference("block_all_third_party_requests");
+ Preference googleAnalyticsPreference = findPreference("google_analytics");
+ Preference facebookClickIdsPreference = findPreference("facebook_click_ids");
+ Preference twitterAmpRedirectsPreference = findPreference("twitter_amp_redirects");
+ Preference searchPreference = findPreference("search");
+ Preference searchCustomURLPreference = findPreference("search_custom_url");
+ Preference proxyPreference = findPreference("proxy");
+ Preference proxyCustomUrlPreference = findPreference("proxy_custom_url");
+ Preference fullScreenBrowsingModePreference = findPreference("full_screen_browsing_mode");
+ Preference hideAppBarPreference = findPreference("hide_app_bar");
+ Preference clearEverythingPreference = findPreference("clear_everything");
+ Preference clearCookiesPreference = findPreference("clear_cookies");
+ Preference clearDomStoragePreference = findPreference("clear_dom_storage");
+ Preference clearFormDataPreference = findPreference("clear_form_data"); // The clear form data preference can be removed once the minimum API >= 26.
+ Preference clearCachePreference = findPreference("clear_cache");
+ Preference homepagePreference = findPreference("homepage");
+ Preference fontSizePreference = findPreference("font_size");
+ Preference openIntentsInNewTabPreference = findPreference("open_intents_in_new_tab");
+ Preference swipeToRefreshPreference = findPreference("swipe_to_refresh");
+ Preference scrollAppBarPreference = findPreference("scroll_app_bar");
+ Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons");
+ Preference downloadWithExternalAppPreference = findPreference("download_with_external_app");
+ Preference darkThemePreference = findPreference("dark_theme");
+ Preference nightModePreference = findPreference("night_mode");
+ Preference wideViewportPreference = findPreference("wide_viewport");
+ Preference displayWebpageImagesPreference = findPreference("display_webpage_images");
+
+ // Remove the lint warnings below that the preferences might be null.
+ assert javaScriptPreference != null;
+ assert firstPartyCookiesPreference != null;
+ assert thirdPartyCookiesPreference != null;
+ assert domStoragePreference != null;
+ assert formDataPreference != null;
+ assert userAgentPreference != null;
+ assert customUserAgentPreference != null;
+ assert incognitoModePreference != null;
+ assert doNotTrackPreference != null;
+ assert allowScreenshotsPreference != null;
+ assert easyListPreference != null;
+ assert easyPrivacyPreference != null;
+ assert fanboyAnnoyanceListPreference != null;
+ assert fanboySocialBlockingListPreference != null;
+ assert ultraListPreference != null;
+ assert ultraPrivacyPreference != null;
+ assert blockAllThirdPartyRequestsPreference != null;
+ assert googleAnalyticsPreference != null;
+ assert facebookClickIdsPreference != null;
+ assert twitterAmpRedirectsPreference != null;
+ assert searchPreference != null;
+ assert searchCustomURLPreference != null;
+ assert proxyPreference != null;
+ assert proxyCustomUrlPreference != null;
+ assert fullScreenBrowsingModePreference != null;
+ assert hideAppBarPreference != null;
+ assert clearEverythingPreference != null;
+ assert clearCookiesPreference != null;
+ assert clearDomStoragePreference != null;
+ assert clearFormDataPreference != null;
+ assert clearCachePreference != null;
+ assert homepagePreference != null;
+ assert fontSizePreference != null;
+ assert openIntentsInNewTabPreference != null;
+ assert swipeToRefreshPreference != null;
+ assert scrollAppBarPreference != null;
+ assert displayAdditionalAppBarIconsPreference != null;
+ assert downloadWithExternalAppPreference != null;
+ assert darkThemePreference != null;
+ assert nightModePreference != null;
+ assert wideViewportPreference != null;
+ assert displayWebpageImagesPreference != null;
+
+ // Set the hide app bar preference dependency.