Matthew Finkel pushed to branch android-components-96.0.15-11.5-1 at The Tor Project / Applications / android-components
Commits: d6444a09 by aguestuser at 2022-02-18T13:22:07-05:00 Bug 40075: Support scoped storage to enable downloads on API < 29
- in android-components!7, we blocked all usage of Scoped Storage in an attempt to block usage of Android's DownloadManager, which is known to cause proxy bypasses - as of Android API 29, downloads will not work without Scoped Storage, causing all downlaods to fail (see: fenix##40192) - here, we enable usage of scoped storage for API >= 29, but block calls to DownloadManager on API < 29
- - - - - e2daac07 by aguestuser at 2022-02-18T17:09:02-05:00 fixup! Bug 40075: Support scoped storage to enable downloads on API < 29
- abandon attempts to block writing file metadata to system db, as justified in https://gitlab.torproject.org/tpo/applications/android-components/-/issues/4... - this frees us to eliminate the `ANDROID_DOWNLOADS_INTEGRATION` feature toggle altogether
- - - - - 6ae3342f by Matthew Finkel at 2022-02-24T17:26:55+00:00 Merge remote-tracking branch 'aguestusergl/bug-40075_support-scoped-storage' into android-components-96.0.15-11.5-1
- - - - -
2 changed files:
- components/feature/downloads/build.gradle - components/feature/downloads/src/main/java/mozilla/components/feature/downloads/AbstractFetchDownloadService.kt
Changes:
===================================== components/feature/downloads/build.gradle ===================================== @@ -21,8 +21,6 @@ android { arg("room.schemaLocation", "$projectDir/schemas".toString()) } } - - buildConfigField("boolean", "ANDROID_DOWNLOADS_INTEGRATION", "false") }
buildTypes {
===================================== components/feature/downloads/src/main/java/mozilla/components/feature/downloads/AbstractFetchDownloadService.kt ===================================== @@ -371,9 +371,7 @@ abstract class AbstractFetchDownloadService : Service() { style.notificationAccentColor ) COMPLETED -> { - if (BuildConfig.ANDROID_DOWNLOADS_INTEGRATION) { - addToDownloadSystemDatabaseCompat(download.state, scope) - } + addToDownloadSystemDatabaseCompat(download.state, scope) DownloadNotification.createDownloadCompletedNotification( context, download, @@ -841,9 +839,7 @@ abstract class AbstractFetchDownloadService : Service() { }
@VisibleForTesting - internal fun shouldUseScopedStorage() = - BuildConfig.ANDROID_DOWNLOADS_INTEGRATION && - getSdkVersion() >= Build.VERSION_CODES.Q + internal fun shouldUseScopedStorage() = getSdkVersion() >= Build.VERSION_CODES.Q
/** * Gets the SDK version from the system.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/...
tbb-commits@lists.torproject.org