Codec2: remove dependancy from C2 Aidl

Bug: 254050314
Test: m
Change-Id: Ie40adc28663744b7d7ff6ec9bb5eb3cb40771b2b
diff --git a/media/codec2/hal/client/Android.bp b/media/codec2/hal/client/Android.bp
index d2ef58c..31244fe 100644
--- a/media/codec2/hal/client/Android.bp
+++ b/media/codec2/hal/client/Android.bp
@@ -43,7 +43,6 @@
         "android.hardware.media.c2@1.0",
         "android.hardware.media.c2@1.1",
         "android.hardware.media.c2@1.2",
-        "android.hardware.media.c2-V1-ndk",
         "libbase",
         "libbinder",
         "libbinder_ndk",
diff --git a/media/codec2/hal/client/client.cpp b/media/codec2/hal/client/client.cpp
index f5128ca..7f75a91 100644
--- a/media/codec2/hal/client/client.cpp
+++ b/media/codec2/hal/client/client.cpp
@@ -33,15 +33,6 @@
 #include <android/hardware/media/c2/1.0/IConfigurable.h>
 #include <android/hidl/manager/1.2/IServiceManager.h>
 
-#include <aidl/android/hardware/media/c2/FieldSupportedValues.h>
-#include <aidl/android/hardware/media/c2/FieldSupportedValuesQuery.h>
-#include <aidl/android/hardware/media/c2/FieldSupportedValuesQueryResult.h>
-#include <aidl/android/hardware/media/c2/IComponent.h>
-#include <aidl/android/hardware/media/c2/IComponentInterface.h>
-#include <aidl/android/hardware/media/c2/IComponentStore.h>
-#include <aidl/android/hardware/media/c2/IConfigurable.h>
-#include <aidl/android/hardware/media/c2/ParamDescriptor.h>
-
 #include <android-base/properties.h>
 #include <bufferpool/ClientManager.h>
 #include <codec2/hidl/1.0/types.h>
@@ -85,7 +76,6 @@
 using ::android::hardware::media::c2::V1_2::SurfaceSyncObj;
 
 namespace bufferpool_hidl = ::android::hardware::media::bufferpool::V2_0;
-namespace c2_aidl = ::aidl::android::hardware::media::c2;
 namespace c2_hidl_base = ::android::hardware::media::c2;
 namespace c2_hidl = ::android::hardware::media::c2::V1_2;
 
@@ -537,7 +527,8 @@
 // Codec2ConfigurableClient::AidlImpl
 
 struct Codec2ConfigurableClient::AidlImpl : public Codec2ConfigurableClient::ImplBase {
-    typedef c2_aidl::IConfigurable Base;
+    // TODO: C2AIDL was not landed yet, use c2_aidl when it is landed.
+    typedef c2_hidl::IConfigurable Base;
 
     // base cannot be null.
     explicit AidlImpl(const std::shared_ptr<Base>& base);
@@ -573,9 +564,9 @@
 Codec2ConfigurableClient::AidlImpl::AidlImpl(const std::shared_ptr<Base>& base)
       : mBase{base},
         mName{[base]() -> C2String {
-                std::string outName;
-                ndk::ScopedAStatus status = base->getName(&outName);
-                return status.isOk() ? outName : "";
+                // TODO: implementation
+                (void)base;
+                return "";
             }()} {
 }
 
@@ -619,11 +610,6 @@
     : mImpl(new Codec2ConfigurableClient::HidlImpl(hidlBase)) {
 }
 
-Codec2ConfigurableClient::Codec2ConfigurableClient(
-        const std::shared_ptr<AidlBase> &aidlBase)
-    : mImpl(new Codec2ConfigurableClient::AidlImpl(aidlBase)) {
-}
-
 const C2String& Codec2ConfigurableClient::getName() const {
     return mImpl->getName();
 }
diff --git a/media/codec2/hal/client/include/codec2/hidl/client.h b/media/codec2/hal/client/include/codec2/hidl/client.h
index 11f5911..6a71f91 100644
--- a/media/codec2/hal/client/include/codec2/hidl/client.h
+++ b/media/codec2/hal/client/include/codec2/hidl/client.h
@@ -113,7 +113,6 @@
 struct Codec2ConfigurableClient {
 
     typedef ::android::hardware::media::c2::V1_0::IConfigurable HidlBase;
-    typedef ::aidl::android::hardware::media::c2::IConfigurable AidlBase;
 
     struct ImplBase {
         virtual ~ImplBase() = default;
@@ -141,7 +140,6 @@
     };
 
     explicit Codec2ConfigurableClient(const sp<HidlBase> &hidlBase);
-    explicit Codec2ConfigurableClient(const std::shared_ptr<AidlBase> &aidlBase);
 
     const C2String& getName() const;