[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/android-components][android-components-60.0.3-10.0-1] Bug 40016: Allow inheriting from AddonCollectionProvider



Title: GitLab

Matthew Finkel pushed to branch android-components-60.0.3-10.0-1 at The Tor Project / Applications / android-components

Commits:

1 changed file:

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
    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
             }
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits