Dan Ballard pushed to branch tor-browser-153.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: 1a66a107 by clairehurst at 2026-07-21T19:10:38-07:00 fixup! [android] Disable features and functionality Bug 45118: Disable Mozilla VPN - - - - - 8 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt - mobile/android/fenix/app/src/main/res/xml/preferences.xml - mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt ===================================== @@ -609,7 +609,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, Crash summarizeToolbarHighlightBinding, components.core.summarizationSettings, translationsAIControllableFeatureRegistrar, - ipProtectionPrompter, ) if (!isCustomTabIntent(intent)) { ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/components/menu/compose/MainMenu.kt ===================================== @@ -253,7 +253,7 @@ fun MainMenu( } } - if (showIPProtection) { + if (false) { MenuGroup { IPProtectionMenuItem( state = ipProtectionMenuState, @@ -712,7 +712,7 @@ private fun MenuDialogPreview( showBanner = true, isDownloadHighlighted = true, webExtensionMenuCount = 1, - showIPProtection = true, + showIPProtection = false, ipProtectionMenuState = IPProtectionMenuState(), onMoreMenuClick = {}, onCustomizeReaderViewMenuClick = {}, ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt ===================================== @@ -529,7 +529,6 @@ class HomeFragment : Fragment(), UserInteractionHandler { initReviewPromptBinding(view = view) initTabsCleanupFeature(view = view) initSnackbarBinding(view = view) - initIpProtectionBindings(view = view) privacyNoticeBannerStore = PrivacyNoticeBannerStore( initialState = PrivacyNoticeBannerState( ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SecretSettingsFragment.kt ===================================== @@ -357,12 +357,6 @@ class SecretSettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFra onPreferenceChangeListener = SharedPreferenceUpdater() } - requirePreference<SwitchPreferenceCompat>(R.string.pref_key_enable_ip_protection).apply { - isVisible = Config.channel.isNightlyOrDebug - isChecked = settings.isIPProtectionEnabled - onPreferenceChangeListener = SharedPreferenceUpdater() - } - requirePreference<SwitchPreferenceCompat>(R.string.pref_key_enable_import_passwords).apply { isVisible = Config.channel.isDebug isChecked = settings.importPasswordsFeatureFlagEnabled ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt ===================================== @@ -454,13 +454,6 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment, SettingsFragmentDirections.actionSettingsFragmentToHttpsOnlyFragment() } - resources.getString(R.string.pref_key_ip_protection_settings) -> { - Vpn.settingsPageTapped.record(Vpn.SettingsPageTappedExtra(entrypoint = "Settings")) - SettingsFragmentDirections.actionSettingsFragmentToIpProtectionFragment( - entrypoint = FenixFxAEntryPoint.IPProtectionSettings, - ) - } - resources.getString(R.string.pref_key_tracking_protection_settings) -> { TrackingProtection.etpSettings.record(NoExtras()) SettingsFragmentDirections.actionSettingsFragmentToTrackingProtectionFragment() @@ -675,7 +668,6 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment, setupGeckoLogsPreference(settings) setupSecurityLevelPreference() setupHttpsOnlyPreferences(settings) - setupIPProtectionPreferences(components.ipProtection.store) setupNotificationPreference( NotificationManagerCompat.from(requireContext()).areNotificationsEnabled(), ) ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -2803,19 +2803,15 @@ class Settings( * Persists IPProtection state set through Secret Settings. * * `true` makes the IPProtection UI elements visible across the app, while `false` hides them. + * TOR Note: This is "Mozilla VPN" and should always be disabled for the tor browser */ - var isIPProtectionEnabled by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_enable_ip_protection), - default = false, - ) + var isIPProtectionEnabled = false /** * Indicates if the user has already toggled the VPN on. + * TOR Note: This is "Mozilla VPN" and should always be disabled for the tor browser */ - var hasAlreadyUsedVpn by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_has_used_ip_protection), - default = false, - ) + var hasAlreadyUsedVpn = false /** * Indicates if the IPProtection onboarding bottom sheet has been already shown to the user. @@ -2823,19 +2819,17 @@ class Settings( * `true` makes the IPProtection bottom sheet appear, while `false` ensures the user does not see * the bottom sheet again. This is only shown to the user once and * if they dismiss it in anyway (e.g. tap on "Not now" or "Get started") then they will never see it again. + * TOR Note: This is "Mozilla VPN" and should always be disabled for the tor browser */ - var hasShownIPProtectionPrompt by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_has_shown_ip_protection_prompt), - default = false, - ) + var hasShownIPProtectionPrompt = false /** * Indicates if the IPProtection feature is available for the user. * * The flag is backed by a Nimbus `ip-protection` feature, with an option to override it through secret settings. + * TOR Note: This is "Mozilla VPN" and should always be disabled for the tor browser */ - val isIPProtectionAvailable: Boolean - get() = FxNimbus.features.ipProtection.value().enabled || isIPProtectionEnabled + val isIPProtectionAvailable: Boolean = false /** * Tracks how many times the summarize menu item has been shown. ===================================== mobile/android/fenix/app/src/main/res/xml/preferences.xml ===================================== @@ -126,12 +126,6 @@ app:isPreferenceVisible="false" android:title="@string/preferences_private_browsing_options" /> - <org.mozilla.fenix.settings.IPProtectionPreference - android:key="@string/pref_key_ip_protection_settings" - app:iconSpaceReserved="false" - app:isPreferenceVisible="false" - app:allowDividerAbove="false"/> - <androidx.preference.Preference android:key="@string/pref_key_https_only_settings" app:iconSpaceReserved="false" ===================================== mobile/android/fenix/app/src/main/res/xml/secret_settings_preferences.xml ===================================== @@ -230,10 +230,6 @@ android:key="@string/pref_key_enable_longfox" android:title="@string/preferences_debug_settings_enable_longfox" app:iconSpaceReserved="false" /> - <SwitchPreferenceCompat - android:key="@string/pref_key_enable_ip_protection" - android:title="@string/preferences_debug_settings_ip_protection" - app:iconSpaceReserved="false" /> <SwitchPreferenceCompat android:defaultValue="false" android:key="@string/pref_key_enable_import_passwords" View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1a66a107... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1a66a107... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
Dan Ballard (@dan)