!12724 对注入接口添加权限

Merge pull request !12724 from 任欣瑶/rxy
This commit is contained in:
openharmony_ci 2024-08-05 01:32:30 +00:00 committed by Gitee
commit 35ea9ac8e9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -146,6 +146,19 @@ declare namespace inputEventClient {
* @systemapi hide for inner use
* @since 11
*/
/**
* Inject system keys.
*
* @permission ohos.permission.INJECT_INPUT_EVENT
* @param { KeyEventData } keyEvent - the key event to be injected.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - SystemAPI permission error.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
* @systemapi hide for inner use
* @since 12
*/
function injectKeyEvent(keyEvent: KeyEventData): void;
/**
@ -158,6 +171,18 @@ declare namespace inputEventClient {
* @systemapi hide for inner use
* @since 8
*/
/**
* Inject system keys.
*
* @permission ohos.permission.INJECT_INPUT_EVENT
* @param { { KeyEvent } } KeyEvent - the key event to be injected.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
* @systemapi hide for inner use
* @since 12
*/
function injectEvent({ KeyEvent: KeyEvent }): void;
/**
@ -171,6 +196,19 @@ declare namespace inputEventClient {
* @systemapi hide for inner use
* @since 11
*/
/**
* Inject mouse event.
*
* @permission ohos.permission.INJECT_INPUT_EVENT
* @param { MouseEventData } mouseEvent - the mouse event to be injected.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - SystemAPI permission error.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
* @systemapi hide for inner use
* @since 12
*/
function injectMouseEvent(mouseEvent: MouseEventData): void;
/**
@ -184,12 +222,27 @@ declare namespace inputEventClient {
* @systemapi hide for inner use
* @since 11
*/
/**
* Inject touch event.
*
* @permission ohos.permission.INJECT_INPUT_EVENT
* @param { TouchEventData } touchEvent - the touch event to be injected.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - SystemAPI permission error.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.MultimodalInput.Input.InputSimulator
* @systemapi hide for inner use
* @since 12
*/
function injectTouchEvent(touchEvent: TouchEventData): void;
/**
* Permit event injection permission.
*
* @permission ohos.permission.INJECT_INPUT_EVENT
* @param { boolean } result - Authorization result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 202 - SystemAPI permission error.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types; 3. Parameter verification failed.