[tbb-commits] [Git][tpo/applications/android-components][android-components-57.0.7-10.0-1] 2 commits: Bug 40016: Allow inheriting from AddonCollectionProvider
Matthew Finkel
gitlab at torproject.org
Sat Oct 10 14:11:10 UTC 2020
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/9a05fc99ca9aa898108d654cdf041f183451fa62...172013b46f649e290c9d86050c383d8bb4cfc520
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/android-components/-/compare/9a05fc99ca9aa898108d654cdf041f183451fa62...172013b46f649e290c9d86050c383d8bb4cfc520
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20201010/8259e600/attachment-0001.htm>
More information about the tbb-commits
mailing list