• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# JS API Changes of the Power Management Subsystem
2
3The table below lists the APIs changes of the power management subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| ohos.thermal | thermal | getThermalLevel(): ThermalLevel; | Added|
10| ohos.thermal | thermal | unsubscribeThermalLevel(callback?: AsyncCallback\<void>): void; | Added|
11| ohos.thermal | thermal | subscribeThermalLevel(callback: AsyncCallback\<ThermalLevel>): void; | Added|
12| ohos.thermal | ThermalLevel | EMERGENCY = 6 | Added|
13| ohos.thermal | ThermalLevel | WARNING = 5 | Added|
14| ohos.thermal | ThermalLevel | OVERHEATED = 4 | Added|
15| ohos.thermal | ThermalLevel | HOT = 3 | Added|
16| ohos.thermal | ThermalLevel | WARM = 2 | Added|
17| ohos.thermal | ThermalLevel | NORMAL = 1 | Added|
18| ohos.thermal | ThermalLevel | COOL = 0 | Added|
19| ohos.runninglock | runningLock | createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback\<RunningLock>): void;<br>createRunningLock(name: string, type: RunningLockType): Promise\<RunningLock>; | Added|
20| ohos.runninglock | runningLock | isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback\<boolean>): void;<br>isRunningLockTypeSupported(type: RunningLockType): Promise\<boolean>; | Added|
21