From 7ae86f515223f57c2cb3627115d295f3f86bf58e Mon Sep 17 00:00:00 2001 From: chenxuankai1 Date: Wed, 22 Jun 2022 15:18:32 +0800 Subject: [PATCH 1/9] image onError returns error message Signed-off-by: chenxuankai1 Change-Id: I993079de3dd0278804782454b3b41619e696a034 --- api/@internal/component/ets/image.d.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 49465ff58c..9b991825b7 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -163,6 +163,13 @@ declare class ImageAttribute extends CommonMethod { */ onError(callback: (event?: { componentWidth: number; componentHeight: number }) => void): ImageAttribute; + /** + * This callback is triggered when an exception occurs during image loading. + * The field of "message" carries the detailed information of failed image loading. + * @since 9 + */ + onError(callback: (event?: { componentWidth: number; componentHeight: number; message: string }) => void): ImageAttribute; + /** * When the loaded source file is a svg image, this callback is triggered when the playback of the svg image is complete. * If the svg image is a wireless loop image, this callback is not triggered. -- Gitee From 680a40a6592eb1aa6b203fa67ab727678faf5ee9 Mon Sep 17 00:00:00 2001 From: chenqi Date: Fri, 15 Jul 2022 15:16:02 +0800 Subject: [PATCH 2/9] Add UUID api in util Issue:#I5HAOX:Add UUID api in util Signed-off-by: chenqi --- api/@ohos.util.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index f3f42ea249..9dc32932ba 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -84,6 +84,33 @@ declare namespace util { * @return return a version that returns promises */ function promiseWrapper(original: (err: Object, value: Object) => void): Object; + + /** + * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param entropyCache whether to generate the UUID with using the cache. Default: true. + * @return return a string representing this UUID. + */ + function randomUUID(entropyCache?: boolean): string; + + /** + * Generate a random RFC 4122 version 4 UUID using a cryptographically secure random number generator. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param entropyCache whether to generate the UUID with using the cache. Default: true. + * @return return a Uint8Array representing this UUID. + */ + function randomBinaryUUID(entropyCache?: boolean): Uint8Array; + + /** + * Parse a UUID from the string standard representation as described in the RFC 4122 version 4. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param uuid string that specifies a UUID + * @return return a Uint8Array representing this UUID. Throw SyntaxError if parsing fails. + */ + function parseUUID(uuid: string): Uint8Array; class TextDecoder { /** -- Gitee From ad1d1fce5b1be8240696cd6bfc84db812fc51656 Mon Sep 17 00:00:00 2001 From: youliang_1314 Date: Fri, 12 Aug 2022 12:14:05 +0800 Subject: [PATCH 3/9] modify useriam syscap Signed-off-by: youliang_1314 Change-Id: I4eabadb8cebdc87b2cc8324278d66c3417dd58ea --- api/@ohos.userIAM.faceAuth.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.userIAM.faceAuth.d.ts b/api/@ohos.userIAM.faceAuth.d.ts index fc6276dc02..50af8dd0bd 100644 --- a/api/@ohos.userIAM.faceAuth.d.ts +++ b/api/@ohos.userIAM.faceAuth.d.ts @@ -23,7 +23,7 @@ declare namespace faceAuth { * Provides the abilities for face authentication. * @name FaceAuth * @since 9 - * @syscap SystemCapability.UserIAM.FaceAuth + * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. */ class FaceAuthManager { @@ -52,7 +52,7 @@ declare namespace faceAuth { * * @name ResultCode * @since 9 - * @syscap SystemCapability.UserIAM.FaceAuth + * @syscap SystemCapability.UserIAM.UserAuth.FaceAuth * @systemapi Hide this for inner system use. */ enum ResultCode { -- Gitee From 13f14cc321948af3873f1436d79ff1f65019aa00 Mon Sep 17 00:00:00 2001 From: "@wang-jingwu001" Date: Fri, 12 Aug 2022 17:28:58 +0800 Subject: [PATCH 4/9] Modify the decode input parameters of the util.d.ts interface Signed-off-by: @wang-jingwu001 https://gitee.com/openharmony/interface_sdk-js/issues/I5M3Z2 --- api/@ohos.util.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/api/@ohos.util.d.ts b/api/@ohos.util.d.ts index a46db2c3e7..93aee728c8 100644 --- a/api/@ohos.util.d.ts +++ b/api/@ohos.util.d.ts @@ -126,6 +126,15 @@ declare namespace util { * @return return decoded text */ decode(input: Uint8Array, options?: { stream?: false }): string; + + /** + * Returns the result of running encoding's decoder. + * @since 9 + * @syscap SystemCapability.Utils.Lang + * @param input decoded numbers in accordance with the format + * @return return decoded text + */ + decodeWithStream(input: Uint8Array, options?: { stream?: boolean }): string; } class TextEncoder { -- Gitee From a35467be62abbc04bf51619da9190c6e1288200c Mon Sep 17 00:00:00 2001 From: lichenchen Date: Mon, 15 Aug 2022 19:23:25 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9D=83=E9=99=90=E6=95=B4=E6=94=B9=E8=A1=A5?= =?UTF-8?q?=E9=BD=90,d.ts=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lichenchen --- api/@ohos.account.osAccount.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 33e596ce3d..d34bead737 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -422,6 +422,7 @@ declare namespace osAccount { * @since 9 * @return Returns {@code true} if current process belongs to the main os account; * returns {@code false} otherwise. + * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @systemapi Hide this for inner system use. */ isMainOsAccount(callback: AsyncCallback): void; -- Gitee From b6bf01157be177836eb0fcde51cc814bcb1a2699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E5=B8=85?= Date: Tue, 16 Aug 2022 17:29:00 +0800 Subject: [PATCH 6/9] =?UTF-8?q?Signed-off-by:=20=E8=82=96=E5=B8=85=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to be committed: modified: api/@ohos.uitest.d.ts --- api/@ohos.uitest.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index 4bff24bad5..ae2ff7fd2a 100644 --- a/api/@ohos.uitest.d.ts +++ b/api/@ohos.uitest.d.ts @@ -763,11 +763,10 @@ class UiComponent{ /** * Inject fling on the device display. * @syscap SystemCapability.Test.UiTest - * @param from the threshold of UI idle time, in millisecond. - * @param to the maximum time to wait for idle, in millisecond. + * @param from the coordinate of the touch starting point. + * @param to the coordinate of the touch ending point. * @param stepLen the length of each step, in pixels. * @param speed the speed of fling (pixels per second),default is 600,the value ranges from 200 to 3000,set it 600 if out of range. - * @returns true if wait for idle succeed in the timeout, false otherwise. * @since 9 * @test */ @@ -944,6 +943,7 @@ class PointerMatrix { * @syscap SystemCapability.Test.UiTest * @param finger the index of target finger to set. * @param step the index of target step to set. + * @param point the coordinate of target step to set. * @since 9 * @test */ -- Gitee From 5e1dc680cc109248f3d9bcb90a0998b8e3bb1721 Mon Sep 17 00:00:00 2001 From: luoying_ace_admin Date: Mon, 15 Aug 2022 19:58:05 +0800 Subject: [PATCH 7/9] revise api Signed-off-by: luoying_ace_admin Change-Id: Ic9692c3eaf1834727f894e1d0b6c59ead585dd5f --- api/@system.app.d.ts | 12 +++++++++++- api/common/full/featureability.d.ts | 12 ++++++------ api/common/lite/featureability.d.ts | 12 ++++++------ 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/api/@system.app.d.ts b/api/@system.app.d.ts index d038224a58..1b57be12c0 100644 --- a/api/@system.app.d.ts +++ b/api/@system.app.d.ts @@ -113,6 +113,15 @@ export default class App { */ static terminate(): void; + /** + * Keeps the application visible after the screen is woken up. + * This method prevents the system from returning to the home screen when the screen is locked. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 3 + * @deprecated since 8 + */ + static screenOnVisible(options?: ScreenOnVisibleOptions): void; + /** * Requests the application to run in full window. * In some scenarios, such as semi-modal FA, the FA runs in non-full window. @@ -122,7 +131,8 @@ export default class App { * @param options Transition time from non-full window to full window, in milliseconds. * By default, the value is in direct proportion to the distance between the non-full window and the full window. * @since 3 - * @systemapi + * @deprecated since 8 + * @useinstead startAbility */ static requestFullWindow(options?: RequestFullWindowOptions): void; diff --git a/api/common/full/featureability.d.ts b/api/common/full/featureability.d.ts index bc825a0587..308fe6727f 100644 --- a/api/common/full/featureability.d.ts +++ b/api/common/full/featureability.d.ts @@ -32,8 +32,8 @@ export interface Result { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SubscribeMessageResponse { @@ -149,8 +149,8 @@ export interface SubscribeAbilityEventParam { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SendMessageOptions { @@ -200,8 +200,8 @@ export interface SendMessageOptions { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SubscribeMessageOptions { @@ -374,8 +374,8 @@ export declare class FeatureAbility { /** * Sends messages to the destination device. * @param options Options. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static sendMsg(options: SendMessageOptions): void; @@ -383,16 +383,16 @@ export declare class FeatureAbility { /** * Listens for messages sent from other devices. * @param options Options. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static subscribeMsg(options: SubscribeMessageOptions): void; /** * Cancels the listening for messages sent from other devices. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static unsubscribeMsg(): void; diff --git a/api/common/lite/featureability.d.ts b/api/common/lite/featureability.d.ts index 014cbb7538..7d8d9be3ac 100644 --- a/api/common/lite/featureability.d.ts +++ b/api/common/lite/featureability.d.ts @@ -14,8 +14,8 @@ */ /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SubscribeMessageResponse { @@ -45,8 +45,8 @@ export interface SubscribeMessageResponse { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SendMessageOptions { @@ -96,8 +96,8 @@ export interface SendMessageOptions { } /** + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ export interface SubscribeMessageOptions { @@ -122,8 +122,8 @@ export declare class FeatureAbility { /** * Sends messages to the destination device. * @param options Options. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static sendMsg(options: SendMessageOptions): void; @@ -131,16 +131,16 @@ export declare class FeatureAbility { /** * Listens for messages sent from other devices. * @param options Options. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static subscribeMsg(options: SubscribeMessageOptions): void; /** * Cancels the listening for messages sent from other devices. + * @syscap SystemCapability.ArkUI.ArkUI.Lite * @since 5 - * @systemapi * @deprecated since 8 */ static unsubscribeMsg(): void; -- Gitee From 6a3e45f12a0009db1c55a5e5dff1cad0812fd0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E5=B8=85?= Date: Thu, 18 Aug 2022 09:59:04 +0800 Subject: [PATCH 8/9] =?UTF-8?q?Signed-off-by:=20=E8=82=96=E5=B8=85=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes to be committed: modified: api/@ohos.uitest.d.ts --- api/@ohos.uitest.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/@ohos.uitest.d.ts b/api/@ohos.uitest.d.ts index ae2ff7fd2a..195b015749 100644 --- a/api/@ohos.uitest.d.ts +++ b/api/@ohos.uitest.d.ts @@ -763,8 +763,8 @@ class UiComponent{ /** * Inject fling on the device display. * @syscap SystemCapability.Test.UiTest - * @param from the coordinate of the touch starting point. - * @param to the coordinate of the touch ending point. + * @param from the coordinate point where the finger touches the screen. + * @param to the coordinate point where the finger leaves the screen. * @param stepLen the length of each step, in pixels. * @param speed the speed of fling (pixels per second),default is 600,the value ranges from 200 to 3000,set it 600 if out of range. * @since 9 -- Gitee From 428d52e25fb7bbf1adb96d2f74fbea24ef34353b Mon Sep 17 00:00:00 2001 From: "yupeng74@huawei.com" Date: Fri, 19 Aug 2022 10:27:27 +0800 Subject: [PATCH 9/9] =?UTF-8?q?bundlestate.d.ts=E6=B7=BB=E5=8A=A0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9FAPI=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yupeng74@huawei.com --- api/@ohos.bundleState.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@ohos.bundleState.d.ts b/api/@ohos.bundleState.d.ts index 2def2921ff..1a2ca8aa49 100644 --- a/api/@ohos.bundleState.d.ts +++ b/api/@ohos.bundleState.d.ts @@ -91,6 +91,7 @@ declare namespace bundleState { /** * @since 9 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App + * @systemapi Hide this for inner system use. */ interface BundleActiveFormInfo { /** @@ -118,6 +119,7 @@ declare namespace bundleState { /** * @since 9 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.App + * @systemapi Hide this for inner system use. */ interface BundleActiveModuleInfo { /** @@ -229,6 +231,7 @@ declare namespace bundleState { /** * @since 9 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup + * @systemapi Hide this for inner system use. */ interface BundleActiveGroupCallbackInfo { /* @@ -413,6 +416,7 @@ declare namespace bundleState { * * @since 9 * @syscap SystemCapability.ResourceSchedule.UsageStatistics.AppGroup + * @systemapi Hide this for inner system use. */ export enum GroupType { /** -- Gitee