Fixes #40002 (closed).
Comparing to fennec, I think these changes are equivalent to our changes in tor-browser#25741 (closed) (by setting
MOZ_ANDROID_DOWNLOADS_INTEGRATION = false). I also put the
MediaStore usage behind this flag, as it seems it's the new way of doing
With these changes, running the command
apkanalyzer dex packages [final.apk] | grep 'android.provider.MediaStore\|android.app.DownloadManager' should find no ocurrence. So, even though I think the default
AndroidDownloadManager value in
DownloadFeature.kt is not used in
Fenix, removing it allows us to check
android.app.DownloadManager is unused via this command.
This is something we could run somewhere to monitor whether this changes in future versions/rebases. We do similar things in
tor-browser-bundle-testsuite, but perhaps checking this in the
tor-browser-build fenix or tor-browser build script would be good enough for now (similarly to the idea in tor-browser-build#40093 (closed)).