Skip ImageReaderDecoderTest if h.264 is not found.

Bug: 18256010
Change-Id: I122b3e430de1eef794e7d5e7a2f8a647600eac21
diff --git a/tests/tests/media/src/android/media/cts/ImageReaderDecoderTest.java b/tests/tests/media/src/android/media/cts/ImageReaderDecoderTest.java
index d620995..9528db9 100644
--- a/tests/tests/media/src/android/media/cts/ImageReaderDecoderTest.java
+++ b/tests/tests/media/src/android/media/cts/ImageReaderDecoderTest.java
@@ -100,6 +100,10 @@
      * to be supported by hw decoder.
      */
     public void testHwAVCDecode360pForFlexibleYuv() throws Exception {
+        if (!MediaPlayerTestBase.hasH264(false)) {
+            Log.i(TAG, "SKIPPING testSwAVCDecode360pForFlexibleYuv(): no codec found.");
+            return;
+        }
         try {
             int format = ImageFormat.YUV_420_888;
             videoDecodeToSurface(
@@ -115,6 +119,10 @@
      * to be supported by sw decoder.
      */
     public void testSwAVCDecode360pForFlexibleYuv() throws Exception {
+        if (!MediaPlayerTestBase.hasH264(false)) {
+            Log.i(TAG, "SKIPPING testSwAVCDecode360pForFlexibleYuv(): no codec found.");
+            return;
+        }
         try {
             int format = ImageFormat.YUV_420_888;
             videoDecodeToSurface(