Fix android update system

This commit is contained in:
Vladimir Stoilov
2023-04-12 17:09:38 +02:00
parent 0562180ba9
commit 7cbabd50c4
4 changed files with 22 additions and 4 deletions

View File

@@ -58,6 +58,9 @@ var (
// more context to requests made by the registry when
// fetching resources from the update server.
UserAgent = "Core"
// Explicitly disables automatic software updates. Used in android.
DisableSoftwareAutoUpdate = false
)
const (
@@ -145,7 +148,7 @@ func start() error {
registry,
initialReleaseChannel,
true,
enableSoftwareUpdates(),
enableSoftwareUpdates() && !DisableSoftwareAutoUpdate,
enableIntelUpdates(),
)
if warning != nil {
@@ -247,7 +250,7 @@ func checkForUpdates(ctx context.Context) (err error) {
}
defer func() {
// Resolve any error and and send succes notification.
// Resolve any error and and send success notification.
if err == nil {
log.Infof("updates: successfully checked for updates")
notifyUpdateSuccess(forcedUpdate)