From ffca3f8a2af32db906f56ab55b8f89007114d79d Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Tue, 4 May 2021 09:05:33 +0900 Subject: [PATCH] [Bluetooth][Non-ACR] Fix BluetoothAudio instance creating issue Change-Id: I9f279b68df92cfc06522df26c17b605a8668849c Signed-off-by: Wootak Jung --- .../testcase/TSBluetoothCombine4_Device.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs index 433eb72..92d2fd2 100644 --- a/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs +++ b/tct-suite-vs/Tizen.Bluetooth.Manual.Tests/testcase/TSBluetoothCombine4_Device.cs @@ -20,6 +20,8 @@ namespace Tizen.Network.Bluetooth.Tests static BluetoothDevice foundDevice = null; static BluetoothDevice bondedDevice = null; static bool isBluetoothSupported = false; + static bool isBluetoothAudioCallSupported = false; + static bool isBluetoothAudioMediaSupported = false; static string remote_addr = PreconditionUtils.GetBtAddress(); static bool pass_GetMaskFromUuid_RETURN_SERVICE_MASK = false; @@ -75,6 +77,8 @@ namespace Tizen.Network.Bluetooth.Tests { LogUtils.Write(LogUtils.DEBUG, LogUtils.INFO, "Preconditions for each TEST"); Information.TryGetValue("http://tizen.org/feature/network.bluetooth", out isBluetoothSupported); + Information.TryGetValue("http://tizen.org/feature/network.bluetooth.audio.call", out isBluetoothAudioCallSupported); + Information.TryGetValue("http://tizen.org/feature/network.bluetooth.audio.media", out isBluetoothAudioMediaSupported); flagDiscovery = false; } [TearDown] @@ -412,8 +416,12 @@ namespace Tizen.Network.Bluetooth.Tests pass_ManufacturerData_PROPERTY_READ_ONLY = true; /* PASS condition for pass_GetProfile_RETURN_GET_INSTANCE */ - BluetoothAudio audioObject = bondedDevice.GetProfile(); - Assert.IsNotNull(audioObject, "AudioObject should not be null after getting the instance from GetProfile"); + // In order to create BluetoothAudio instance, one of audio.call and audio.media features should be supported. + if (isBluetoothAudioCallSupported == true || isBluetoothAudioMediaSupported == true) + { + BluetoothAudio audioObject = bondedDevice.GetProfile(); + Assert.IsNotNull(audioObject, "AudioObject should not be null after getting the instance from GetProfile"); + } BluetoothAvrcp avrcpObject = bondedDevice.GetProfile(); Assert.IsNotNull(avrcpObject, "AvrcpObject should not be null after getting the instance from GetProfile"); -- 2.7.4