Dan Ballard pushed to branch tor-browser-153.1.0esr-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
40b71286
by Dan Ballard at 2026-08-19T14:13:06-07:00
3 changed files:
- mobile/android/android-components/components/feature/downloads/src/main/java/mozilla/components/feature/downloads/DownloadsFeature.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/addons/AddonPopupBaseFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/snackbar/SnackbarBinding.kt
Changes:
| ... | ... | @@ -148,7 +148,7 @@ class DownloadsFeature( |
| 148 | 148 | private val promptsStyling: PromptsStyling? = null,
|
| 149 | 149 | private val onDownloadStartedListener: ((String) -> Unit) = {},
|
| 150 | 150 | private val dismissCustomFirstPartyDownloadDialog: () -> Unit = {},
|
| 151 | - private val shouldForwardToThirdParties: () -> Boolean = { false },
|
|
| 151 | + private var shouldForwardToThirdParties: () -> Boolean = { false },
|
|
| 152 | 152 | private val customFirstPartyDownloadDialog: (
|
| 153 | 153 | (
|
| 154 | 154 | CurrentDownloadState,
|
| ... | ... | @@ -173,6 +173,9 @@ class DownloadsFeature( |
| 173 | 173 | |
| 174 | 174 | init {
|
| 175 | 175 | this.onDownloadStopped = onDownloadStopped
|
| 176 | + // TB#44054 adding second override along with tb#40002 adding `&& false` to caught instantiations
|
|
| 177 | + // of this class, so that we still disable this when new instantiations are added
|
|
| 178 | + this.shouldForwardToThirdParties = { false }
|
|
| 176 | 179 | }
|
| 177 | 180 | |
| 178 | 181 | private var scope: CoroutineScope? = null
|
| ... | ... | @@ -136,7 +136,7 @@ abstract class AddonPopupBaseFragment : |
| 136 | 136 | PreferenceManager.getDefaultSharedPreferences(requireContext()).getBoolean(
|
| 137 | 137 | requireContext().getPreferenceKey(R.string.pref_key_external_download_manager),
|
| 138 | 138 | false,
|
| 139 | - )
|
|
| 139 | + ) && false
|
|
| 140 | 140 | },
|
| 141 | 141 | promptsStyling = DownloadsFeature.PromptsStyling(
|
| 142 | 142 | gravity = Gravity.BOTTOM,
|
| ... | ... | @@ -328,7 +328,7 @@ class SnackbarBinding( |
| 328 | 328 | subText = state.downloadState.fileName,
|
| 329 | 329 | subTextOverflow = TextOverflow.MiddleEllipsis,
|
| 330 | 330 | duration = context.components.settings.getSnackbarTimeout(hasAction = true).value.toInt(),
|
| 331 | - action = context.getString(R.string.download_completed_snackbar_action_open),
|
|
| 331 | + action = if (state.downloadState.isPdf) context.getString(R.string.download_completed_snackbar_action_open) else null,
|
|
| 332 | 332 | ) {
|
| 333 | 333 | val fileWasOpened = downloadFileUtils.openFile(
|
| 334 | 334 | fileName = state.downloadState.fileName,
|