HandlerBasedUpdaterService

@IviExperimental(reasons = [])
class HandlerBasedUpdaterService(iviServiceHostContext: IviServiceHostContext, iviDiscoverableServiceIdProvider: IviDiscoverableServiceIdProvider, handlers: List<ComponentUpdateHandler>) : UpdaterServiceBase

An UpdaterService implementation which consists of one or more handlers.

Each ComponentUpdateHandler can handle updates for one or more updatable components. The handlers are initialized when the service is created.

The UpdaterService.startDownload, UpdaterService.startInstallation and UpdaterService.onReceiveBroadcast calls are forwarded to all handlers. ComponentUpdateHandler.detectUpdate is called on the first handler with a matching handler ID when UpdaterService.detectUpdate is called. Handlers can use scheduleDetectUpdate to schedule the invocation of the UpdaterService.detectUpdate call.

Constructors

Link copied to clipboard
constructor(iviServiceHostContext: IviServiceHostContext, iviDiscoverableServiceIdProvider: IviDiscoverableServiceIdProvider, handlers: List<ComponentUpdateHandler>)

Inherited properties

Functions

Link copied to clipboard
open suspend override fun checkForUpdates(): DetectUpdateResult
Link copied to clipboard
open suspend override fun detectUpdate(detectUpdateHandlerId: DetectUpdateHandlerId): DetectUpdateResult
Link copied to clipboard
open override fun onConfigurationChanged(newConfig: Configuration)
Link copied to clipboard
open override fun onCreate()
Link copied to clipboard
open suspend override fun onReceiveBroadcast(intent: Intent)
Link copied to clipboard
open suspend override fun removeFinishedUpdate(updateId: UpdateId)
Link copied to clipboard
open suspend override fun startDownload(updateId: UpdateId)
Link copied to clipboard
open suspend override fun startInstallation(updateId: UpdateId)

Inherited functions

Link copied to clipboard
open override fun appendStatusInfo(stringBuilder: StringBuilder)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onDestroy()