From 39e31e5a45e10e5fc7c22c7d01e591d6f5894df4 Mon Sep 17 00:00:00 2001 From: Yang-Kaka Date: Fri, 27 Jun 2025 03:13:24 +0000 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5master=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yang-Kaka --- api/@ohos.multimodalAwareness.motion.d.ts | 44 +++++++++++++---------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/api/@ohos.multimodalAwareness.motion.d.ts b/api/@ohos.multimodalAwareness.motion.d.ts index 253ca6c1a6..4af39958af 100644 --- a/api/@ohos.multimodalAwareness.motion.d.ts +++ b/api/@ohos.multimodalAwareness.motion.d.ts @@ -62,49 +62,57 @@ declare namespace motion { /** * Subscribe to detect the operating hand changed event. - * @permission ohos.permission.ACTIVITY_MOTION + * @permission ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE * @param { 'operatingHandChanged' } type - Indicates the event type. * @param { Callback } callback - Indicates the callback for getting the event data. * @throws { BusinessError } 201 - Permission denied. An attempt was made to subscribe operatingHandChanged - *
event forbidden by permission: ohos.permission.ACTIVITY_MOTION. + *
event forbidden by permission: ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE. * @throws { BusinessError } 401 - Parameter error. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited *
device capabilities. - * @throws { BusinessError } 31500001 - Service exception. - * @throws { BusinessError } 31500002 - Subscribe Failed. - * @syscap SystemCapability.MultimodalAwarness.Motion - * @since 15 + * @throws { BusinessError } 31500001 - Service exception. Possible causes: 1. A system error, such as null pointer, container-related exception; + *
2. N-API invocation exception, invalid N-API status. + * @throws { BusinessError } 31500002 - Subscription failed. Possible causes: 1. Callback registration failure; + *
2. Failed to bind native object to js wrapper; 3. N-API invocation exception, invalid N-API status; 4. IPC request exception. + * @syscap SystemCapability.MultimodalAwareness.Motion + * @since arkts{ '1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'operatingHandChanged', callback: Callback): void; /** - * Unsubscribe to detect the operating hand changed event. - * @permission ohos.permission.ACTIVITY_MOTION + * Unsubscribe from the operating hand changed event. + * @permission ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE * @param { 'operatingHandChanged' } type - Indicates the event type. * @param { Callback } callback - Indicates the callback for getting the event data. * @throws { BusinessError } 201 - Permission denied. An attempt was made to unsubscribe operatingHandChanged - *
event forbidden by permission: ohos.permission.ACTIVITY_MOTION. + *
event forbidden by permission: ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE. * @throws { BusinessError } 401 - Parameter error. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited *
device capabilities. - * @throws { BusinessError } 31500001 - Service exception. - * @throws { BusinessError } 31500003 - Unsubscribe Failed. - * @syscap SystemCapability.MultimodalAwarness.Motion - * @since 15 + * @throws { BusinessError } 31500001 - Service exception. Possible causes: 1. A system error, such as null pointer, container-related exception; + *
2. N-API invocation exception, invalid N-API status. + * @throws { BusinessError } 31500003 - Unsubscription failed. Possible causes: 1. Callback failure; + *
2. N-API invocation exception, invalid N-API status; 3. IPC request exception. + * @syscap SystemCapability.MultimodalAwareness.Motion + * @since arkts{ '1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'operatingHandChanged', callback?: Callback): void; /** * Get the recent operating hand status. - * @permission ohos.permission.ACTIVITY_MOTION + * @permission ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE * @returns { OperatingHandStatus } The result of operating hand status. * @throws { BusinessError } 201 - Permission denied. An attempt was made to get the recent operating hand - *
status forbidden by permission: ohos.permission.ACTIVITY_MOTION. + *
status forbidden by permission: ohos.permission.ACTIVITY_MOTION or ohos.permission.DETECT_GESTURE. * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited *
device capabilities. - * @throws { BusinessError } 31500001 - Service exception. - * @syscap SystemCapability.MultimodalAwarness.Motion - * @since 15 + * @throws { BusinessError } 31500001 - Service exception. Possible causes: 1. A system error, such as null pointer, container-related exception; + *
2. N-API invocation exception, invalid N-API status. + * @syscap SystemCapability.MultimodalAwareness.Motion + * @since arkts{ '1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ function getRecentOperatingHandStatus(): OperatingHandStatus; } -- Gitee