已合并
删除setDragSwitchState、setAppDragSwitchState接口 #144143
删除setDragSwitchState、setAppDragSwitchState接口 #144143
已合并
xing-jiangpan创建于 5月13日
2 个文件变更+0-124
@@ -172,65 +172,3 @@ For details about the error codes, see [Universal Error Codes](../errorcode-univ
172let summary: Array<dragInteraction.Summary> = dragInteraction.getDataSummary();172let summary: Array<dragInteraction.Summary> = dragInteraction.getDataSummary();
173console.info(`Drag interaction summary: ${summary}`);173console.info(`Drag interaction summary: ${summary}`);
174```174```
175- 
176-## dragInteraction.setDragSwitchState<sup>18+</sup>
177- 
178-setDragSwitchState(enabled: boolean): void
179- 
180-Sets the global drag-and-drop switch.
181- 
182-**System API**: This is a system API.
183- 
184-**System capability**: SystemCapability.Msdp.DeviceStatus.Drag
185- 
186-**Parameters**
187- 
188-| Name | Type | Mandatory| Description |
189-| -------- | ---------------------------------- | ---- | ---------------------------------------------------------------------- |
190-| enabled | boolean | Yes | State of the drag-and-drop switch.<br>**false**: disabled; **true**: enabled. |
191- 
192-**Error codes**
193- 
194-For details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
195- 
196-| ID| Error Message |
197-| -------- | ----------------- |
198-| 202 | Permission verification failed. A non-system application calls a system API. |
199- 
200-**Example**
201- 
202-```ts
203-dragInteraction.setDragSwitchState(false);
204-```
205- 
206-## dragInteraction.setAppDragSwitchState<sup>18+</sup>
207- 
208-setAppDragSwitchState(enabled: boolean, bundleName: string): void
209- 
210-Sets the drag-and-drop switch for a specific application.
211- 
212-**System API**: This is a system API.
213- 
214-**System capability**: SystemCapability.Msdp.DeviceStatus.Drag
215- 
216-**Parameters**
217- 
218-| Name | Type | Mandatory| Description |
219-| -------- | ---------------------------------- | ---- | ---------------------------------------------------------------------- |
220-| enabled | boolean | Yes | State of the drag-and-drop switch.<br>**false**: disabled; **true**: enabled. |
221-| bundleName | string | Yes | Bundle name of the target application. |
222- 
223-**Error codes**
224- 
225-For details about the error codes, see [Universal Error Codes](../errorcode-universal.md).
226- 
227-| ID| Error Message |
228-| -------- | ----------------- |
229-| 202 | Permission verification failed. A non-system application calls a system API. |
230-| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.2.Incorrect parameter types.3.Parameter verification failed. |
231- 
232-**Example**
233- 
234-```ts
235-dragInteraction.setAppDragSwitchState(true, "com.app.bundleName");
236-```
@@ -171,66 +171,4 @@ getDataSummary(): Array\<Summary>
171```ts171```ts
172let summary: Array<dragInteraction.Summary> = dragInteraction.getDataSummary();172let summary: Array<dragInteraction.Summary> = dragInteraction.getDataSummary();
173console.info(`Drag interaction summary: ${summary}`);173console.info(`Drag interaction summary: ${summary}`);
174-```
175- 
176-## dragInteraction.setDragSwitchState<sup>18+</sup>
177- 
178-setDragSwitchState(enabled: boolean): void
179- 
180-控制统一拖拽功能总开关。
181- 
182-**系统接口:** 此接口为系统接口。
183- 
184-**系统能力:** SystemCapability.Msdp.DeviceStatus.Drag
185- 
186-**参数:**
187- 
188-| 参数名 | 类型 | 必填 | 说明 |
189-| -------- | ---------------------------------- | ---- | ---------------------------------------------------------------------- |
190-| enabled | boolean | 是 | 设置开关状态。<br>false:关闭,true:开启。 |
191- 
192-**错误码:**
193- 
194-以下错误码的详细介绍请参见[通用错误码说明文档](../errorcode-universal.md)。
195- 
196-| 错误码ID | 错误信息 |
197-| -------- | ----------------- |
198-| 202 | Permission verification failed. A non-system application calls a system API. |
199- 
200-**示例:**
201- 
202-```ts
203-dragInteraction.setDragSwitchState(false);
204-```
205- 
206-## dragInteraction.setAppDragSwitchState<sup>18+</sup>
207- 
208-setAppDragSwitchState(enabled: boolean, bundleName: string): void
209- 
210-控制统一拖拽适配应用开关。
211- 
212-**系统接口:** 此接口为系统接口。
213- 
214-**系统能力:** SystemCapability.Msdp.DeviceStatus.Drag
215- 
216-**参数:**
217- 
218-| 参数名 | 类型 | 必填 | 说明 |
219-| -------- | ---------------------------------- | ---- | ---------------------------------------------------------------------- |
220-| enabled | boolean | 是 | 设置开关状态。<br>false:关闭,true:开启。 |
221-| bundleName | string | 是 | 设置指定应用包名。长度取值范围(0, 128]。 |
222- 
223-**错误码:**
224- 
225-以下错误码的详细介绍请参见[通用错误码说明文档](../errorcode-universal.md)。
226- 
227-| 错误码ID | 错误信息 |
228-| -------- | ----------------- |
229-| 202 | Permission verification failed. A non-system application calls a system API. |
230-| 401 | Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.2.Incorrect parameter types.3.Parameter verification failed. |
231- 
232-**示例:**
233- 
234-```ts
235-dragInteraction.setAppDragSwitchState(true, "com.app.bundleName");
236```174```