[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-152.0a1-16.0-2] [android] Disable features and functionality



Title: GitLab

clairehurst pushed to branch tor-browser-152.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

  • 631e5e4c
    by clairehurst at 2026-06-08T11:34:52-06:00
    [android] Disable features and functionality
    
    tb#44175: Remove all default browser functionality (Android)
    

3 changed files:

Changes:

  • mobile/android/fenix/app/src/main/AndroidManifest.xml
    ... ... @@ -521,7 +521,6 @@
    521 521
                     <data android:host="home"/>
    
    522 522
                     <data android:host="home_collections"/>
    
    523 523
                     <data android:host="install_search_widget"/>
    
    524
    -                <data android:host="make_default_browser"/>
    
    525 524
                     <data android:host="open"/>
    
    526 525
                     <data android:host="settings"/>
    
    527 526
                     <data android:host="settings_accessibility"/>
    
    ... ... @@ -560,54 +559,6 @@
    560 559
                 android:exported="true"
    
    561 560
                 android:excludeFromRecents="true" >
    
    562 561
     
    
    563
    -            <!--
    
    564
    -              Respond to `Intent.makeMainSelectorActivity(Intent.ACTION_MAIN, Intent.CATEGORY_APP_BROWSER)`
    
    565
    -            -->
    
    566
    -            <intent-filter>
    
    567
    -                <action android:name="android.intent.action.MAIN" />
    
    568
    -                <category android:name="android.intent.category.APP_BROWSER"/>
    
    569
    -                <category android:name="android.intent.category.DEFAULT"/>
    
    570
    -            </intent-filter>
    
    571
    -
    
    572
    -            <intent-filter>
    
    573
    -                <action android:name="android.intent.action.VIEW" />
    
    574
    -
    
    575
    -                <category android:name="android.intent.category.DEFAULT" />
    
    576
    -                <category android:name="android.intent.category.BROWSABLE" />
    
    577
    -                <category android:name="mozilla.components.pwa.category.SHORTCUT" />
    
    578
    -                <data android:scheme="http" />
    
    579
    -                <data android:scheme="https" />
    
    580
    -            </intent-filter>
    
    581
    -
    
    582
    -            <!--Exposed specific deep links for third-party apps to open wallpaper settings.-->
    
    583
    -            <intent-filter>
    
    584
    -                <action android:name="android.intent.action.VIEW" />
    
    585
    -                <category android:name="android.intent.category.BROWSABLE" />
    
    586
    -                <category android:name="android.intent.category.DEFAULT" />
    
    587
    -                <data android:scheme="${deepLinkScheme}"
    
    588
    -                    android:host="settings_wallpapers"/>
    
    589
    -            </intent-filter>
    
    590
    -
    
    591
    -            <intent-filter>
    
    592
    -                <action android:name="android.intent.action.VIEW" />
    
    593
    -
    
    594
    -                <category android:name="android.intent.category.BROWSABLE" />
    
    595
    -                <category android:name="android.intent.category.DEFAULT" />
    
    596
    -
    
    597
    -                <data android:scheme="http" />
    
    598
    -                <data android:scheme="https" />
    
    599
    -                <data android:mimeType="text/html" />
    
    600
    -                <data android:mimeType="text/plain" />
    
    601
    -                <data android:mimeType="application/xhtml+xml" />
    
    602
    -            </intent-filter>
    
    603
    -
    
    604
    -<!--
    
    605
    -            <intent-filter>
    
    606
    -                <action android:name="android.intent.action.SEND" />
    
    607
    -                <category android:name="android.intent.category.DEFAULT" />
    
    608
    -                <data android:mimeType="text/plain" />
    
    609
    -            </intent-filter>
    
    610
    --->
    
    611 562
     
    
    612 563
                 <intent-filter>
    
    613 564
                     <action android:name="android.intent.action.SEARCH" />
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt
    ... ... @@ -615,8 +615,6 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment,
    615 615
             val debuggingKey = getPreferenceKey(R.string.pref_key_remote_debugging)
    
    616 616
             val preferenceLeakCanary = findPreference<Preference>(leakKey)
    
    617 617
             val preferenceRemoteDebugging = findPreference<Preference>(debuggingKey)
    
    618
    -        val preferenceMakeDefaultBrowser =
    
    619
    -            requirePreference<DefaultBrowserPreference>(R.string.pref_key_make_default_browser)
    
    620 618
     
    
    621 619
             // Copied from PrivateBrowsingFragment with some removals
    
    622 620
             requirePreference<SwitchPreferenceCompat>(R.string.pref_key_allow_screenshots_in_private_mode).apply {
    
    ... ... @@ -648,12 +646,6 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment,
    648 646
                 true
    
    649 647
             }
    
    650 648
     
    
    651
    -        preferenceMakeDefaultBrowser.apply {
    
    652
    -            updateSwitch()
    
    653
    -            onPreferenceClickListener =
    
    654
    -                getClickListenerForMakeDefaultBrowser()
    
    655
    -        }
    
    656
    -
    
    657 649
             val preferenceStartProfiler =
    
    658 650
                 findPreference<Preference>(getPreferenceKey(R.string.pref_key_start_profiler))
    
    659 651
     
    
    ... ... @@ -700,30 +692,6 @@ class SettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragment,
    700 692
             setupConnectionPreferences()
    
    701 693
         }
    
    702 694
     
    
    703
    -    private val setToDefaultPromptRequestLauncher: ActivityResultLauncher<Intent> =
    
    704
    -        registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
    
    705
    -            with(requireContext()) {
    
    706
    -                maybeNavigateToSystemSetToDefaultAction(result.resultCode, settings(), dateTimeProvider) {
    
    707
    -                    navigateToDefaultBrowserAppsSettings(BuildManufacturerChecker())
    
    708
    -                }
    
    709
    -            }
    
    710
    -        }
    
    711
    -
    
    712
    -    /**
    
    713
    -     * For >=Q -> Use new RoleManager API to show in-app browser switching dialog.
    
    714
    -     * For <Q && >=N -> Navigate user to Android Default Apps Settings.
    
    715
    -     * For <N -> Open sumo page to show user how to change default app.
    
    716
    -     */
    
    717
    -    private fun getClickListenerForMakeDefaultBrowser(): Preference.OnPreferenceClickListener {
    
    718
    -        return Preference.OnPreferenceClickListener {
    
    719
    -            maybeRequestDefaultBrowserPrompt(
    
    720
    -                WeakReference((requireActivity() as? HomeActivity)),
    
    721
    -                setToDefaultPromptRequestLauncher,
    
    722
    -            )
    
    723
    -            true
    
    724
    -        }
    
    725
    -    }
    
    726
    -
    
    727 695
         private fun navigateFromSettings(directions: NavDirections) {
    
    728 696
             view?.findNavController()?.let { navController ->
    
    729 697
                 if (navController.currentDestination?.id == R.id.settingsFragment) {
    

  • mobile/android/fenix/app/src/main/res/xml/preferences.xml
    ... ... @@ -108,11 +108,6 @@
    108 108
                 app:iconSpaceReserved="false"
    
    109 109
                 app:isPreferenceVisible="false"
    
    110 110
                 android:title="@string/preferences_import_bookmarks" />
    
    111
    -
    
    112
    -        <org.mozilla.fenix.settings.DefaultBrowserPreference
    
    113
    -            android:key="@string/pref_key_make_default_browser"
    
    114
    -            app:iconSpaceReserved="false"
    
    115
    -            android:title="@string/preferences_set_as_default_browser" />
    
    116 111
         </androidx.preference.PreferenceCategory>
    
    117 112
     
    
    118 113
         <androidx.preference.PreferenceCategory
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx