Loading components/feature/downloads/build.gradle +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ android { arg("room.schemaLocation", "$projectDir/schemas".toString()) } } buildConfigField("boolean", "ANDROID_DOWNLOADS_INTEGRATION", "false") } buildTypes { Loading components/feature/downloads/src/main/java/mozilla/components/feature/downloads/AbstractFetchDownloadService.kt +6 −2 Original line number Diff line number Diff line Loading @@ -371,7 +371,9 @@ abstract class AbstractFetchDownloadService : Service() { style.notificationAccentColor ) COMPLETED -> { if (BuildConfig.ANDROID_DOWNLOADS_INTEGRATION) { addToDownloadSystemDatabaseCompat(download.state, scope) } DownloadNotification.createDownloadCompletedNotification( context, download, Loading Loading @@ -839,7 +841,9 @@ abstract class AbstractFetchDownloadService : Service() { } @VisibleForTesting internal fun shouldUseScopedStorage() = getSdkVersion() >= Build.VERSION_CODES.Q internal fun shouldUseScopedStorage() = BuildConfig.ANDROID_DOWNLOADS_INTEGRATION && getSdkVersion() >= Build.VERSION_CODES.Q /** * Gets the SDK version from the system. Loading components/feature/downloads/src/main/java/mozilla/components/feature/downloads/DownloadsFeature.kt +1 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import mozilla.components.browser.state.state.SessionState import mozilla.components.browser.state.state.content.DownloadState import mozilla.components.browser.state.store.BrowserStore import mozilla.components.feature.downloads.DownloadDialogFragment.Companion.FRAGMENT_TAG import mozilla.components.feature.downloads.manager.AndroidDownloadManager import mozilla.components.feature.downloads.manager.DownloadManager import mozilla.components.feature.downloads.manager.noop import mozilla.components.feature.downloads.manager.onDownloadStopped Loading Loading @@ -70,7 +69,7 @@ class DownloadsFeature( internal val useCases: DownloadsUseCases, override var onNeedToRequestPermissions: OnNeedToRequestPermissions = { }, onDownloadStopped: onDownloadStopped = noop, private val downloadManager: DownloadManager = AndroidDownloadManager(applicationContext, store), private val downloadManager: DownloadManager, private val tabId: String? = null, private val fragmentManager: FragmentManager? = null, private val promptsStyling: PromptsStyling? = null, Loading Loading
components/feature/downloads/build.gradle +2 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ android { arg("room.schemaLocation", "$projectDir/schemas".toString()) } } buildConfigField("boolean", "ANDROID_DOWNLOADS_INTEGRATION", "false") } buildTypes { Loading
components/feature/downloads/src/main/java/mozilla/components/feature/downloads/AbstractFetchDownloadService.kt +6 −2 Original line number Diff line number Diff line Loading @@ -371,7 +371,9 @@ abstract class AbstractFetchDownloadService : Service() { style.notificationAccentColor ) COMPLETED -> { if (BuildConfig.ANDROID_DOWNLOADS_INTEGRATION) { addToDownloadSystemDatabaseCompat(download.state, scope) } DownloadNotification.createDownloadCompletedNotification( context, download, Loading Loading @@ -839,7 +841,9 @@ abstract class AbstractFetchDownloadService : Service() { } @VisibleForTesting internal fun shouldUseScopedStorage() = getSdkVersion() >= Build.VERSION_CODES.Q internal fun shouldUseScopedStorage() = BuildConfig.ANDROID_DOWNLOADS_INTEGRATION && getSdkVersion() >= Build.VERSION_CODES.Q /** * Gets the SDK version from the system. Loading
components/feature/downloads/src/main/java/mozilla/components/feature/downloads/DownloadsFeature.kt +1 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import mozilla.components.browser.state.state.SessionState import mozilla.components.browser.state.state.content.DownloadState import mozilla.components.browser.state.store.BrowserStore import mozilla.components.feature.downloads.DownloadDialogFragment.Companion.FRAGMENT_TAG import mozilla.components.feature.downloads.manager.AndroidDownloadManager import mozilla.components.feature.downloads.manager.DownloadManager import mozilla.components.feature.downloads.manager.noop import mozilla.components.feature.downloads.manager.onDownloadStopped Loading Loading @@ -70,7 +69,7 @@ class DownloadsFeature( internal val useCases: DownloadsUseCases, override var onNeedToRequestPermissions: OnNeedToRequestPermissions = { }, onDownloadStopped: onDownloadStopped = noop, private val downloadManager: DownloadManager = AndroidDownloadManager(applicationContext, store), private val downloadManager: DownloadManager, private val tabId: String? = null, private val fragmentManager: FragmentManager? = null, private val promptsStyling: PromptsStyling? = null, Loading