Remove the dependency on passthrough IOmx in media.codec.

Also clean up some other dependencies.

Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
diff --git a/services/mediacodec/main_codecservice.cpp b/services/mediacodec/main_codecservice.cpp
index 983bbba..688c651 100644
--- a/services/mediacodec/main_codecservice.cpp
+++ b/services/mediacodec/main_codecservice.cpp
@@ -33,6 +33,7 @@
 
 #include <android/hardware/media/omx/1.0/IOmx.h>
 #include <hidl/HidlTransportSupport.h>
+#include <omx/hal/1.0/impl/Omx.h>
 
 using namespace android;
 
@@ -54,10 +55,10 @@
     if ((trebleOmx == 1) || ((trebleOmx == -1) &&
             property_get_bool("persist.hal.binderization", 0))) {
         using namespace ::android::hardware::media::omx::V1_0;
-        sp<IOmx> omx = IOmx::getService(true);
+        sp<IOmx> omx = new implementation::Omx();
         if (omx == nullptr) {
             LOG(ERROR) << "Cannot create a Treble IOmx service.";
-        } else if (omx->registerAsService("default") != OK) {
+        } else if (omx->registerAsService() != OK) {
             LOG(ERROR) << "Cannot register a Treble IOmx service.";
         } else {
             LOG(INFO) << "Treble IOmx service created.";