Make IOmx registration independent of IOmxStore am: 4271c82efd
am: 77bfcd38b7

Change-Id: I86769ab87cfcd4fbbf5678e3a2d172363b820c07
diff --git a/services/mediacodec/main_codecservice.cpp b/services/mediacodec/main_codecservice.cpp
index 03d18f0..c59944a 100644
--- a/services/mediacodec/main_codecservice.cpp
+++ b/services/mediacodec/main_codecservice.cpp
@@ -66,15 +66,14 @@
             LOG(ERROR) << "Cannot create IOmxStore HAL service.";
         } else if (omxStore->registerAsService() != OK) {
             LOG(ERROR) << "Cannot register IOmxStore HAL service.";
+        }
+        sp<IOmx> omx = new implementation::Omx();
+        if (omx == nullptr) {
+            LOG(ERROR) << "Cannot create IOmx HAL service.";
+        } else if (omx->registerAsService() != OK) {
+            LOG(ERROR) << "Cannot register IOmx HAL service.";
         } else {
-            sp<IOmx> omx = new implementation::Omx();
-            if (omx == nullptr) {
-                LOG(ERROR) << "Cannot create IOmx HAL service.";
-            } else if (omx->registerAsService() != OK) {
-                LOG(ERROR) << "Cannot register IOmx HAL service.";
-            } else {
-                LOG(INFO) << "Treble OMX service created.";
-            }
+            LOG(INFO) << "Treble OMX service created.";
         }
     } else {
         MediaCodecService::instantiate();