harmony 鸿蒙js-apidiff-battery

  • 2023-06-24
  • 浏览 (384)

Change Type Old Version New Version d.ts File
Deleted Class name: power;
Method or attribute name: function shutdownDevice(reason: string): void;
NA @ohos.power.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_FULL
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_HIGH
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_NORMAL
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_LOW
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_WARNING
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_CRITICAL
@ohos.batteryInfo.d.ts
Added NA Class name: BatteryCapacityLevel;
Method or attribute name: LEVEL_SHUTDOWN
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_SOC = “soc”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_CHARGE_STATE = “chargeState”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_HEALTH_STATE = “healthState”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_PLUGGED_TYPE = “pluggedType”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_VOLTAGE = “voltage”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_TECHNOLOGY = “technology”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_TEMPERATURE = “temperature”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_PRESENT = “present”
@ohos.batteryInfo.d.ts
Added NA Class name: CommonEventBatteryChangedKey;
Method or attribute name: EXTRA_CAPACITY_LEVEL = “capacityLevel”
@ohos.batteryInfo.d.ts
Added NA Class name: power;
Method or attribute name: function shutdown(reason: string): void;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function reboot(reason: string): void;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function isActive(): boolean;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function wakeup(detail: string): void;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function suspend(): void;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function getPowerMode(): DevicePowerMode;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function setPowerMode(mode: DevicePowerMode, callback: AsyncCallback<void>): void;
@ohos.power.d.ts
Added NA Class name: power;
Method or attribute name: function setPowerMode(mode: DevicePowerMode): Promise<void>;
@ohos.power.d.ts
Added NA Class name: DevicePowerMode;
Method or attribute name: MODE_NORMAL = 600
@ohos.power.d.ts
Added NA Class name: DevicePowerMode;
Method or attribute name: MODE_POWER_SAVE
@ohos.power.d.ts
Added NA Class name: DevicePowerMode;
Method or attribute name: MODE_PERFORMANCE
@ohos.power.d.ts
Added NA Class name: DevicePowerMode;
Method or attribute name: MODE_EXTREME_POWER_SAVE
@ohos.power.d.ts
Added NA Class name: runningLock;
Method or attribute name: function isSupported(type: RunningLockType): boolean;
@ohos.runningLock.d.ts
Added NA Class name: runningLock;
Method or attribute name: function create(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
@ohos.runningLock.d.ts
Added NA Class name: runningLock;
Method or attribute name: function create(name: string, type: RunningLockType): Promise<RunningLock>;
@ohos.runningLock.d.ts
Added NA Class name: RunningLock;
Method or attribute name: hold(timeout: number): void;
@ohos.runningLock.d.ts
Added NA Class name: RunningLock;
Method or attribute name: isHolding(): boolean;
@ohos.runningLock.d.ts
Added NA Class name: RunningLock;
Method or attribute name: unhold(): void;
@ohos.runningLock.d.ts
Added NA Class name: thermal;
Method or attribute name: function registerThermalLevelCallback(callback: Callback<ThermalLevel>): void;
@ohos.thermal.d.ts
Added NA Class name: thermal;
Method or attribute name: function unregisterThermalLevelCallback(callback?: Callback<void>): void;
@ohos.thermal.d.ts
Added NA Class name: thermal;
Method or attribute name: function getLevel(): ThermalLevel;
@ohos.thermal.d.ts
Deprecated version changed Class name: power;
Method or attribute name: function rebootDevice(reason: string): void;
Old version:
Class name: power;
Method or attribute name: function rebootDevice(reason: string): void;
New version: 9
Substitute API:
@ohos.power.d.ts
Deprecated version changed Class name: power;
Method or attribute name: function isScreenOn(callback: AsyncCallback<boolean>): void;
Old version:
Class name: power;
Method or attribute name: function isScreenOn(callback: AsyncCallback<boolean>): void;
New version: 9
Substitute API:
@ohos.power.d.ts
Deprecated version changed Class name: power;
Method or attribute name: function isScreenOn(): Promise<boolean>;
Old version:
Class name: power;
Method or attribute name: function isScreenOn(): Promise<boolean>;
New version: 9
Substitute API:
@ohos.power.d.ts
Deprecated version changed Class name: runningLock;
Method or attribute name: function isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void;
Old version:
Class name: runningLock;
Method or attribute name: function isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback<boolean>): void;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: runningLock;
Method or attribute name: function isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
Old version:
Class name: runningLock;
Method or attribute name: function isRunningLockTypeSupported(type: RunningLockType): Promise<boolean>;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: runningLock;
Method or attribute name: function createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
Old version:
Class name: runningLock;
Method or attribute name: function createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback<RunningLock>): void;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: runningLock;
Method or attribute name: function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
Old version:
Class name: runningLock;
Method or attribute name: function createRunningLock(name: string, type: RunningLockType): Promise<RunningLock>;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: RunningLock;
Method or attribute name: lock(timeout: number): void;
Old version:
Class name: RunningLock;
Method or attribute name: lock(timeout: number): void;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: RunningLock;
Method or attribute name: isUsed(): boolean;
Old version:
Class name: RunningLock;
Method or attribute name: isUsed(): boolean;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: RunningLock;
Method or attribute name: unlock(): void;
Old version:
Class name: RunningLock;
Method or attribute name: unlock(): void;
New version: 9
Substitute API:
@ohos.runningLock.d.ts
Deprecated version changed Class name: thermal;
Method or attribute name: function subscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void;
Old version:
Class name: thermal;
Method or attribute name: function subscribeThermalLevel(callback: AsyncCallback<ThermalLevel>): void;
New version: 9
Substitute API:
@ohos.thermal.d.ts
Deprecated version changed Class name: thermal;
Method or attribute name: function unsubscribeThermalLevel(callback?: AsyncCallback<void>): void;
Old version:
Class name: thermal;
Method or attribute name: function unsubscribeThermalLevel(callback?: AsyncCallback<void>): void;
New version: 9
Substitute API:
@ohos.thermal.d.ts
Deprecated version changed Class name: thermal;
Method or attribute name: function getThermalLevel(): ThermalLevel;
Old version:
Class name: thermal;
Method or attribute name: function getThermalLevel(): ThermalLevel;
New version: 9
Substitute API:
@ohos.thermal.d.ts
Deprecated version changed Class name: BatteryResponse;
Method or attribute name: export interface BatteryResponse
Old version:
Class name: BatteryResponse;
Method or attribute name: export interface BatteryResponse
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: BatteryResponse;
Method or attribute name: charging: boolean;
Old version:
Class name: BatteryResponse;
Method or attribute name: charging: boolean;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: BatteryResponse;
Method or attribute name: level: number;
Old version:
Class name: BatteryResponse;
Method or attribute name: level: number;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: GetStatusOptions;
Method or attribute name: export interface GetStatusOptions
Old version:
Class name: GetStatusOptions;
Method or attribute name: export interface GetStatusOptions
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: GetStatusOptions;
Method or attribute name: success?: (data: BatteryResponse) => void;
Old version:
Class name: GetStatusOptions;
Method or attribute name: success?: (data: BatteryResponse) => void;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: GetStatusOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: GetStatusOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: GetStatusOptions;
Method or attribute name: complete?: () => void;
Old version:
Class name: GetStatusOptions;
Method or attribute name: complete?: () => void;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: Battery;
Method or attribute name: export default class Battery
Old version:
Class name: Battery;
Method or attribute name: export default class Battery
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: Battery;
Method or attribute name: static getStatus(options?: GetStatusOptions): void;
Old version:
Class name: Battery;
Method or attribute name: static getStatus(options?: GetStatusOptions): void;
New version: 6
Substitute API:
@system.battery.d.ts
Deprecated version changed Class name: BrightnessResponse;
Method or attribute name: export interface BrightnessResponse
Old version:
Class name: BrightnessResponse;
Method or attribute name: export interface BrightnessResponse
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: BrightnessResponse;
Method or attribute name: value: number;
Old version:
Class name: BrightnessResponse;
Method or attribute name: value: number;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessOptions;
Method or attribute name: value: number;
Old version:
Class name: SetBrightnessOptions;
Method or attribute name: value: number;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessOptions;
Method or attribute name: export interface GetBrightnessOptions
Old version:
Class name: GetBrightnessOptions;
Method or attribute name: export interface GetBrightnessOptions
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessOptions;
Method or attribute name: success?: (data: BrightnessResponse) => void;
Old version:
Class name: GetBrightnessOptions;
Method or attribute name: success?: (data: BrightnessResponse) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: GetBrightnessOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: SetBrightnessOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessModeOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: GetBrightnessModeOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessModeOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: SetBrightnessModeOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetKeepScreenOnOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
Old version:
Class name: SetKeepScreenOnOptions;
Method or attribute name: fail?: (data: string, code: number) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessOptions;
Method or attribute name: complete?: () => void;
Old version:
Class name: GetBrightnessOptions;
Method or attribute name: complete?: () => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessOptions;
Method or attribute name: complete?: () => void
Old version:
Class name: SetBrightnessOptions;
Method or attribute name: complete?: () => void
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessModeOptions;
Method or attribute name: complete?: () => void;
Old version:
Class name: GetBrightnessModeOptions;
Method or attribute name: complete?: () => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessModeOptions;
Method or attribute name: complete?: () => void
Old version:
Class name: SetBrightnessModeOptions;
Method or attribute name: complete?: () => void
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetKeepScreenOnOptions;
Method or attribute name: complete?: () => void
Old version:
Class name: SetKeepScreenOnOptions;
Method or attribute name: complete?: () => void
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessOptions;
Method or attribute name: export interface SetBrightnessOptions
Old version:
Class name: SetBrightnessOptions;
Method or attribute name: export interface SetBrightnessOptions
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessOptions;
Method or attribute name: success?: () => void;
Old version:
Class name: SetBrightnessOptions;
Method or attribute name: success?: () => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessModeOptions;
Method or attribute name: success?: () => void;
Old version:
Class name: SetBrightnessModeOptions;
Method or attribute name: success?: () => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetKeepScreenOnOptions;
Method or attribute name: success?: () => void;
Old version:
Class name: SetKeepScreenOnOptions;
Method or attribute name: success?: () => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: BrightnessModeResponse;
Method or attribute name: export interface BrightnessModeResponse
Old version:
Class name: BrightnessModeResponse;
Method or attribute name: export interface BrightnessModeResponse
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: BrightnessModeResponse;
Method or attribute name: mode: number;
Old version:
Class name: BrightnessModeResponse;
Method or attribute name: mode: number;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessModeOptions;
Method or attribute name: mode: number;
Old version:
Class name: SetBrightnessModeOptions;
Method or attribute name: mode: number;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessModeOptions;
Method or attribute name: export interface GetBrightnessModeOptions
Old version:
Class name: GetBrightnessModeOptions;
Method or attribute name: export interface GetBrightnessModeOptions
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: GetBrightnessModeOptions;
Method or attribute name: success?: (data: BrightnessModeResponse) => void;
Old version:
Class name: GetBrightnessModeOptions;
Method or attribute name: success?: (data: BrightnessModeResponse) => void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetBrightnessModeOptions;
Method or attribute name: export interface SetBrightnessModeOptions
Old version:
Class name: SetBrightnessModeOptions;
Method or attribute name: export interface SetBrightnessModeOptions
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetKeepScreenOnOptions;
Method or attribute name: export interface SetKeepScreenOnOptions
Old version:
Class name: SetKeepScreenOnOptions;
Method or attribute name: export interface SetKeepScreenOnOptions
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: SetKeepScreenOnOptions;
Method or attribute name: keepScreenOn: boolean;
Old version:
Class name: SetKeepScreenOnOptions;
Method or attribute name: keepScreenOn: boolean;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: export default class Brightness
Old version:
Class name: Brightness;
Method or attribute name: export default class Brightness
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: static getValue(options?: GetBrightnessOptions): void;
Old version:
Class name: Brightness;
Method or attribute name: static getValue(options?: GetBrightnessOptions): void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: static setValue(options?: SetBrightnessOptions): void;
Old version:
Class name: Brightness;
Method or attribute name: static setValue(options?: SetBrightnessOptions): void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: static getMode(options?: GetBrightnessModeOptions): void;
Old version:
Class name: Brightness;
Method or attribute name: static getMode(options?: GetBrightnessModeOptions): void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: static setMode(options?: SetBrightnessModeOptions): void;
Old version:
Class name: Brightness;
Method or attribute name: static setMode(options?: SetBrightnessModeOptions): void;
New version: 7
Substitute API:
@system.brightness.d.ts
Deprecated version changed Class name: Brightness;
Method or attribute name: static setKeepScreenOn(options?: SetKeepScreenOnOptions): void;
Old version:
Class name: Brightness;
Method or attribute name: static setKeepScreenOn(options?: SetKeepScreenOnOptions): void;
New version: 7
Substitute API:
@system.brightness.d.ts
Error code added Class name: batteryStats;
Method or attribute name: function getBatteryStats(callback: AsyncCallback<Array<BatteryStatsInfo>>): void;
Old version:
Class name: batteryStats;
Method or attribute name: function getBatteryStats(callback: AsyncCallback<Array<BatteryStatsInfo>>): void;
New version: 401
@ohos.batteryStatistics.d.ts
Error code added Class name: batteryStats;
Method or attribute name: function getAppPowerValue(uid: number): number;
Old version:
Class name: batteryStats;
Method or attribute name: function getAppPowerValue(uid: number): number;
New version: 4600101
@ohos.batteryStatistics.d.ts
Error code added Class name: batteryStats;
Method or attribute name: function getAppPowerPercent(uid: number): number;
Old version:
Class name: batteryStats;
Method or attribute name: function getAppPowerPercent(uid: number): number;
New version: 4600101
@ohos.batteryStatistics.d.ts
Error code added Class name: batteryStats;
Method or attribute name: function getHardwareUnitPowerValue(type: ConsumptionType): number;
Old version:
Class name: batteryStats;
Method or attribute name: function getHardwareUnitPowerValue(type: ConsumptionType): number;
New version: 401,4600101
@ohos.batteryStatistics.d.ts
Error code added Class name: batteryStats;
Method or attribute name: function getHardwareUnitPowerPercent(type: ConsumptionType): number;
Old version:
Class name: batteryStats;
Method or attribute name: function getHardwareUnitPowerPercent(type: ConsumptionType): number;
New version: 401,4600101
@ohos.batteryStatistics.d.ts
Error code added Class name: brightness;
Method or attribute name: function setValue(value: number): void;
Old version:
Class name: brightness;
Method or attribute name: function setValue(value: number): void;
New version: 401,4700101
@ohos.brightness.d.ts
Access level changed Class name: brightness;
Method or attribute name: declare brightness
Old version:
Class name: brightness;
Method or attribute name: declare brightness
New version: systemapi
@ohos.brightness.d.ts

你可能感兴趣的鸿蒙文章

harmony 鸿蒙JS API Differences

harmony 鸿蒙js-apidiff-ability

harmony 鸿蒙js-apidiff-accessibility

harmony 鸿蒙js-apidiff-account

harmony 鸿蒙js-apidiff-application

harmony 鸿蒙js-apidiff-arkui

harmony 鸿蒙js-apidiff-bundle

harmony 鸿蒙js-apidiff-communication

harmony 鸿蒙js-apidiff-compiler-and-runtime

harmony 鸿蒙js-apidiff-customization

0  赞