• 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.2 Beta1 over OpenHarmony 3.1 Release.
4
5## API Changes
6
7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type|
8|---|---|---|---|
9| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_TECHNOLOGY | Added|
10| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_PRESENT | Added|
11| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_CHARGE_COUNTER | Added|
12| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_CHARGE_STATE | Added|
13| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_MAX_VOLTAGE | Added|
14| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_MAX_CURRENT | Added|
15| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_PLUGGED_TYPE | Added|
16| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_HEALTH_STATE | Added|
17| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_TEMPERATURE | Added|
18| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_VOLTAGE | Added|
19| ohos.batteryinfo | CommonEventBatteryChangedCode | EXTRA_SOC = 0 | Added|
20| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_CRITICAL | Added|
21| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_LOW | Added|
22| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_NORMAL | Added|
23| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_HIGH | Added|
24| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_FULL | Added|
25| ohos.batteryinfo | BatteryCapacityLevel | LEVEL_NONE | Added|
26| ohos.batteryinfo | batteryInfo | const remainingEnergy: number; | Added|
27| ohos.batteryinfo | batteryInfo | const nowCurrent: number; | Added|
28| ohos.batteryinfo | batteryInfo | const totalEnergy: number; | Added|
29| ohos.batteryinfo | batteryInfo | const estimatedRemainingChargeTime: number; | Added|
30| ohos.batteryinfo | batteryInfo | const batteryCapacityLevel: BatteryCapacityLevel; | Added|
31| ohos.power | DevicePowerMode | MODE_EXTREME_POWER_SAVE | Added|
32| ohos.power | DevicePowerMode | MODE_PERFORMANCE | Added|
33| ohos.power | DevicePowerMode | MODE_POWER_SAVE | Added|
34| ohos.power | DevicePowerMode | MODE_NORMAL = 600 | Added|
35| ohos.power | power | setPowerMode(mode: DevicePowerMode, callback: AsyncCallback\<void>): void;<br>setPowerMode(mode: DevicePowerMode): Promise\<void>; | Added|
36| ohos.power | power | getPowerMode(callback: AsyncCallback\<DevicePowerMode>): void;<br>getPowerMode(): Promise\<DevicePowerMode>; | Added|
37| ohos.power | power | suspendDevice(): void; | Added|
38| ohos.power | power | wakeupDevice(detail: string): void; | Added|
39