SystemUpdate

public 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.

public abstract class SystemUpdate.Builder

Builder for SystemUpdate.

public abstract class SystemUpdate.SystemUpdateState

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 methods

static SystemUpdate.Builder
abstract Integer

Required.

abstract SystemUpdate.ApiLevelChange

Required.

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 methods

builder

public static SystemUpdate.Builder builder()

getApiLevel

public abstract Integer getApiLevel()

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

public abstract SystemUpdate.ApiLevelChange getApiLevelChange()

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

getDefaultInstance

public static SystemUpdate getDefaultInstance()

getInstruction

public Instruction getInstruction()

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

public abstract String getName()

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

public abstract Instant getReceivedTime()

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

public abstract String getSecurityPatchLevel()

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

public abstract Long getSizeBytes()

The estimated download size of the update package in bytes.

getSystemUpdateState

public SystemUpdate.SystemUpdateState getSystemUpdateState()

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

hasInstruction

public boolean hasInstruction()

Returns true if instruction is set.

hasSystemUpdateState

public boolean hasSystemUpdateState()

Returns true if systemUpdateState is set.

toBuilder

public abstract SystemUpdate.Builder toBuilder()