harmony(鸿蒙)电源服务子系统JS API变更

  • 2022-08-09
  • 浏览 (581)

电源服务子系统JS API变更

OpenHarmony 3.1 Release版本相较于OpenHarmony 3.0 LTS版本,电源服务子系统的API变更如下:

接口变更

模块名 类名 方法/属性/枚举/常量 变更类型
ohos.thermal thermal getThermalLevel(): ThermalLevel; 新增
ohos.thermal thermal unsubscribeThermalLevel(callback?: AsyncCallback<void>): void; 新增
ohos.thermal thermal subscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void; 新增
ohos.thermal ThermalLevel EMERGENCY = 6 新增
ohos.thermal ThermalLevel WARNING = 5 新增
ohos.thermal ThermalLevel OVERHEATED = 4 新增
ohos.thermal ThermalLevel HOT = 3 新增
ohos.thermal ThermalLevel WARM = 2 新增
ohos.thermal ThermalLevel NORMAL = 1 新增
ohos.thermal ThermalLevel COOL = 0 新增
ohos.runninglock runningLock createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
新增
ohos.runninglock runningLock isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void;
isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
新增

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)3.1 release相对于3.1 beta变更详细说明

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)基础通信子系统JS API变更

0  赞