openharmony 鸿蒙 js-apidiff-battery

2023-02-03 浏览 (637)

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

ModuleClassMethod/Attribute/Enumeration/ConstantChange Type
ohos.thermalthermalgetThermalLevel(): ThermalLevel;Added
ohos.thermalthermalunsubscribeThermalLevel(callback?: AsyncCallback<void>): void;Added
ohos.thermalthermalsubscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void;Added
ohos.thermalThermalLevelEMERGENCY = 6Added
ohos.thermalThermalLevelWARNING = 5Added
ohos.thermalThermalLevelOVERHEATED = 4Added
ohos.thermalThermalLevelHOT = 3Added
ohos.thermalThermalLevelWARM = 2Added
ohos.thermalThermalLevelNORMAL = 1Added
ohos.thermalThermalLevelCOOL = 0Added
ohos.runninglockrunningLockcreateRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
Added
ohos.runninglockrunningLockisRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void;
isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
Added

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Readme

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 Compiler and Runtime Subsystem

harmony 鸿蒙JS API Changes of the DFX Subsystem

harmony 鸿蒙JS API Changes of the Distributed Data Management Subsystem

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/604e1030a75843aa9cc5cc9723928695