diff options
author | Jack He <siyuanh@google.com> | 2022-03-15 08:42:19 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-03-15 08:42:19 +0000 |
commit | 0bb2460bd5772317757f561dbfa6b186e586acf8 (patch) | |
tree | 487d97b8689a9eeb796d80831c29b7a06f2023f9 | |
parent | 54f0f187a474f149c83c6a63838688e58f1a0061 (diff) | |
parent | 18cb805a8df8a8c4bcf13e66d58721d90d192ed2 (diff) |
Merge "le_audio: Remove unused Le Audio client source mocks" am: 980a4a6110 am: 66b9153967 am: 18cb805a8d
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2020086
Change-Id: I7a5c7e0bf4f2c1df8a72a3c6f15a3867d5a89d05
-rw-r--r-- | system/bta/le_audio/mock_le_audio_client_audio_source.cc | 59 | ||||
-rw-r--r-- | system/bta/le_audio/mock_le_audio_client_audio_source.h | 35 |
2 files changed, 0 insertions, 94 deletions
diff --git a/system/bta/le_audio/mock_le_audio_client_audio_source.cc b/system/bta/le_audio/mock_le_audio_client_audio_source.cc deleted file mode 100644 index 3b86cb15c8..0000000000 --- a/system/bta/le_audio/mock_le_audio_client_audio_source.cc +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2020 HIMSA II K/S - www.himsa.com. - * Represented by EHIMA - www.ehima.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "mock_le_audio_client_audio_source.h" - -static MockLeAudioClientAudioSource* instance; -void MockLeAudioClientAudioSource::SetMockInstanceForTesting( - MockLeAudioClientAudioSource* mock) { - instance = mock; -} - -bool LeAudioClientAudioSource::Start( - const LeAudioCodecConfiguration& codecConfiguration, - LeAudioClientAudioSinkReceiver* audioReceiver, uint16_t remote_delay_ms) { - return instance->Start(codecConfiguration, audioReceiver, remote_delay_ms); -} - -void LeAudioClientAudioSource::Stop() { instance->Stop(); } - -// FIXME: This is wrong! we will return a different class object - not even in -// inheritance hierarchy -const void* LeAudioClientAudioSource::Acquire() { return instance->Acquire(); } - -void LeAudioClientAudioSource::Release(const void* inst) { - instance->Release(inst); -} - -void LeAudioClientAudioSource::ConfirmStreamingRequest() { - instance->ConfirmStreamingRequest(); -} - -void LeAudioClientAudioSource::CancelStreamingRequest() { - instance->CancelStreamingRequest(); -} - -void LeAudioClientAudioSource::UpdateAudioConfigToHal( - const ::le_audio::offload_config& config) { - instance->UpdateAudioConfigToHal(config); -} - -void LeAudioClientAudioSource::SuspendedForReconfiguration() { - instance->SuspendedForReconfiguration(); -} - -void LeAudioClientAudioSource::DebugDump(int fd) { instance->DebugDump(fd); } diff --git a/system/bta/le_audio/mock_le_audio_client_audio_source.h b/system/bta/le_audio/mock_le_audio_client_audio_source.h deleted file mode 100644 index 59646a5667..0000000000 --- a/system/bta/le_audio/mock_le_audio_client_audio_source.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2020 HIMSA II K/S - www.himsa.com. - * Represented by EHIMA - www.ehima.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include <gmock/gmock.h> - -#include "client_audio.h" - -class MockLeAudioClientAudioSource { - public: - static void SetMockInstanceForTesting(MockLeAudioClientAudioSource* mock); - MOCK_METHOD((bool), Start, - (const LeAudioCodecConfiguration& codecConfiguration, - LeAudioClientAudioSinkReceiver* audioReceiver, - uint16_t remote_delay_ms)); - MOCK_METHOD((void), Stop, ()); - MOCK_METHOD((const void*), Acquire, ()); - MOCK_METHOD((void), Release, (const void*)); - MOCK_METHOD((void), DebugDump, (int fd)); -}; |