OSDN Git Service

Block allocateBackup if the node is not secure node.
authorDongwon Kang <dwkang@google.com>
Wed, 30 Aug 2017 21:37:14 +0000 (14:37 -0700)
committerDongwon Kang <dwkang@google.com>
Fri, 1 Sep 2017 22:15:53 +0000 (15:15 -0700)
Bug: 63522818
Test: cts-tradefed run cts -p android.media & YT & Play Movies & Cast
Change-Id: I2be2748ecabf49d7842a90676e68978bf0c56b71
Merged-In: I2be2748ecabf49d7842a90676e68978bf0c56b71

media/libstagefright/omx/OMXNodeInstance.cpp

index 7345ced..4b4d09f 100644 (file)
@@ -927,6 +927,13 @@ status_t OMXNodeInstance::allocateBuffer(
         return BAD_VALUE;
     }
 
+    if (!mIsSecure) {
+        // This method is used only with secure codecs in this release.
+        ALOGE("b/63522818");
+        android_errorWriteLog(0x534e4554, "63522818");
+        return ERROR_UNSUPPORTED;
+    }
+
     BufferMeta *buffer_meta = new BufferMeta(size, portIndex);
 
     OMX_BUFFERHEADERTYPE *header;