Merge "Fixing safteynet logging bug introduced in ag/862848" into mnc-dev
am: 93edd483f6

* commit '93edd483f645fe30cc508ade82ea1ffe60e74cbb':
  Fixing safteynet logging bug introduced in ag/862848
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp
index 07f3697..97b7ff0 100644
--- a/media/libmedia/IOMX.cpp
+++ b/media/libmedia/IOMX.cpp
@@ -925,10 +925,6 @@
             MetadataBufferType type = kMetadataBufferTypeInvalid;
             status_t err = storeMetaDataInBuffers(node, port_index, enable, &type);
 
-            if ((err != OK) && (type == kMetadataBufferTypeInvalid)) {
-                android_errorWriteLog(0x534e4554, "26324358");
-            }
-
             reply->writeInt32(type);
             reply->writeInt32(err);
 
diff --git a/media/libstagefright/omx/OMXNodeInstance.cpp b/media/libstagefright/omx/OMXNodeInstance.cpp
index 94a213a..8735eff 100644
--- a/media/libstagefright/omx/OMXNodeInstance.cpp
+++ b/media/libstagefright/omx/OMXNodeInstance.cpp
@@ -519,6 +519,7 @@
 status_t OMXNodeInstance::storeMetaDataInBuffers_l(
         OMX_U32 portIndex, OMX_BOOL enable, MetadataBufferType *type) {
     if (portIndex != kPortIndexInput && portIndex != kPortIndexOutput) {
+        android_errorWriteLog(0x534e4554, "26324358");
         return BAD_VALUE;
     }