From 0dd4801ad75f706b0559923bf8cc522da2de8780 Mon Sep 17 00:00:00 2001 From: ASheLock Date: Tue, 20 Jun 2023 21:06:06 +0800 Subject: [PATCH] =?UTF-8?q?setAudioDevice=20api=209=20interface=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ASheLock --- api/@ohos.telephony.call.d.ts | 58 ++--------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) diff --git a/api/@ohos.telephony.call.d.ts b/api/@ohos.telephony.call.d.ts index 387f5b839a..081cfbb8a6 100644 --- a/api/@ohos.telephony.call.d.ts +++ b/api/@ohos.telephony.call.d.ts @@ -1579,8 +1579,10 @@ declare namespace call { /** * Set the audio device. * + * @permission ohos.permission.SET_TELEPHONY_STATE * @param { AudioDevice } device - Indicates the device of audio. * @param { AsyncCallback } callback - The callback of setAudioDevice. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 8300001 - Invalid parameter value. @@ -1612,42 +1614,6 @@ declare namespace call { */ function setAudioDevice(device: AudioDevice): Promise; - /** - * Set the audio device with options. - * - * @param { AudioDevice } device - Indicates the device of audio. - * @param { AudioDeviceOptions } options - Indicates additional information, such as address of bluetooth. - * @param { AsyncCallback } callback - The callback of setAudioDevice. - * @throws { BusinessError } 202 - Non-system applications use system APIs. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 8300001 - Invalid parameter value. - * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service. - * @throws { BusinessError } 8300003 - System internal error. - * @throws { BusinessError } 8300999 - Unknown error code. - * @syscap SystemCapability.Telephony.CallManager - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setAudioDevice(device: AudioDevice, options: AudioDeviceOptions, callback: AsyncCallback): void; - - /** - * Set the audio device with options. - * - * @param { AudioDevice } device - Indicates the device of audio. - * @param { AudioDeviceOptions } options - Indicates additional information, such as address of bluetooth. - * @returns { Promise } The promise returned by the setAudioDevice. - * @throws { BusinessError } 202 - Non-system applications use system APIs. - * @throws { BusinessError } 401 - Parameter error. - * @throws { BusinessError } 8300001 - Invalid parameter value. - * @throws { BusinessError } 8300002 - Operation failed. Cannot connect to service. - * @throws { BusinessError } 8300003 - System internal error. - * @throws { BusinessError } 8300999 - Unknown error code. - * @syscap SystemCapability.Telephony.CallManager - * @systemapi Hide this for inner system use. - * @since 9 - */ - function setAudioDevice(device: AudioDevice, options?: AudioDeviceOptions): Promise; - /** * Join the conference call. * @@ -3366,26 +3332,6 @@ declare namespace call { countryCode?: string; } - /** - * The option for audio device. - * - * @interface AudioDeviceOptions - * @syscap SystemCapability.Telephony.CallManager - * @systemapi Hide this for inner system use. - * @since 9 - */ - export interface AudioDeviceOptions { - /** - * Indicates the bluetooth device address. - * - * @type { ?string } - * @syscap SystemCapability.Telephony.CallManager - * @systemapi Hide this for inner system use. - * @since 9 - */ - bluetoothAddress?: string; - } - /** * Indicates the MMI code result. *