Add init() to avoid crash when creating ref in constructor.

This reverts commit 50899fb2696d2bb98a4807a237e124f566293f57.

Bug: 195717690
Fix: 195717690
Test: atest VtsHalTvTunerTargetTest
Change-Id: Icae435f1166e6cf2e2f235979e3d1d37d182d517
diff --git a/tv/tuner/aidl/default/Dvr.h b/tv/tuner/aidl/default/Dvr.h
index 2e96449..68933ae 100644
--- a/tv/tuner/aidl/default/Dvr.h
+++ b/tv/tuner/aidl/default/Dvr.h
@@ -57,7 +57,8 @@
 
 class Dvr : public BnDvr {
   public:
-    Dvr(DvrType type, uint32_t bufferSize, const std::shared_ptr<IDvrCallback>& cb, Demux* demux);
+    Dvr(DvrType type, uint32_t bufferSize, const std::shared_ptr<IDvrCallback>& cb,
+        std::shared_ptr<Demux> demux);
     ~Dvr();
 
     ::ndk::ScopedAStatus getQueueDesc(
@@ -87,7 +88,7 @@
 
   private:
     // Demux service
-    Demux* mDemux;
+    std::shared_ptr<Demux> mDemux;
 
     DvrType mType;
     uint32_t mBufferSize;