harmony(鸿蒙)升级服务子系统JS API变更

2022-08-09 浏览 (826)

升级服务子系统JS API变更

OpenHarmony 3.2 Beta2版本相较于OpenHarmony 3.2 Beta1版本,升级服务子系统的API变更如下:

接口变更

模块名类名方法/属性/枚举/常量变更类型
ohos.updateEventIdEVENT_UPGRADE_FAIL新增
ohos.updateEventIdEVENT_UPGRADE_SUCCESS新增
ohos.updateEventIdEVENT_APPLY_START新增
ohos.updateEventIdEVENT_APPLY_WAIT新增
ohos.updateEventIdEVENT_UPGRADE_UPDATE新增
ohos.updateEventIdEVENT_UPGRADE_START新增
ohos.updateEventIdEVENT_UPGRADE_WAIT新增
ohos.updateEventIdEVENT_DOWNLOAD_FAIL新增
ohos.updateEventIdEVENT_DOWNLOAD_SUCCESS新增
ohos.updateEventIdEVENT_DOWNLOAD_RESUME新增
ohos.updateEventIdEVENT_DOWNLOAD_PAUSE新增
ohos.updateEventIdEVENT_DOWNLOAD_UPDATE新增
ohos.updateEventIdEVENT_DOWNLOAD_START新增
ohos.updateEventIdEVENT_DOWNLOAD_WAIT新增
ohos.updateEventIdEVENT_TASK_CANCEL新增
ohos.updateEventIdEVENT_TASK_RECEIVE新增
ohos.updateEventIdEVENT_TASK_BASE = EventClassify.TASK新增
ohos.updateEventClassifyTASK = 0x01000000新增
ohos.updateUpgradeStatusUPGRADE_FAIL = 51新增
ohos.updateUpgradeStatusUPGRADE_SUCCESS = 50新增
ohos.updateUpgradeStatusAPPLYING = 41新增
ohos.updateUpgradeStatusWAITING_APPLY = 40新增
ohos.updateUpgradeStatusUPDATING = 31新增
ohos.updateUpgradeStatusWAITING_INSTALL = 30新增
ohos.updateUpgradeStatusDOWNLOAD_FAIL = 23新增
ohos.updateUpgradeStatusDOWNLOAD_PAUSED = 22新增
ohos.updateUpgradeStatusDOWNLOADING = 21新增
ohos.updateUpgradeStatusWAITING_DOWNLOAD = 20新增
ohos.updateOrderAPPLY = 4新增
ohos.updateOrderINSTALL = 2新增
ohos.updateOrderDOWNLOAD = 1新增
ohos.updateNetTypeNOT_METERED_WIFI = 4新增
ohos.updateNetTypeMETERED_WIFI = 2新增
ohos.updateNetTypeCELLULAR = 1新增
ohos.updateDescriptionTypeURI = 1新增
ohos.updateDescriptionTypeCONTENT = 0新增
ohos.updateEffectiveModeLIVE_AND_COLD = 3新增
ohos.updateEffectiveModeLIVE = 2新增
ohos.updateEffectiveModeCOLD = 1新增
ohos.updateUpgradeActionRECOVERY = "recovery"新增
ohos.updateUpgradeActionUPGRADE = "upgrade"新增
ohos.updateComponentTypeOTA = 1新增
ohos.updateBusinessSubTypePARAM = 2新增
ohos.updateBusinessSubTypeFIRMWARE = 1新增
ohos.updateBusinessVendorPUBLIC = "public"新增
ohos.updateUpgradeTaskCallback(eventInfo: EventInfo): void;新增
ohos.updateUpgradeFilefilePath: string;新增
ohos.updateUpgradeFilefileType: ComponentType;新增
ohos.updateEventClassifyInfoextraInfo: string;新增
ohos.updateEventClassifyInfoeventClassify: EventClassify;新增
ohos.updateErrorMessageerrorMessage: string;新增
ohos.updateErrorMessageerrorCode: number;新增
ohos.updateTaskBodyversionComponents: Array<VersionComponent>;新增
ohos.updateTaskBodyerrorMessages: Array<ErrorMessage>;新增
ohos.updateTaskBodyinstallMode: number;新增
ohos.updateTaskBodyprogress: number;新增
ohos.updateTaskBodysubStatus: number;新增
ohos.updateTaskBodystatus: UpgradeStatus;新增
ohos.updateTaskBodyversionDigestInfo: VersionDigestInfo;新增
ohos.updateEventInfotaskBody: TaskBody;新增
ohos.updateEventInfoeventId: EventId;新增
ohos.updateTaskInfotaskBody: TaskBody;新增
ohos.updateTaskInfoexistTask: boolean;新增
ohos.updateUpgradePeriodend: number;新增
ohos.updateUpgradePeriodstart: number;新增
ohos.updateUpgradePolicyautoUpgradePeriods: Array<UpgradePeriod>;新增
ohos.updateUpgradePolicyautoUpgradeStrategy: boolean;新增
ohos.updateUpgradePolicydownloadStrategy: boolean;新增
ohos.updateClearOptionsstatus: UpgradeStatus;新增
ohos.updateUpgradeOptionsorder: Order;新增
ohos.updatePauseDownloadOptionsisAllowAutoResume: boolean;新增
ohos.updateResumeDownloadOptionsallowNetwork: NetType;新增
ohos.updateDownloadOptionsorder: Order;新增
ohos.updateDownloadOptionsallowNetwork: NetType;新增
ohos.updateCurrentVersionInfoversionComponents: Array<VersionComponent>;新增
ohos.updateCurrentVersionInfodeviceName: string;新增
ohos.updateCurrentVersionInfoosVersion: string;新增
ohos.updateDescriptionInfodescriptionType: DescriptionType;新增
ohos.updateVersionComponentdescriptionInfo: DescriptionInfo;新增
ohos.updateVersionComponenteffectiveMode: EffectiveMode;新增
ohos.updateVersionComponentsize: number;新增
ohos.updateVersionComponentinnerVersion: string;新增
ohos.updateVersionComponentdisplayVersion: string;新增
ohos.updateVersionComponentupgradeAction: UpgradeAction;新增
ohos.updateVersionComponentcomponentType: ComponentType;新增
ohos.updateVersionDigestInfoversionDigest: string;新增
ohos.updateNewVersionInfoversionComponents: Array<VersionComponent>;新增
ohos.updateNewVersionInfoversionDigestInfo: VersionDigestInfo;新增
ohos.updateCheckResultnewVersionInfo: NewVersionInfo;新增
ohos.updateCheckResultisExistNewVersion: boolean;新增
ohos.updateBusinessTypesubType: BusinessSubType;新增
ohos.updateBusinessTypevendor: BusinessVendor;新增
ohos.updateUpgradeInfobusinessType: BusinessType;新增
ohos.updateUpgradeInfoupgradeApp: string;新增
ohos.updateLocalUpdateroff(eventClassifyInfo: EventClassifyInfo, taskCallback?: UpgradeTaskCallback): void;新增
ohos.updateLocalUpdateron(eventClassifyInfo: EventClassifyInfo, taskCallback: UpgradeTaskCallback): void;新增
ohos.updateLocalUpdaterapplyNewVersion(upgradeFiles: Array<UpgradeFile>, callback: AsyncCallback<void>): void;
applyNewVersion(upgradeFiles: Array<UpgradeFile>): Promise<void>;
新增
ohos.updateLocalUpdaterverifyUpgradePackage(upgradeFile: UpgradeFile, certsFile: string, callback: AsyncCallback<number>): void;
verifyUpgradePackage(upgradeFile: UpgradeFile, certsFile: string): Promise<number>;
新增
ohos.updateRestorerfactoryReset(callback: AsyncCallback<void>): void;
factoryReset(): Promise<void>;
新增
ohos.updateUpdateroff(eventClassifyInfo: EventClassifyInfo, taskCallback?: UpgradeTaskCallback): void;新增
ohos.updateUpdateron(eventClassifyInfo: EventClassifyInfo, taskCallback: UpgradeTaskCallback): void;新增
ohos.updateUpdaterterminateUpgrade(callback: AsyncCallback<void>): void;
terminateUpgrade(): Promise<void>;
新增
ohos.updateUpdatersetUpgradePolicy(policy: UpgradePolicy, callback: AsyncCallback<number>): void;
setUpgradePolicy(policy: UpgradePolicy): Promise<number>;
新增
ohos.updateUpdatergetUpgradePolicy(callback: AsyncCallback<UpgradePolicy>): void;
getUpgradePolicy(): Promise<UpgradePolicy>;
新增
ohos.updateUpdaterclearError(versionDigestInfo: VersionDigestInfo, clearOptions: ClearOptions, callback: AsyncCallback<void>): void;
clearError(versionDigestInfo: VersionDigestInfo, clearOptions: ClearOptions): Promise<void>;
新增
ohos.updateUpdaterpauseDownload(versionDigestInfo: VersionDigestInfo, pauseDownloadOptions: PauseDownloadOptions, callback: AsyncCallback<void>): void;
pauseDownload(versionDigestInfo: VersionDigestInfo, pauseDownloadOptions: PauseDownloadOptions): Promise<void>;
新增
ohos.updateUpdaterresumeDownload(versionDigestInfo: VersionDigestInfo, resumeDownloadOptions: ResumeDownloadOptions, callback: AsyncCallback<void>): void;
resumeDownload(versionDigestInfo: VersionDigestInfo, resumeDownloadOptions: ResumeDownloadOptions): Promise<void>;
新增
ohos.updateUpdatergetTaskInfo(callback: AsyncCallback<TaskInfo>): void;
getTaskInfo(): Promise<TaskInfo>;
新增
ohos.updateUpdatergetCurrentVersionInfo(callback: AsyncCallback<CurrentVersionInfo>): void;
getCurrentVersionInfo(): Promise<CurrentVersionInfo>;
新增
ohos.updateupdategetLocalUpdater(): LocalUpdater;新增
ohos.updateupdategetRestorer(): Restorer;新增
ohos.updateupdategetOnlineUpdater(upgradeInfo: UpgradeInfo): Updater;新增
ohos.updateupdategetUpdaterFromOther(upgradeFile: string, device: string, updateType?: UpdateTypes): Updater;删除
ohos.updateupdategetUpdaterForOther(upgradeFile: string, device: string, updateType?: UpdateTypes): Updater;删除
ohos.updateupdategetUpdater(upgradeFile: string, updateType?: UpdateTypes): Updater;删除
ohos.updateUpdatercancel(): void;删除
ohos.updateUpdaterverifyUpdatePackage(upgradeFile: string, certsFile: string): void;删除
ohos.updateUpdaterrebootAndCleanUserData(callback: AsyncCallback<number>): void;
rebootAndCleanUserData(): Promise<number>;
删除
ohos.updateUpdaterrebootAndCleanCache(callback: AsyncCallback<number>): void;
rebootAndCleanCache(): Promise<number>;
删除
ohos.updateUpdaterapplyNewVersion(callback: AsyncCallback<number>): void;
applyNewVersion(): Promise<number>;
删除
ohos.updateUpdatersetUpdatePolicy(policy: UpdatePolicy, callback: AsyncCallback<number>): void;
setUpdatePolicy(policy: UpdatePolicy): Promise<number>;
删除
ohos.updateUpdatergetUpdatePolicy(callback: AsyncCallback<UpdatePolicy>): void;
getUpdatePolicy(): Promise<UpdatePolicy>;
删除
ohos.updateUpdateProgressCallback(progress: Progress): void;删除
ohos.updateUpdatePolicyautoUpgradeInterval: Array<number>;删除
ohos.updateUpdatePolicyinstallMode: INSTALL_MODE;删除
ohos.updateUpdatePolicyautoDownload: boolean;删除
ohos.updateInstallModeINSTALL_MODE_AUTO删除
ohos.updateInstallModeINSTALL_MODE_NIGHT删除
ohos.updateInstallModeINSTALL_MODE_NORMAL删除
ohos.updateProgressendReason: string;删除
ohos.updateProgressstatus: UpdateState;删除
ohos.updateProgresspercent: number;删除
ohos.updateUpdateStateUPDATE_STATE_UPDATE_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_UPDATE_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_UPDATE_ON = 90删除
ohos.updateUpdateStateUPDATE_STATE_INSTALL_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_INSTALL_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_INSTALL_ON = 80删除
ohos.updateUpdateStateUPDATE_STATE_PACKAGE_TRANS_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_PACKAGE_TRANS_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_PACKAGE_TRANS_ON = 70删除
ohos.updateUpdateStateUPDATE_STATE_VERIFY_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_VERIFY_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_VERIFY_ON = 30删除
ohos.updateUpdateStateUPDATE_STATE_DOWNLOAD_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_DOWNLOAD_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_DOWNLOAD_CANCEL删除
ohos.updateUpdateStateUPDATE_STATE_DOWNLOAD_PAUSE删除
ohos.updateUpdateStateUPDATE_STATE_DOWNLOAD_ON = 20删除
ohos.updateUpdateStateUPDATE_STATE_CHECK_VERSION_SUCCESS删除
ohos.updateUpdateStateUPDATE_STATE_CHECK_VERSION_FAIL删除
ohos.updateUpdateStateUPDATE_STATE_CHECK_VERSION_ON = 10删除
ohos.updateUpdateStateUPDATE_STATE_INIT = 0删除
ohos.updateNewVersionInfodescriptionInfo: Array<DescriptionInfo>;删除
ohos.updateNewVersionInfocheckResults: Array<CheckResult>;删除
ohos.updateNewVersionInfoerrMsg: string;删除
ohos.updateNewVersionInfostatus: NewVersionStatus;删除
ohos.updateNewVersionStatusVERSION_STATUS_BUSY = 2删除
ohos.updateNewVersionStatusVERSION_STATUS_NONE = 1删除
ohos.updateNewVersionStatusVERSION_STATUS_NEW = 0删除
ohos.updateNewVersionStatusVERSION_STATUS_ERR = -1删除
ohos.updateDescriptionInfodescriptionId: string;删除
ohos.updateCheckResultdescriptionId: string;删除
ohos.updateCheckResultpackageType: PackageTypes;删除
ohos.updateCheckResultverifyInfo: string;删除
ohos.updateCheckResultsize: number;删除
ohos.updateCheckResultversionCode: string;删除
ohos.updateCheckResultversionName: number;删除
ohos.updatePackageTypesPACKAGE_TYPE_PATCH = 7删除
ohos.updatePackageTypesPACKAGE_TYPE_VERSION = 6删除
ohos.updatePackageTypesPACKAGE_TYPE_COTA = 5删除
ohos.updatePackageTypesPACKAGE_TYPE_PRELOAD = 4删除
ohos.updatePackageTypesPACKAGE_TYPE_CUST = 3删除
ohos.updatePackageTypesPACKAGE_TYPE_BASE = 2删除
ohos.updatePackageTypesPACKAGE_TYPE_NORMAL = 1删除

你可能感兴趣的鸿蒙文章

harmony(鸿蒙)OpenHarmony启用应用沙箱机制-适配指导

harmony(鸿蒙)3.2 beta2相对3.2 beta1变更详细说明

harmony(鸿蒙)元能力子系统JS API变更

harmony(鸿蒙)无障碍子系统JS API变更

harmony(鸿蒙)帐号子系统JS API变更

harmony(鸿蒙)ArkUI子系统JS API变更

harmony(鸿蒙)包管理子系统JS API变更

harmony(鸿蒙)基础通信子系统JS API变更

harmony(鸿蒙)公共基础库子系统JS API变更

harmony(鸿蒙)DFX子系统JS API变更

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