SystemUpdate

abstract class SystemUpdate


An over-the-air (OTA) system update provided by an Original Equipment Manufacturer (OEM).

Summary

Nested types

Specifies whether the system update changes the Android API level.

abstract class SystemUpdate.Builder

Builder for SystemUpdate.

The current state of the system update, including reason.

Reason for ABORTED state.

Reason type for aborted state.

Builder for SystemUpdate.SystemUpdateState.AbortReason.

Builder for SystemUpdate.SystemUpdateState.

Reason for overriding BLOCK or USER_PROMPT instructions.

Builder for SystemUpdate.SystemUpdateState.OverrideReason.

Reason type for overriding the BLOCK or USER_PROMPT instruction.

Reason for DOWNLOAD_PREVENTED or APPLY_PREVENTED states.

Builder for SystemUpdate.SystemUpdateState.PreventionReason.

Reason type for prevented state.

One of the override reason, prevention reason or abort reason for the current state of the system update.

The possible kind of SystemUpdate.SystemUpdateState.ReasonCase.

Stage of a system update.

Public functions

java-static SystemUpdate.Builder!
abstract Int!

Required.

abstract SystemUpdate.ApiLevelChange!

Required.

java-static SystemUpdate!
Instruction!

Output-only.

abstract String!

Required.

abstract Instant!

Required.

abstract String!

Required.

abstract Long!

The estimated download size of the update package in bytes.

SystemUpdate.SystemUpdateState!

Output-only.

Boolean

Returns true if instruction is set.

Boolean

Returns true if systemUpdateState is set.

abstract SystemUpdate.Builder!

Public functions

builder

java-static fun builder(): SystemUpdate.Builder!

getApiLevel

abstract fun getApiLevel(): Int!

Required. The target Android API level after this update is applied. For example, this would be 35 if the update upgrades the device to Android 15.

getApiLevelChange

abstract fun getApiLevelChange(): SystemUpdate.ApiLevelChange!

Required. Whether this system update changes the Android API level.

getDefaultInstance

java-static fun getDefaultInstance(): SystemUpdate!

getInstruction

fun getInstruction(): Instruction!

Output-only. Instructions on how the update should be handled by the device. These instructions are determined and set by the Android Management API based on enterprise policy, not by the OEM. The OTA client receives these instructions that determine how to proceed with the update stages (e.g., download, apply). This field is not updatable by the OTA client.

getName

abstract fun getName(): String!

Required. The unique identifier for this specific system update. This name is generated and owned by the OEM's OTA client and must not be an empty string.

The name must be stable and unique for the content of the update. This means the same update content must always have the same name. This is crucial to prevent race conditions and ensure idempotency in API calls. Using a content hash (e.g., SHA-256) of the update package or a unique version string is recommended.

This name is used to deduplicate update notifications and track the status of the update. It has a maximum length of 128 characters.

getReceivedTime

abstract fun getReceivedTime(): Instant!

Required. The timestamp indicating when the device first became aware of this SystemUpdate. This time is used to evaluate policies based on the update's pending duration on the device.

getSecurityPatchLevel

abstract fun getSecurityPatchLevel(): String!

Required. The security patch level date of this update. The date must be represented as a string in 'YYYY-MM-DD' format. Example: "2025-07-05".

getSizeBytes

abstract fun getSizeBytes(): Long!

The estimated download size of the update package in bytes.

getSystemUpdateState

fun getSystemUpdateState(): SystemUpdate.SystemUpdateState!

Output-only. The current state of the system update.

hasInstruction

fun hasInstruction(): Boolean

Returns true if instruction is set.

hasSystemUpdateState

fun hasSystemUpdateState(): Boolean

Returns true if systemUpdateState is set.

toBuilder

abstract fun toBuilder(): SystemUpdate.Builder!