OemSystemUpdateHandler

interface OemSystemUpdateHandler


Interface for the OEM's OTA client to implement.

The methods within this interface are called by the Android Management API's on-device component to the OEM's OTA client.

See also com.google.android.managementapi.notification.NotificationReceiverService.getOemSystemUpdateHandler.

Summary

Public functions

UpdateControlState

Called by AMAPI to retrieve the current system update control state from the OTA client.

ListPendingSystemUpdatesResponse
listPendingSystemUpdates(
    listPendingSystemUpdatesRequest: ListPendingSystemUpdatesRequest
)

Called by AMAPI to request the current list of pending system updates from the OTA client.

NotifySystemUpdatesChangedResponse
onSystemUpdatesChanged(
    notifySystemUpdatesChangedRequest: NotifySystemUpdatesChangedRequest
)

Called by AMAPI when the instructions for one or more pending system updates have changed.

Public functions

getUpdateControlState

fun getUpdateControlState(request: GetUpdateControlStateRequest): UpdateControlState

Called by AMAPI to retrieve the current system update control state from the OTA client. The OTA client implementation must return the current system update control state

Returns
UpdateControlState

The OTA client's current UpdateControlState.

listPendingSystemUpdates

fun listPendingSystemUpdates(
    listPendingSystemUpdatesRequest: ListPendingSystemUpdatesRequest
): ListPendingSystemUpdatesResponse

Called by AMAPI to request the current list of pending system updates from the OTA client.

The OTA client should return all pending system updates it is currently aware of. A system update is considered pending if it is in a state where it can potentially be applied (i.e., AVAILABLE, DOWNLOADING, DOWNLOADED, DOWNLOAD_PREVENTED, or APPLY_PREVENTED) and has not yet been successfully applied or aborted. The SystemUpdate objects returned in ListPendingSystemUpdatesResponse.getSystemUpdates must only contain fields owned by the OEM (e.g., id, type, api_level, name, description, state, etc.).

Specifically, fields that are set by AMAPI, such as download_instruction and apply_instruction, are ignored and are not expected to be populated in the response. The returned data corresponds to the SYSTEM_UPDATE_VIEW_BASIC representation.

Parameters
listPendingSystemUpdatesRequest: ListPendingSystemUpdatesRequest

An empty ListPendingSystemUpdatesRequest.

Returns
ListPendingSystemUpdatesResponse

A ListPendingSystemUpdatesResponse containing the list of pending system updates as known by the OTA client.

onSystemUpdatesChanged

fun onSystemUpdatesChanged(
    notifySystemUpdatesChangedRequest: NotifySystemUpdatesChangedRequest
): NotifySystemUpdatesChangedResponse

Called by AMAPI when the instructions for one or more pending system updates have changed.

The OEM client must process the information contained in the request for the referenced system updates.

Parameters
notifySystemUpdatesChangedRequest: NotifySystemUpdatesChangedRequest

The NotifySystemUpdatesChangedRequest from AMAPI containing the list of changed system updates.