File tree 2 files changed +6
-0
lines changed
app/src/main/java/org/mozilla/reference/browser
2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import android.annotation.SuppressLint
8
8
import android.content.Context
9
9
import androidx.core.app.NotificationManagerCompat
10
10
import mozilla.components.feature.autofill.AutofillConfiguration
11
+ import mozilla.components.feature.downloads.DefaultFileSizeFormatter
12
+ import mozilla.components.feature.downloads.FileSizeFormatter
11
13
import mozilla.components.support.base.android.NotificationsDelegate
12
14
import org.mozilla.reference.browser.autofill.AutofillConfirmActivity
13
15
import org.mozilla.reference.browser.autofill.AutofillSearchActivity
@@ -78,4 +80,6 @@ class Components(private val context: Context) {
78
80
notificationManagerCompat,
79
81
)
80
82
}
83
+
84
+ val fileSizeFormatter: FileSizeFormatter by lazy { DefaultFileSizeFormatter (context.applicationContext) }
81
85
}
Original file line number Diff line number Diff line change @@ -6,11 +6,13 @@ package org.mozilla.reference.browser.downloads
6
6
7
7
import mozilla.components.browser.state.store.BrowserStore
8
8
import mozilla.components.feature.downloads.AbstractFetchDownloadService
9
+ import mozilla.components.feature.downloads.FileSizeFormatter
9
10
import mozilla.components.support.base.android.NotificationsDelegate
10
11
import org.mozilla.reference.browser.ext.components
11
12
12
13
class DownloadService : AbstractFetchDownloadService () {
13
14
override val httpClient by lazy { components.core.client }
14
15
override val store: BrowserStore by lazy { components.core.store }
15
16
override val notificationsDelegate: NotificationsDelegate by lazy { components.notificationsDelegate }
17
+ override val fileSizeFormatter: FileSizeFormatter by lazy { components.fileSizeFormatter }
16
18
}
You can’t perform that action at this time.
0 commit comments