| 操作 | 旧版本 | 新版本 | 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\;
旧版本信息:|类名:power;
方法or属性:function isScreenOn(): Promise\;
新版本信息:9
代替接口: power#isActive|@ohos.power.d.ts|
|废弃版本有变化|类名:runningLock;
方法or属性:function isRunningLockTypeSupported(type: RunningLockType): Promise\;
旧版本信息:|类名:runningLock;
方法or属性:function isRunningLockTypeSupported(type: RunningLockType): Promise\;
新版本信息:9
代替接口: RunningLock#isSupported|@ohos.runningLock.d.ts|
|废弃版本有变化|类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise\;
旧版本信息:|类名:runningLock;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise\;
新版本信息: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\>;
旧版本信息:|类名:batteryStats;
方法or属性:function getBatteryStats(): Promise\>;
新版本信息:202,4600101|@ohos.batteryStatistics.d.ts|
|错误码有变化|类名:batteryStats;
方法or属性:function getBatteryStats(callback: AsyncCallback\>): void;
旧版本信息:401|类名:batteryStats;
方法or属性:function getBatteryStats(callback: AsyncCallback\>): 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;
旧版本信息:201,401|类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode, callback: AsyncCallback\): void;
新版本信息:201,202,401,4900101|@ohos.power.d.ts|
|错误码有变化|类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode): Promise\;
旧版本信息:201,401|类名:power;
方法or属性:function setPowerMode(mode: DevicePowerMode): Promise\;
新版本信息: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;
方法or属性:function createRunningLock(name: string, type: RunningLockType): Promise\;
新版本信息:ohos.permission.RUNNING_LOCK|@ohos.runningLock.d.ts|
|函数有变化|类名:power;
方法or属性:function suspend(): void;|类名:power;
方法or属性:function suspend(isImmediate?: boolean): void;|@ohos.power.d.ts|