Make the default tuner HAL to be a dynamic AIDL
Add lazy tuner service.
Refine code to allow Tuner reference count to be 0 when no one uses it.
Bug: 236002754
Test: atest VtsHalTvTunerTargetTest on both lazy and normal HALs
Test: atest android.media.tv.tuner.cts on both lazy and normal HALs
Change-Id: I0cc69fe8ffd79a66db00cb72d212c222130629b5
diff --git a/tv/tuner/aidl/default/Frontend.h b/tv/tuner/aidl/default/Frontend.h
index 1d9ab53..85bd636 100644
--- a/tv/tuner/aidl/default/Frontend.h
+++ b/tv/tuner/aidl/default/Frontend.h
@@ -34,7 +34,7 @@
class Frontend : public BnFrontend {
public:
- Frontend(FrontendType type, int32_t id, std::shared_ptr<Tuner> tuner);
+ Frontend(FrontendType type, int32_t id);
::ndk::ScopedAStatus setCallback(
const std::shared_ptr<IFrontendCallback>& in_callback) override;
@@ -62,6 +62,7 @@
string getSourceFile();
bool isLocked();
void getFrontendInfo(FrontendInfo* _aidl_return);
+ void setTunerService(std::shared_ptr<Tuner> tuner);
private:
virtual ~Frontend();