
Matthew Finkel pushed to branch android-components-57.0.7-10.0-1 at The Tor Project / Applications / android-components Commits: 481f7ef0 by Alex Catarineu at 2020-10-10T11:51:57+02:00 Bug 40016: Allow inheriting from AddonCollectionProvider This will allow implementing our own AddonsProvider in fenix. - - - - - 172013b4 by Matthew Finkel at 2020-10-10T14:10:40+00:00 Merge remote-tracking branch 'acatgl/40016+2' into android-components-57.0.7-10.0-1 - - - - - 1 changed file: - components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AddonCollectionProvider.kt Changes: ===================================== components/feature/addons/src/main/java/mozilla/components/feature/addons/amo/AddonCollectionProvider.kt ===================================== @@ -50,7 +50,7 @@ internal const val DEFAULT_READ_TIMEOUT_IN_SECONDS = 20L * cache is being used by default. * @property client A reference of [Client] for interacting with the AMO HTTP api. */ -class AddonCollectionProvider( +open class AddonCollectionProvider( private val context: Context, private val client: Client, private val serverURL: String = DEFAULT_SERVER_URL, @@ -143,7 +143,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( @@ -161,7 +161,7 @@ class AddonCollectionProvider( } @VisibleForTesting - internal fun writeToDiskCache(collectionResponse: String) { + protected fun writeToDiskCache(collectionResponse: String) { synchronized(diskCacheLock) { getCacheFile(context).writeString { collectionResponse } } View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/... You're receiving this email because of your account on gitlab.torproject.org.