SystemUpdate.SystemUpdateState.Builder

abstract class SystemUpdate.SystemUpdateState.Builder


SystemUpdate.SystemUpdateState 的构建器。

摘要

公共函数

build

abstract fun build(): SystemUpdate.SystemUpdateState!

clearReason

fun clearReason(): SystemUpdate.SystemUpdateState.Builder!

清除之前设置的所有原因。

setAbortReason

fun setAbortReason(value: SystemUpdate.SystemUpdateState.AbortReason!): SystemUpdate.SystemUpdateState.Builder!

中止原因。当更新不再可用时,更新会中止。

setAbortReason

fun setAbortReason(
    value: SystemUpdate.SystemUpdateState.AbortReason.Builder!
): SystemUpdate.SystemUpdateState.Builder!

中止原因。当更新不再可用时,更新会中止。

setOverrideReason

fun setOverrideReason(value: SystemUpdate.SystemUpdateState.OverrideReason!): SystemUpdate.SystemUpdateState.Builder!

替换原因。当 OTA 客户端继续执行更新阶段(尽管有 BLOCK 指令)或继续执行更新阶段(没有 USER_PROMPT 指令的用户确认)时,指令会被替换。替换指令时,必须提供原因。

setOverrideReason

fun setOverrideReason(
    value: SystemUpdate.SystemUpdateState.OverrideReason.Builder!
): SystemUpdate.SystemUpdateState.Builder!

替换原因。当 OTA 客户端继续执行更新阶段(尽管有 BLOCK 指令)或继续执行更新阶段(没有 USER_PROMPT 指令的用户确认)时,指令会被替换。替换指令时,必须提供原因。

setPreventionReason

fun setPreventionReason(
    value: SystemUpdate.SystemUpdateState.PreventionReason!
): SystemUpdate.SystemUpdateState.Builder!

阻止原因。当 OTA 客户端收到强制继续执行的指令,或者客户端收到 USER_PROMPT 指令且用户已提供确认,但 OTA 客户端无法继续执行时,指令会被阻止。(例如,电池电量不足、没有网络)。

setPreventionReason

fun setPreventionReason(
    value: SystemUpdate.SystemUpdateState.PreventionReason.Builder!
): SystemUpdate.SystemUpdateState.Builder!

阻止原因。当 OTA 客户端收到强制继续执行的指令,或者客户端收到 USER_PROMPT 指令且用户已提供确认,但 OTA 客户端无法继续执行时,指令会被阻止。(例如,电池电量不足、没有网络)。