1.1K Star 6.2K Fork 5K

OpenHarmony / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
js-apidiff-battery.md 9.25 KB
一键复制 编辑 原始数据 按行查看 历史
时睿 提交于 2023-10-26 20:15 . 同步apidiff
操作 旧版本 新版本 d.ts文件
新增 NA 类名:ChargeType;
方法or属性:NONE
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRED_NORMAL
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRED_QUICK
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRED_SUPER_QUICK
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRELESS_NORMAL
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRELESS_QUICK
@ohos.charger.d.ts
新增 NA 类名:ChargeType;
方法or属性:WIRELESS_SUPER_QUICK
@ohos.charger.d.ts
新增 NA 类名:power;
方法or属性:function isStandby(): boolean;
@ohos.power.d.ts
废弃版本有变化 类名:power;
方法or属性:function isScreenOn(): Promise<boolean>;
旧版本信息:
类名:power;
方法or属性:function isScreenOn(): Promise<boolean>;
新版本信息:9
代替接口: power#isActive
@ohos.power.d.ts
废弃版本有变化 类名:runningLock;
方法or属性:function isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
旧版本信息:
类名:runningLock;
方法or属性:function isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
新版本信息:9
代替接口: RunningLock#isSupported
@ohos.runningLock.d.ts
废弃版本有变化 类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
旧版本信息:
类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
新版本信息:9
代替接口: RunningLock#create
@ohos.runningLock.d.ts
废弃版本有变化 类名:RunningLockType;
方法or属性:BACKGROUND = 1
旧版本信息:
类名:RunningLockType;
方法or属性:BACKGROUND = 1
新版本信息:10
代替接口:
@ohos.runningLock.d.ts
新增(错误码) 类名:batteryStats;
方法or属性:function getBatteryStats(): Promise<Array<BatteryStatsInfo>>;
旧版本信息:
类名:batteryStats;
方法or属性:function getBatteryStats(): Promise<Array<BatteryStatsInfo>>;
新版本信息:202,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:batteryStats;
方法or属性:function getBatteryStats(callback: AsyncCallback<Array<BatteryStatsInfo>>): void;
旧版本信息:401
类名:batteryStats;
方法or属性:function getBatteryStats(callback: AsyncCallback<Array<BatteryStatsInfo>>): void;
新版本信息:202,401,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:batteryStats;
方法or属性:function getAppPowerValue(uid: number): number;
旧版本信息:4600101
类名:batteryStats;
方法or属性:function getAppPowerValue(uid: number): number;
新版本信息:202,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:batteryStats;
方法or属性:function getAppPowerPercent(uid: number): number;
旧版本信息:4600101
类名:batteryStats;
方法or属性:function getAppPowerPercent(uid: number): number;
新版本信息:202,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:batteryStats;
方法or属性:function getHardwareUnitPowerValue(type: ConsumptionType): number;
旧版本信息:401,4600101
类名:batteryStats;
方法or属性:function getHardwareUnitPowerValue(type: ConsumptionType): number;
新版本信息:202,401,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:batteryStats;
方法or属性:function getHardwareUnitPowerPercent(type: ConsumptionType): number;
旧版本信息:401,4600101
类名:batteryStats;
方法or属性:function getHardwareUnitPowerPercent(type: ConsumptionType): number;
新版本信息:202,401,4600101
@ohos.batteryStatistics.d.ts
错误码有变化 类名:brightness;
方法or属性:function setValue(value: number): void;
旧版本信息:401,4700101
类名:brightness;
方法or属性:function setValue(value: number): void;
新版本信息:202,401,4700101
@ohos.brightness.d.ts
错误码有变化 类名:power;
方法or属性:function shutdown(reason: string): void;
旧版本信息:201,401,4900101
类名:power;
方法or属性:function shutdown(reason: string): void;
新版本信息:201,202,401,4900101
@ohos.power.d.ts
错误码有变化 类名:power;
方法or属性:function reboot(reason: string): void;
旧版本信息:201,401,4900101
类名:power;
方法or属性:function reboot(reason: string): void;
新版本信息:201,202,401,4900101
@ohos.power.d.ts
错误码有变化 类名:power;
方法or属性:function wakeup(detail: string): void;
旧版本信息:401,4900101
类名:power;
方法or属性:function wakeup(detail: string): void;
新版本信息:202,401,4900101
@ohos.power.d.ts
错误码有变化 类名:power;
方法or属性:function suspend(isImmediate?: boolean): void;
旧版本信息:4900101
类名:power;
方法or属性:function suspend(isImmediate?: boolean): void;
新版本信息:202,4900101
@ohos.power.d.ts
错误码有变化 类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void;
旧版本信息:201,401
类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void;
新版本信息:201,202,401,4900101
@ohos.power.d.ts
错误码有变化 类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode): Promise<void>;
旧版本信息:201,401
类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode): Promise<void>;
新版本信息:201,202,401,4900101
@ohos.power.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_INVALID = -17
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_INVALID = -17
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_APP
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_APP
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_BLUETOOTH
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_BLUETOOTH
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_IDLE
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_IDLE
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_PHONE
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_PHONE
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_RADIO
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_RADIO
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_SCREEN
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_SCREEN
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_USER
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_USER
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_WIFI
旧版本信息:
类名:ConsumptionType;
方法or属性:CONSUMPTION_TYPE_WIFI
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:BatteryStatsInfo;
方法or属性:uid: number;
旧版本信息:
类名:BatteryStatsInfo;
方法or属性:uid: number;
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:BatteryStatsInfo;
方法or属性:type: ConsumptionType;
旧版本信息:
类名:BatteryStatsInfo;
方法or属性:type: ConsumptionType;
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
访问级别有变化 类名:BatteryStatsInfo;
方法or属性:power: number;
旧版本信息:
类名:BatteryStatsInfo;
方法or属性:power: number;
新版本信息:systemapi
@ohos.batteryStatistics.d.ts
权限有变化 类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
旧版本信息:
类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
新版本信息:ohos.permission.RUNNING_LOCK
@ohos.runningLock.d.ts
函数有变化 类名:power;
方法or属性:function suspend(): void;
类名:power;
方法or属性:function suspend(isImmediate?: boolean): void;
@ohos.power.d.ts
其他
1
https://gitee.com/openharmony/docs.git
git@gitee.com:openharmony/docs.git
openharmony
docs
docs
OpenHarmony-4.0-Release

搜索帮助