UpdateChecker

class UpdateChecker(compatibilityChecker: CompatibilityChecker)

Constructors

Link copied to clipboard
constructor(compatibilityChecker: CompatibilityChecker)

Functions

Link copied to clipboard
fun <T : PackageVersion> getSuggestedVersion(versions: List<T>, preferredSigner: String?, releaseChannels: List<String>? = null, preferencesGetter: () -> PackagePreference?? = null): T?

Returns the PackageVersion that is suggested for a new installation or null if there is no suitable candidate in versions.

Link copied to clipboard
fun <T : PackageVersion> getUpdate(versions: List<T>, packageInfo: PackageInfo, releaseChannels: List<String>? = null, includeKnownVulnerabilities: Boolean = false, preferencesGetter: () -> PackagePreference?? = null): T?

Returns a PackageVersion for the given packageInfo that is the suggested update or null if there is no suitable update in versions.

fun <T : PackageVersion> getUpdate(versions: List<T>, allowedSignersGetter: () -> Set<String>?? = null, installedVersionCode: Long = 0, allowedReleaseChannels: List<String>? = null, includeKnownVulnerabilities: Boolean = false, preferencesGetter: () -> PackagePreference?? = null): T?

Returns the PackageVersion that is the suggested update for the given installedVersionCode or suggested for new installed if the given code is 0, or null if there is no suitable candidate in versions.