Skip to content
Snippets Groups Projects
Commit c56a90a1 authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
Browse files

Bug 40016: Allow inheriting from AddonCollectionProvider

This will allow implementing our own AddonsProvider in fenix.
parent cbb5de32
Branches
Tags
1 merge request!32Bug 40026 00
......@@ -58,7 +58,7 @@ internal const val PAGE_SIZE = 50
* cache is being used by default
*/
@Suppress("LongParameterList")
class AddonCollectionProvider(
open class AddonCollectionProvider(
private val context: Context,
private val client: Client,
private val serverURL: String = DEFAULT_SERVER_URL,
......@@ -156,7 +156,7 @@ class AddonCollectionProvider(
* a connectivity problem or a timeout.
*/
@Throws(IOException::class)
suspend fun getAddonIconBitmap(addon: Addon): Bitmap? {
open suspend fun getAddonIconBitmap(addon: Addon): Bitmap? {
var bitmap: Bitmap? = null
if (addon.iconUrl != "") {
client.fetch(
......@@ -174,7 +174,7 @@ class AddonCollectionProvider(
}
@VisibleForTesting
internal fun writeToDiskCache(collectionResponse: String) {
protected fun writeToDiskCache(collectionResponse: String) {
synchronized(diskCacheLock) {
getCacheFile(context).writeString { collectionResponse }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment