mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-10-07 14:13:45 +00:00
新增系统升级事件API
Signed-off-by: caiminggang <caiminggang1@huawei.com>
This commit is contained in:
parent
0a24a86d2c
commit
f9a67b39fa
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -13,6 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type systemManager from './@ohos.enterprise.systemManager';
|
||||
|
||||
/**
|
||||
* Class of the enterprise admin extension ability.
|
||||
*
|
||||
@ -85,4 +87,15 @@ export default class EnterpriseAdminExtensionAbility {
|
||||
* @since 10
|
||||
*/
|
||||
onAppStop(bundleName: string): void;
|
||||
|
||||
/**
|
||||
* Called back when a system version need to update.
|
||||
*
|
||||
* @param { systemManager.SystemUpdateInfo } systemUpdateInfo - the information of the system version.
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
onSystemUpdate(systemUpdateInfo: systemManager.SystemUpdateInfo): void;
|
||||
}
|
||||
|
13
api/@ohos.enterprise.adminManager.d.ts
vendored
13
api/@ohos.enterprise.adminManager.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@ -126,7 +126,16 @@ declare namespace adminManager {
|
||||
* @systemapi
|
||||
* @since 10
|
||||
*/
|
||||
MANAGED_EVENT_APP_STOP = 3
|
||||
MANAGED_EVENT_APP_STOP = 3,
|
||||
|
||||
/**
|
||||
* The event of system update.
|
||||
*
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @since 11
|
||||
*/
|
||||
MANAGED_EVENT_SYSTEM_UPDATE = 4,
|
||||
}
|
||||
|
||||
/**
|
||||
|
44
api/@ohos.enterprise.systemManager.d.ts
vendored
44
api/@ohos.enterprise.systemManager.d.ts
vendored
@ -25,6 +25,50 @@ import type Want from './@ohos.app.ability.Want';
|
||||
* @since 11
|
||||
*/
|
||||
declare namespace systemManager {
|
||||
/**
|
||||
* The device system update info.
|
||||
*
|
||||
* @typedef SystemUpdateInfo
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
export interface SystemUpdateInfo {
|
||||
/**
|
||||
* The name of version need to update.
|
||||
*
|
||||
* @type { string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
versionName: string;
|
||||
|
||||
/**
|
||||
* The time when the version first received.
|
||||
*
|
||||
* @type { number }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
firstReceivedTime: number;
|
||||
|
||||
/**
|
||||
* The type of version package.
|
||||
*
|
||||
* @type { string }
|
||||
* @syscap SystemCapability.Customization.EnterpriseDeviceManager
|
||||
* @systemapi
|
||||
* @stagemodelonly
|
||||
* @since 11
|
||||
*/
|
||||
packageType: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets NTP server.
|
||||
* This function can be called by a super administrator.
|
||||
|
Loading…
Reference in New Issue
Block a user