diff --git a/frameworks/native/bluetoothclient/BUILD.gn b/frameworks/native/bluetoothclient/BUILD.gn index 5c1cc6aead83a880c324db579e067c59565030e7..cdcd946a6b3a7db16e3b924211592d0f5860457e 100644 --- a/frameworks/native/bluetoothclient/BUILD.gn +++ b/frameworks/native/bluetoothclient/BUILD.gn @@ -41,7 +41,6 @@ ohos_shared_library("audio_bluetooth_client") { "hdf_core:libhdi", "hdf_core:libpub_utils", "hilog:libhilog", - "ipc:ipc_single", ] part_name = "audio_framework" diff --git a/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp index ecec21a244c627299e990487ed413f3a40202f80..c73560ef46aff01ed609d81946f18f72ee03d7df 100644 --- a/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp +++ b/frameworks/native/bluetoothclient/audio_bluetooth_manager.cpp @@ -15,7 +15,6 @@ #include "audio_bluetooth_manager.h" #include "bluetooth_def.h" -#include "ipc_skeleton.h" #include "audio_errors.h" #include "audio_log.h" #include "bluetooth_device_manager.h" @@ -285,11 +284,6 @@ int32_t AudioHfpManager::ConnectScoWithAudioScene(AudioScene scene) std::lock_guard sceneLock(g_audioSceneLock); int8_t lastScoCategory = GetScoCategoryFromScene(scene_); int8_t newScoCategory = GetScoCategoryFromScene(scene); - int32_t uid = IPCSkeleton::GetCallingUid(); - if (scene == AUDIO_SCENE_RINGING && uid == TELEPHONY_UID) { - AUDIO_INFO_LOG("Telephony call ring scene need set correct category."); - newScoCategory = ScoCategory::SCO_CALLULAR; - } if (lastScoCategory == newScoCategory) { AUDIO_DEBUG_LOG("AudioScene category is not changed, ignore ConnectScoWithAudioScene operation."); return SUCCESS; @@ -315,9 +309,6 @@ int32_t AudioHfpManager::ConnectScoWithAudioScene(AudioScene scene) CHECK_AND_RETURN_RET_LOG(ret == 0, ERROR, "ConnectScoWithAudioScene failed, result: %{public}d", ret); } scene_ = scene; - if (newScoCategory == ScoCategory::SCO_CALLULAR) { - scene_ = AUDIO_SCENE_PHONE_CALL; - } return SUCCESS; } @@ -341,10 +332,10 @@ int32_t AudioHfpManager::DisconnectSco() int8_t AudioHfpManager::GetScoCategoryFromScene(AudioScene scene) { switch (scene) { + case AUDIO_SCENE_RINGING: case AUDIO_SCENE_PHONE_CALL: return ScoCategory::SCO_CALLULAR; case AUDIO_SCENE_PHONE_CHAT: - case AUDIO_SCENE_RINGING: return ScoCategory::SCO_VIRTUAL; default: return ScoCategory::SCO_DEFAULT; diff --git a/frameworks/native/bluetoothclient/audio_bluetooth_manager.h b/frameworks/native/bluetoothclient/audio_bluetooth_manager.h index 16bf2f2c478d31709db12e70af883bca6894abdc..db59fd1d823c281c5d0880920ae400597731903f 100644 --- a/frameworks/native/bluetoothclient/audio_bluetooth_manager.h +++ b/frameworks/native/bluetoothclient/audio_bluetooth_manager.h @@ -114,7 +114,6 @@ private: static std::shared_ptr hfpListener_; static AudioStandard::AudioScene scene_; static BluetoothRemoteDevice activeHfpDevice_; - static const int32_t TELEPHONY_UID = 1013; }; } }