From 27351a80eaf13ed96db49759ff76781d0cccdfd8 Mon Sep 17 00:00:00 2001 From: dufresne_andy Date: Thu, 7 Sep 2023 14:08:51 +0000 Subject: [PATCH] fixed 0f888cd from https://gitee.com/dufresne__andy/interface_sdk-js/pulls/6874 Description: solve the problem that driver interface lacks permissions. Feature or Bugfix:Bugfix Binary Source: No Signed-off-by: dufresne_andy --- api/@ohos.driver.deviceManager.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/@ohos.driver.deviceManager.d.ts b/api/@ohos.driver.deviceManager.d.ts index f42a3fc95b..f2ec0b306e 100644 --- a/api/@ohos.driver.deviceManager.d.ts +++ b/api/@ohos.driver.deviceManager.d.ts @@ -27,6 +27,7 @@ declare namespace deviceManager { /** * Query the external device list. * + * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER * @param { number } busType - The bus type of device to be queried. * @returns { Array> } External device list. * @throws { BusinessError } 401 - The parameter check failed. @@ -39,6 +40,7 @@ declare namespace deviceManager { /** * Bind the device based on the device information returned by queryDevices(). * + * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER * @param { number } deviceId - Device id on the device list returned by queryDevices(). * @param { AsyncCallback } onDisconnect - Callback is invoked when device is disconnected after bind success. * @param { AsyncCallback } callback - Indicates the bind result including device ID and remote object. @@ -53,6 +55,7 @@ declare namespace deviceManager { /** * Bind the device based on the device information returned by queryDevices(). * + * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER * @param { number } deviceId - Device id on the device list returned by queryDevices(). * @param { AsyncCallback } onDisconnect - Callback is invoked when device is disconnected after bind success. * @returns { Promise } Indicates the bind result including device ID and remote object. @@ -67,6 +70,7 @@ declare namespace deviceManager { /** * Unbind the device based on the device information returned by queryDevices(). * + * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER * @param { number } deviceId - Device id on the device list returned by queryDevices(). * @param { AsyncCallback } callback - Indicates the unbind result invoked when unbind is finished. * @throws { BusinessError } 401 - The parameter check failed. @@ -79,6 +83,7 @@ declare namespace deviceManager { /** * Unbind the device based on the device information returned by queryDevices(). * + * @permission ohos.permission.ACCESS_EXTENSIONAL_DEVICE_DRIVER * @param { number } deviceId - Device id on the device list returned by queryDevices(). * @returns { Promise } - Indicates the unbind result invoked when unbind is finished. * @throws { BusinessError } 401 - The parameter check failed. -- Gitee