FirmwareRecoveryDataSource

Persists a single PendingFirmwareRecovery record for a firmware update that may have left a device stranded in bootloader mode. Only the most recent trigger is retained (updates are one-device-at-a-time in practice).

Constructors

Link copied to clipboard
constructor(dataStore: DataStore<Preferences>)

Properties

Link copied to clipboard

The pending recovery record, or null when no interrupted update is outstanding.

Functions

Link copied to clipboard
open suspend fun clear()

Clears the outstanding recovery record (update finished, or the device returned on its own).

Link copied to clipboard
open suspend fun set(recovery: PendingFirmwareRecovery)

Records recovery as the outstanding interrupted update, replacing any previous record.