From 10bd86fe62b87f2d3341531824ff2be115b83ee9 Mon Sep 17 00:00:00 2001 From: majiangbo2 Date: Fri, 12 Sep 2025 06:47:28 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9EqueryCapabilities?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=83=BD=E5=8A=9B=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: majiangbo2 --- api/@ohos.multimodalAwareness.userStatus.d.ts | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/api/@ohos.multimodalAwareness.userStatus.d.ts b/api/@ohos.multimodalAwareness.userStatus.d.ts index 59ed91b179..754b567d4d 100644 --- a/api/@ohos.multimodalAwareness.userStatus.d.ts +++ b/api/@ohos.multimodalAwareness.userStatus.d.ts @@ -81,6 +81,134 @@ declare namespace userStatus { CHILD = 1 } + /** + * Describe atomic capability to detect user status specific feature. + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + export enum UserStatusAtomicCap { + /** + * describe swing face position atomic capability + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + ATOMIC_UNKNOWN = 0, + + /** + * describe atomic capability to detect swing face position relative to camera while screen light + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SWING_FACE_RELATIVE_POSITION_LIGHT = 1, + + /** + * describe atomic capability to detect swing face number in camera when changed + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SWING_FACE_NUM_CHANGE = 2, + + /** + * describe atomic capability to detect swing gesture of user hand + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SWING_GESTURE = 3, + + /** + * describe atomic capability to detect swing face angle relative to screen + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SWING_IGS_FACE_ANGLE = 4, + + /** + * describe atomic capability to detect sensor gravity data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_GRAVITY = 5, + + /** + * describe atomic capability to detect sensor gyroscope data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_GYROSCOPE = 6, + + /** + * describe atomic capability to detect sensor accelerometer data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_ACCELEROMETER = 7, + + /** + * describe atomic capability to detect sensor linear accelerometer data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_LINEAR_ACCELERATION = 8, + + /** + * describe atomic capability to detect sensor rotation vector data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_ROTATION_VECTOR = 9, + + /** + * describe atomic capability to detect sensor orientation data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + SENSOR_ORIENTATION = 10, + + /** + * describe atomic capability to detect user blowing data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + LPC_BLOW = 11, + + /** + * describe atomic capability to detect user mood data + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + LPC_MOOD = 12, + + /** + * describe atomic capability to detect user environment sound intensity + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + LPC_ENV_SOUND = 13, + + /** + * describe atomic capability to detect user noise sound intensity + * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @systemapi + * @since 21 + */ + LPC_NOISE_SOUND = 14 + } + /** * Subscribe to age group detection feature. * @param { 'userAgeGroupDetected' } type - Indicates the event type. @@ -119,5 +247,25 @@ declare namespace userStatus { * @arkts 1.1&1.2 */ function off(type: 'userAgeGroupDetected', callback?: Callback): void; + + /** + * query capabilities device supports + * @param { 'UserStatusAtomicCap' } type - Indicates the atomic capabilitiy type. + * @throws { BusinessError } 401 - param error. + *
1. param empty. + *
2. param type not match. + * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited + *
device capabilities. + * @throws { BusinessError } 33900004 - Service exception. Possible causes: + *
1. System error, such as a null pointer and container-related exception. + *
2. Node-API invocation exception, such as invalid Node-API status. + * @throws { BusinessError } 33900005 - queryCapabilities failed. Possible causes. + *
1. Node-API invocation exception, such as invalid Node-API status. + *
2. IPC request exception. + * @syscap SystemCapability.MultimodalAwareness.UserStatus + * @systemapi + * @since 21 + */ + function queryCapabilities(capabilities: UserStatusAtomicCap[]): boolean[]; } export default userStatus; \ No newline at end of file -- Gitee From 8c455a24d8edf659de0856c2efca4df4a36c286f Mon Sep 17 00:00:00 2001 From: majiangbo2 Date: Fri, 12 Sep 2025 07:35:24 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A3=80=E8=A7=86=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: majiangbo2 --- api/@ohos.multimodalAwareness.userStatus.d.ts | 79 +++++++++---------- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/api/@ohos.multimodalAwareness.userStatus.d.ts b/api/@ohos.multimodalAwareness.userStatus.d.ts index 754b567d4d..0569c8134d 100644 --- a/api/@ohos.multimodalAwareness.userStatus.d.ts +++ b/api/@ohos.multimodalAwareness.userStatus.d.ts @@ -83,126 +83,127 @@ declare namespace userStatus { /** * Describe atomic capability to detect user status specific feature. - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ + export enum UserStatusAtomicCap { /** - * describe swing face position atomic capability - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * unknown atomic capability. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ ATOMIC_UNKNOWN = 0, /** - * describe atomic capability to detect swing face position relative to camera while screen light - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting the swing face position relative to the camera when the screen is on. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SWING_FACE_RELATIVE_POSITION_LIGHT = 1, /** - * describe atomic capability to detect swing face number in camera when changed - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting changes in the number of swing faces in the camera view. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SWING_FACE_NUM_CHANGE = 2, /** - * describe atomic capability to detect swing gesture of user hand - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting swing gestures of the user hand. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SWING_GESTURE = 3, /** - * describe atomic capability to detect swing face angle relative to screen - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting the swing face angle relative to the screen. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SWING_IGS_FACE_ANGLE = 4, /** - * describe atomic capability to detect sensor gravity data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor gravity data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_GRAVITY = 5, /** - * describe atomic capability to detect sensor gyroscope data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor gyroscope data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_GYROSCOPE = 6, /** - * describe atomic capability to detect sensor accelerometer data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor accelerometer data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_ACCELEROMETER = 7, /** - * describe atomic capability to detect sensor linear accelerometer data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor linear accelerometer data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_LINEAR_ACCELERATION = 8, /** - * describe atomic capability to detect sensor rotation vector data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor rotation vector data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_ROTATION_VECTOR = 9, /** - * describe atomic capability to detect sensor orientation data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for sensor orientation data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ SENSOR_ORIENTATION = 10, /** - * describe atomic capability to detect user blowing data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents atomic capability for detecting user blowing data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ LPC_BLOW = 11, /** - * describe atomic capability to detect user mood data - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting user mood data. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ LPC_MOOD = 12, /** - * describe atomic capability to detect user environment sound intensity - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting environmental sound intensity. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ LPC_ENV_SOUND = 13, /** - * describe atomic capability to detect user noise sound intensity - * @sysCap SystemCapability.Msdp.UserStatusAwareness + * Represents the atomic capability for detecting noise intensity. + * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 */ @@ -225,7 +226,6 @@ declare namespace userStatus { *
4. IPC request exception. * @syscap SystemCapability.MultimodalAwareness.UserStatus * @since 20 - * @arkts 1.1&1.2 */ function on(type: 'userAgeGroupDetected', callback: Callback): void; @@ -244,24 +244,17 @@ declare namespace userStatus { *
3. IPC request exception. * @syscap SystemCapability.MultimodalAwareness.UserStatus * @since 20 - * @arkts 1.1&1.2 */ function off(type: 'userAgeGroupDetected', callback?: Callback): void; /** - * query capabilities device supports - * @param { 'UserStatusAtomicCap' } type - Indicates the atomic capabilitiy type. - * @throws { BusinessError } 401 - param error. - *
1. param empty. - *
2. param type not match. - * @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited + * Queries the capabilities supported by the device. + * @param { 'UserStatusAtomicCap' } type - Indicates the list of atomic capability types. + * @throws { BusinessError } 801 - Capability not supported. Function cannot work correctly due to limited *
device capabilities. - * @throws { BusinessError } 33900004 - Service exception. Possible causes: + * @throws { BusinessError } 33900001 - Service exception. Possible causes: *
1. System error, such as a null pointer and container-related exception. *
2. Node-API invocation exception, such as invalid Node-API status. - * @throws { BusinessError } 33900005 - queryCapabilities failed. Possible causes. - *
1. Node-API invocation exception, such as invalid Node-API status. - *
2. IPC request exception. * @syscap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 -- Gitee From 3bf8175ccf8d17c42d38154020ca60ac09dbded1 Mon Sep 17 00:00:00 2001 From: majiangbo2 Date: Fri, 12 Sep 2025 07:40:17 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A3=80=E8=A7=86?= =?UTF-8?q?=E6=84=8F=E8=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: majiangbo2 --- api/@ohos.multimodalAwareness.userStatus.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.multimodalAwareness.userStatus.d.ts b/api/@ohos.multimodalAwareness.userStatus.d.ts index 0569c8134d..a3c7fe4169 100644 --- a/api/@ohos.multimodalAwareness.userStatus.d.ts +++ b/api/@ohos.multimodalAwareness.userStatus.d.ts @@ -90,7 +90,7 @@ declare namespace userStatus { export enum UserStatusAtomicCap { /** - * unknown atomic capability. + * Represents the unknown atomic capability. * @sysCap SystemCapability.MultimodalAwareness.UserStatus * @systemapi * @since 21 -- Gitee