From cc7948a224471444598c7491459db130dd53a69c Mon Sep 17 00:00:00 2001 From: tanfengting Date: Fri, 3 Jan 2025 16:38:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B5=81=E5=BC=8F=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tanfengting --- api/@ohos.update.d.ts | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/api/@ohos.update.d.ts b/api/@ohos.update.d.ts index 8f6b97e8d4..70982895ec 100644 --- a/api/@ohos.update.d.ts +++ b/api/@ohos.update.d.ts @@ -927,6 +927,16 @@ declare namespace update { */ effectiveMode: EffectiveMode; + /** + * Ota mode + * + * @type { OtaMode } + * @syscap SystemCapability.Update.UpdateService + * @systemapi hide for inner use. + * @since 9 + */ + otaMode: OtaMode; + /** * Information about the version description file * @@ -1621,6 +1631,43 @@ declare namespace update { LIVE_AND_COLD = 3 } + /** + * Enumerates ota mode. + * + * @enum { number } + * @syscap SystemCapability.Update.UpdateService + * @systemapi hide for inner use. + * @since 9 + */ + export enum OtaMode { + /** + * normal update. + * + * @syscap SystemCapability.Update.UpdateService + * @systemapi hide for inner use. + * @since 9 + */ + NORMAL_OTA = 0, + + /** + * ab update. + * + * @syscap SystemCapability.Update.UpdateService + * @systemapi hide for inner use. + * @since 9 + */ + AB_REGULAR_OTA = 1, + + /** + * ab stream update. + * + * @syscap SystemCapability.Update.UpdateService + * @systemapi hide for inner use. + * @since 9 + */ + AB_STREAM_OTA = 2 + } + /** * Enumerates description type. * -- Gitee From 0a81f9eaa5e5695e7bac2ad60a4f33235377dd5b Mon Sep 17 00:00:00 2001 From: tanfengting Date: Mon, 13 Jan 2025 15:54:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9otymode=E4=B8=BA=E5=8F=AF?= =?UTF-8?q?=E9=80=89=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tanfengting 修改OtaMode注释 Signed-off-by: tanfengting 修改OtaMode API版本 Signed-off-by: tanfengting --- api/@ohos.update.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.update.d.ts b/api/@ohos.update.d.ts index 70982895ec..c94591121a 100644 --- a/api/@ohos.update.d.ts +++ b/api/@ohos.update.d.ts @@ -930,12 +930,12 @@ declare namespace update { /** * Ota mode * - * @type { OtaMode } + * @type { ?OtaMode } * @syscap SystemCapability.Update.UpdateService * @systemapi hide for inner use. - * @since 9 + * @since 18 */ - otaMode: OtaMode; + otaMode?: OtaMode; /** * Information about the version description file -- Gitee