Make IOmx registration independent of IOmxStore
am: 4271c82efd

Change-Id: I3278a860b0dcd39a4107b082dfc03d72fe8375dc
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();