harmony(鸿蒙)JS API Changes of the Power Management Subsystem

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

JS API Changes of the Power Management Subsystem

The table below lists the APIs changes of the power management subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.

API Changes

Module Class Method/Attribute/Enumeration/Constant Change Type
ohos.thermal thermal getThermalLevel(): ThermalLevel; Added
ohos.thermal thermal unsubscribeThermalLevel(callback?: AsyncCallback<void>): void; Added
ohos.thermal thermal subscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void; Added
ohos.thermal ThermalLevel EMERGENCY = 6 Added
ohos.thermal ThermalLevel WARNING = 5 Added
ohos.thermal ThermalLevel OVERHEATED = 4 Added
ohos.thermal ThermalLevel HOT = 3 Added
ohos.thermal ThermalLevel WARM = 2 Added
ohos.thermal ThermalLevel NORMAL = 1 Added
ohos.thermal ThermalLevel COOL = 0 Added
ohos.runninglock runningLock createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
Added
ohos.runninglock runningLock isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void;
isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
Added

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)Readme

harmony(鸿蒙)Updates (OpenHarmony 3.1 Beta -> OpenHarmony 3.1 Release)

harmony(鸿蒙)JS API Changes of the Ability Framework

harmony(鸿蒙)JS API Changes of the Accessibility Subsystem

harmony(鸿蒙)JS API Changes of the Account Subsystem

harmony(鸿蒙)JS API Changes of the ArkUI Development Framework

harmony(鸿蒙)JS API Changes of the Bundle Management Framework

harmony(鸿蒙)JS API Changes of the Communication Subsystem

harmony(鸿蒙)JS API Changes of the Utils Subsystem

harmony(鸿蒙)JS API Changes of the DFX Subsystem

0  赞