diff --git a/api/@ohos.multimodalAwareness.motion.d.ts b/api/@ohos.multimodalAwareness.motion.d.ts index 253ca6c1a62df3a0c5857fe6b439c47d2d9423b9..4af39958afb6abc25b054ed6fc7fbcc5e1ee407f 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; }