Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components
Commits:
-
86094a92
by Alex Catarineu at 2020-10-10T14:11:59+00:00
1 changed file:
Changes:
... | ... | @@ -50,7 +50,7 @@ internal const val DEFAULT_READ_TIMEOUT_IN_SECONDS = 20L |
50 | 50 |
* cache is being used by default.
|
51 | 51 |
* @property client A reference of [Client] for interacting with the AMO HTTP api.
|
52 | 52 |
*/
|
53 |
-class AddonCollectionProvider(
|
|
53 |
+open class AddonCollectionProvider(
|
|
54 | 54 |
private val context: Context,
|
55 | 55 |
private val client: Client,
|
56 | 56 |
private val serverURL: String = DEFAULT_SERVER_URL,
|
... | ... | @@ -143,7 +143,7 @@ class AddonCollectionProvider( |
143 | 143 |
* a connectivity problem or a timeout.
|
144 | 144 |
*/
|
145 | 145 |
@Throws(IOException::class)
|
146 |
- suspend fun getAddonIconBitmap(addon: Addon): Bitmap? {
|
|
146 |
+ open suspend fun getAddonIconBitmap(addon: Addon): Bitmap? {
|
|
147 | 147 |
var bitmap: Bitmap? = null
|
148 | 148 |
if (addon.iconUrl != "") {
|
149 | 149 |
client.fetch(
|
... | ... | @@ -161,7 +161,7 @@ class AddonCollectionProvider( |
161 | 161 |
}
|
162 | 162 |
|
163 | 163 |
@VisibleForTesting
|
164 |
- internal fun writeToDiskCache(collectionResponse: String) {
|
|
164 |
+ protected fun writeToDiskCache(collectionResponse: String) {
|
|
165 | 165 |
synchronized(diskCacheLock) {
|
166 | 166 |
getCacheFile(context).writeString { collectionResponse }
|
167 | 167 |
}
|