From 8aee0cbd5407ffe3a3e64d842f60f0161c087733 Mon Sep 17 00:00:00 2001 From: du-zhihai Date: Mon, 10 Oct 2022 09:59:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?continuationManager=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: du-zhihai Change-Id: I524469e0d3a4dac59dab5c7ce07a5d98749a7200 --- ...ohos.continuation.continuationManager.d.ts | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/api/@ohos.continuation.continuationManager.d.ts b/api/@ohos.continuation.continuationManager.d.ts index 9b9cbe3304..fb081b509d 100644 --- a/api/@ohos.continuation.continuationManager.d.ts +++ b/api/@ohos.continuation.continuationManager.d.ts @@ -30,8 +30,10 @@ declare namespace continuationManager { * Called when the user selects devices from the candidate device list. * You can implement your own processing logic in this callback to initiate the hop process. * - * @param type deviceConnect. + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param type deviceSelected. * @return callback Indicates the information about the selected devices. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600002 - The specified token or callback has not registered. @@ -39,15 +41,17 @@ declare namespace continuationManager { * @syscap SystemCapability.Ability.DistributedAbilityManager * @since 9 */ - function on(type: "deviceConnect", token: number, callback: Callback>): void; - function off(type: "deviceConnect", token: number): void; + function on(type: "deviceSelected", token: number, callback: Callback>): void; + function off(type: "deviceSelected", token: number): void; /** * Called when devices are disconnected from the continuation manager service. * You can implement your own processing logic in this callback, such as notifying the user of the disconnection. * - * @param type deviceDisconnect. + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param type deviceUnselected. * @return callback Indicates the ID of the disconnected devices. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600002 - The specified token or callback has not registered. @@ -55,8 +59,8 @@ declare namespace continuationManager { * @syscap SystemCapability.Ability.DistributedAbilityManager * @since 9 */ - function on(type: "deviceDisconnect", token: number, callback: Callback>): void; - function off(type: "deviceDisconnect", token: number): void; + function on(type: "deviceUnselected", token: number, callback: Callback>): void; + function off(type: "deviceUnselected", token: number): void; /** * Called when the user selects a device from the candidate device list. @@ -149,9 +153,11 @@ declare namespace continuationManager { * Registers an ability to be hopped with the continuation manager service and obtains the registration token * assigned to the ability. * + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param options Indicates the {@link ExtraParams} object containing the extra parameters used to filter * the list of available devices. * @return callback Indicates the callback to be invoked when the continuation manager service is connected. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600003 - The number of token registration times has reached the upper limit. @@ -166,8 +172,10 @@ declare namespace continuationManager { * Unregisters a specified ability from the continuation manager service based on the token obtained during ability * registration. * + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param token Indicates the registration token of the ability. * @return callback Indicates the callback to be invoked when the continuation manager service is connected. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600002 - The specified token or callback has not registered. @@ -180,10 +188,12 @@ declare namespace continuationManager { /** * Updates the connection state of the device where the specified ability is successfully hopped. * + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param token Indicates the registration token of the ability. * @param deviceId Indicates the ID of the device whose connection state is to be updated. * @param status Indicates the connection state to update. * @return callback Indicates the callback to be invoked when the continuation manager service is connected. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600002 - The specified token or callback has not registered. @@ -196,10 +206,12 @@ declare namespace continuationManager { /** * Start to manage the devices that can be selected for continuation. * + * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param token Indicates the registration token of the ability. * @param options Indicates the extraParams object containing the extra parameters used to filter * the list of available devices. This parameter can be null. * @return callback Indicates the callback to be invoked when the continuation manager service is connected. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. * @throws { BusinessError } 16600002 - The specified token or callback has not registered. -- Gitee From 7a0982c8c9766390ba524d10048f4f50d5fda41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=99=BA=E6=B5=B7?= Date: Fri, 14 Oct 2022 09:41:06 +0000 Subject: [PATCH 2/3] update api/@ohos.continuation.continuationManager.d.ts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杜智海 --- api/@ohos.continuation.continuationManager.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.continuation.continuationManager.d.ts b/api/@ohos.continuation.continuationManager.d.ts index fb081b509d..6758c4915c 100644 --- a/api/@ohos.continuation.continuationManager.d.ts +++ b/api/@ohos.continuation.continuationManager.d.ts @@ -59,7 +59,7 @@ declare namespace continuationManager { * @syscap SystemCapability.Ability.DistributedAbilityManager * @since 9 */ - function on(type: "deviceUnselected", token: number, callback: Callback>): void; + function on(type: "deviceUnselected", token: number, callback: Callback>): void; function off(type: "deviceUnselected", token: number): void; /** -- Gitee From 8ec923694919faf23ab6cd386e50c84792bd1210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=99=BA=E6=B5=B7?= Date: Fri, 14 Oct 2022 10:04:05 +0000 Subject: [PATCH 3/3] update api/@ohos.continuation.continuationManager.d.ts. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 杜智海 --- api/@ohos.continuation.continuationManager.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.continuation.continuationManager.d.ts b/api/@ohos.continuation.continuationManager.d.ts index 6758c4915c..292945f77c 100644 --- a/api/@ohos.continuation.continuationManager.d.ts +++ b/api/@ohos.continuation.continuationManager.d.ts @@ -50,7 +50,7 @@ declare namespace continuationManager { * * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param type deviceUnselected. - * @return callback Indicates the ID of the disconnected devices. + * @return callback Indicates the information about the unselected devices. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. * @throws { BusinessError } 16600001 - The system ability work abnormally. -- Gitee