audio: Make renamings suggested by reviewers
Rename DriverInterface::getPosition -> refinePosition. This reflects
the fact that the driver may provide more precise position, however
this is an optional operation.
Rename StreamIn/Out::mContext -> mContextInstance. This is
to emphasize that StreamIn/Out actually own the context and they
hold the real context instance, not just a reference/pointer
to it, like other classes involved in the inheritance chain.
Bug: 286914845
Test: atest VtsHalAudioCoreTargetTest
Change-Id: Id7159f9bf3ee020dc7cf594ec35f5d59d23d7e31
diff --git a/audio/aidl/default/bluetooth/StreamBluetooth.cpp b/audio/aidl/default/bluetooth/StreamBluetooth.cpp
index 8cb93e3..91a33c2 100644
--- a/audio/aidl/default/bluetooth/StreamBluetooth.cpp
+++ b/audio/aidl/default/bluetooth/StreamBluetooth.cpp
@@ -320,7 +320,7 @@
const std::vector<MicrophoneInfo>& microphones,
Module::BtProfileHandles&& btProfileHandles)
: StreamIn(std::move(context), microphones),
- StreamBluetooth(&(StreamIn::mContext), sinkMetadata, std::move(btProfileHandles)) {}
+ StreamBluetooth(&mContextInstance, sinkMetadata, std::move(btProfileHandles)) {}
ndk::ScopedAStatus StreamInBluetooth::getActiveMicrophones(
std::vector<MicrophoneDynamicInfo>* _aidl_return __unused) {
@@ -333,6 +333,6 @@
const std::optional<AudioOffloadInfo>& offloadInfo,
Module::BtProfileHandles&& btProfileHandles)
: StreamOut(std::move(context), offloadInfo),
- StreamBluetooth(&(StreamOut::mContext), sourceMetadata, std::move(btProfileHandles)) {}
+ StreamBluetooth(&mContextInstance, sourceMetadata, std::move(btProfileHandles)) {}
} // namespace aidl::android::hardware::audio::core