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
-
c73add30
by Dan Ballard at 2026-09-21T12:23:30-07:00
3 changed files:
- mobile/android/android-components/components/feature/contextmenu/src/main/java/mozilla/components/feature/contextmenu/DefaultSelectionActionDelegate.kt
- mobile/android/android-components/components/support/utils/src/main/java/mozilla/components/support/utils/TorUtils.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
Changes:
| ... | ... | @@ -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.
|
| ... | ... | @@ -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 | }
|
| ... | ... | @@ -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 | }
|