android-components / mozilla.components.feature.addons.update / DefaultAddonUpdater

DefaultAddonUpdater

class DefaultAddonUpdater : AddonUpdater (source)

An implementation of AddonUpdater that uses the work manager api for scheduling new updates.

Constructors

Name Summary
<init> DefaultAddonUpdater(applicationContext: <ERROR CLASS>, frequency: Frequency = Frequency(1, TimeUnit.DAYS))
An implementation of AddonUpdater that uses the work manager api for scheduling new updates.

Functions

Name Summary
onUpdatePermissionRequest fun onUpdatePermissionRequest(current: WebExtension, updated: WebExtension, newPermissions: List<String>, onPermissionsGranted: (Boolean) -> Unit): Unit
See AddonUpdater.onUpdatePermissionRequest
registerForFutureUpdates fun registerForFutureUpdates(addonId: String): Unit
See AddonUpdater.registerForFutureUpdates
unregisterForFutureUpdates fun unregisterForFutureUpdates(addonId: String): Unit
See AddonUpdater.unregisterForFutureUpdates
update fun update(addonId: String): Unit
See AddonUpdater.update

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.