Package-level declarations

This package contains data classes representing update information.

Types

Link copied to clipboard

A unique identifier for detecting updates for one or more update components.

Link copied to clipboard

Detect update check result.

Link copied to clipboard

Defines the download failure reason.

Link copied to clipboard

Defines the reason why a download is paused.

Link copied to clipboard
@IviExperimental(reasons = [])
@Serializable
enum InstallRequirement : Enum<InstallRequirement>

Defines the requirement that needs to be met before an update can be installed.

Link copied to clipboard

Action to be performed after an update installation is applied.

Link copied to clipboard
@IviExperimental(reasons = [])
data class Update(val info: UpdateInfo, val localization: UpdateLocalization) : Parcelable

Holds all the data associated with an update.

Link copied to clipboard

Defines the update cancellation reason.

Link copied to clipboard
@IviExperimental(reasons = [])
@Serializable
value class UpdateComponentId(val id: String) : Parcelable

Unique identifier for the component to be updated.

Link copied to clipboard
@IviExperimental(reasons = [])
data class UpdateComponentInfo(val id: UpdateComponentId, val displayName: StringResolver, val updates: List<Update> = emptyList(), val requiresOptIn: Boolean = false) : Parcelable

All information regarding an updatable component.

Link copied to clipboard
@Serializable
value class UpdateFeedId(val id: String) : Parcelable

Identifies an update feed.

Link copied to clipboard
@IviExperimental(reasons = [])
@Serializable(with = UpdateIdSerializer::class)
data class UpdateId(val updateComponentId: UpdateComponentId, val versionInfo: VersionInfo) : Parcelable

Used to uniquely identify the update.

Link copied to clipboard
@IviExperimental(reasons = [])
@Serializable
data class UpdateInfo(val updateId: UpdateId, val urgency: UpdateUrgency, val timeToStartUpdate: Instant? = null, val sizeInBytes: Long?, val installRequirements: EnumSet<InstallRequirement> = EnumSet.noneOf(InstallRequirement::class.java), val estimatedDownloadTime: Duration? = null, val estimatedInstallTime: Duration? = null, val estimatedOutOfOrderTime: Duration? = null, val postInstallActions: List<PostInstallAction> = emptyList(), val status: UpdateStatus = UpdateStatus.DownloadPending, val dependenciesBetweenUpdates: List<UpdateId> = emptyList(), val updateFeedId: UpdateFeedId = UpdateFeedId.RELEASE) : Parcelable

Holds all the meta-data associated with an update.

Link copied to clipboard
@IviExperimental(reasons = [])
data class UpdateLocalization(val versionName: StringResolver, val releaseNotes: StringResolver? = null, val downloadCompleteMessage: StringResolver? = null, val downloadFailedMessage: StringResolver? = null, val installationCompleteMessage: StringResolver? = null, val installationFailedMessage: StringResolver? = null) : Parcelable

Localization of an update.

Link copied to clipboard
@IviExperimental(reasons = [])
data class UpdatePolicy(val urgency: UpdateUrgency, val installRequirements: EnumSet<InstallRequirement> = EnumSet.noneOf(InstallRequirement::class.java), val postInstallActions: List<PostInstallAction> = emptyList())

Defines the policy of an update.

Link copied to clipboard
@IviExperimental(reasons = [])
sealed class UpdaterNotification : Parcelable

Notifications for software component updates.

Link copied to clipboard
@IviExperimental(reasons = [])
@Serializable
sealed class UpdateStatus : Parcelable

Update status.

Link copied to clipboard
@IviExperimental(reasons = [])
sealed class UpdateUiEvent : Parcelable

UI events for an update.

Link copied to clipboard
@IviExperimental(reasons = [])
data class UpdateUiEventData(val event: UpdateUiEvent, val updateId: UpdateId) : Parcelable

An UpdateUiEvent associated to an updateId.

Link copied to clipboard

How urgently should an update be applied.

Link copied to clipboard
@Serializable
@IviExperimental(reasons = [])
data class VersionInfo(val versionName: String, val versionCode: Long?) : Parcelable

Version information.

Functions

Link copied to clipboard
@IviExperimental(reasons = [])
fun VersionInfo.isDowngradeOrSame(other: VersionInfo, versionInfoComparator: Comparator<VersionInfo>): Boolean

Returns true if this version is a downgrade compared to other or if this version is the same as other.

Link copied to clipboard

Returns true if the update state is a final state.

Link copied to clipboard

Returns true if the update is in a final state.

Link copied to clipboard

Creates a VersionInfo from a PackageInfo instance.