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

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-153.3.0esr-16.0-1] 2 commits: fixup! TB 34378: [android] Port external helper app prompting



Title: GitLab

Dan Ballard pushed to branch tor-browser-153.3.0esr-16.0-1 at The Tor Project / Applications / Tor Browser

Commits:

  • c589157b
    by Dan Ballard at 2026-09-21T12:23:30-07:00
    fixup! TB 34378: [android] Port external helper app prompting
    
    TB40627: Fix android share by making new intents with new request codes and not caching the dialog
    
  • c73add30
    by Dan Ballard at 2026-09-21T12:23:30-07:00
    fixup! [android] Disable features and functionality
    
    TB 40627: Remove Share function from selected text context menu
    

3 changed files:

Changes:

  • mobile/android/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/DefaultSelectionActionDelegate.kt
    ... ... @@ -26,7 +26,7 @@ internal const val EMAIL = "CUSTOM_CONTEXT_MENU_EMAIL"
    26 26
     @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
    
    27 27
     internal const val CALL = "CUSTOM_CONTEXT_MENU_CALL"
    
    28 28
     
    
    29
    -private val customActions = arrayOf(CALL, EMAIL, SEARCH, SEARCH_PRIVATELY, SHARE)
    
    29
    +private val customActions = arrayOf(SEARCH_PRIVATELY)
    
    30 30
     
    
    31 31
     /**
    
    32 32
      * Adds normal and private search buttons to text selection context menus.
    

  • mobile/android/android-components/components/support/utils/src/main/java/mozilla/components/support/utils/TorUtils.kt
    ... ... @@ -10,6 +10,7 @@ import android.content.Intent
    10 10
     
    
    11 11
     object TorUtils {
    
    12 12
         const val TORBROWSER_START_ACTIVITY_PROMPT = "torbrowser_start_activity_prompt"
    
    13
    +    var requestCode = 0
    
    13 14
     
    
    14 15
         // Delegates showing prompt and possibly starting the activity to the main app activity.
    
    15 16
         // Highly dependant on Fenix/Tor Browser for Android.
    
    ... ... @@ -19,7 +20,8 @@ object TorUtils {
    19 20
         fun startActivityPrompt(context: Context, intent: Intent) {
    
    20 21
             val intentContainer = Intent()
    
    21 22
             intentContainer.setPackage(context.applicationContext.packageName)
    
    22
    -        intentContainer.putExtra(TORBROWSER_START_ACTIVITY_PROMPT, PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_IMMUTABLE))
    
    23
    +        intentContainer.putExtra(TORBROWSER_START_ACTIVITY_PROMPT, PendingIntent.getActivity(context, requestCode, intent, PendingIntent.FLAG_IMMUTABLE))
    
    24
    +        requestCode++
    
    23 25
             intentContainer.flags = Intent.FLAG_ACTIVITY_NEW_TASK
    
    24 26
             context.startActivity(intentContainer)
    
    25 27
         }
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
    ... ... @@ -438,8 +438,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, Crash
    438 438
             }
    
    439 439
         }
    
    440 440
     
    
    441
    -    private var dialog: RedirectDialogFragment? = null
    
    442
    -
    
    443 441
         private val providerStoppedViewModel: ProviderStoppedViewModel by viewModels()
    
    444 442
     
    
    445 443
         private val urlQuickLoadViewModel: UrlQuickLoadViewModel by viewModels()
    
    ... ... @@ -991,15 +989,9 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, Crash
    991 989
     
    
    992 990
         // Copied from mozac AppLinksFeature.kt
    
    993 991
         internal fun getOrCreateDialog(): RedirectDialogFragment {
    
    994
    -        val existingDialog = dialog
    
    995
    -        if (existingDialog != null) {
    
    996
    -            return existingDialog
    
    997
    -        }
    
    998
    -
    
    999 992
             SimpleRedirectDialogFragment.newInstance(
    
    1000 993
                     getString(appLinksR.string.mozac_feature_applinks_normal_confirm_dialog_title),
    
    1001 994
                 ).also {
    
    1002
    -                dialog = it
    
    1003 995
                     return it
    
    1004 996
                 }
    
    1005 997
         }
    

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