Add heic encoder to get_role

This change is needed because now the framework recognizes heic.

Test: make vts -j123 && vts-tradefed run commandAndExit vts \
-m VtsHalMediaOmxStoreV1_0Host -l INFO

Bug: 74073607
Bug: 110118704
Change-Id: I62abdcd2c6cb5273cfc3c3f3da16bffa06ddfcf4
diff --git a/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py b/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
index 001857d..cf8b238 100644
--- a/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
+++ b/media/omx/V1_0/host_omxstore/VtsHalMediaOmxStoreV1_0HostTest.py
@@ -102,7 +102,7 @@
             attr_value = attr['value']
 
             # attr_key must not have been seen before.
-            assert(
+            asserts.assertTrue(
                 attr_key not in key_set,
                 'Service attribute "' + attr_key + '" has duplicates.')
             key_set.add(attr_key)
@@ -212,31 +212,34 @@
         # Mapping from mime types to roles.
         # These values come from MediaDefs.cpp and OMXUtils.cpp
         audio_mime_to_role = {
-            '3gpp'          : 'amrnb',
-            'ac3'           : 'ac3',
-            'amr-wb'        : 'amrwb',
-            'eac3'          : 'eac3',
-            'flac'          : 'flac',
-            'g711-alaw'     : 'g711alaw',
-            'g711-mlaw'     : 'g711mlaw',
-            'gsm'           : 'gsm',
-            'mp4a-latm'     : 'aac',
-            'mpeg'          : 'mp3',
-            'mpeg-L1'       : 'mp1',
-            'mpeg-L2'       : 'mp2',
-            'opus'          : 'opus',
-            'raw'           : 'raw',
-            'vorbis'        : 'vorbis',
+            '3gpp'             : 'amrnb',
+            'ac3'              : 'ac3',
+            'amr-wb'           : 'amrwb',
+            'eac3'             : 'eac3',
+            'flac'             : 'flac',
+            'g711-alaw'        : 'g711alaw',
+            'g711-mlaw'        : 'g711mlaw',
+            'gsm'              : 'gsm',
+            'mp4a-latm'        : 'aac',
+            'mpeg'             : 'mp3',
+            'mpeg-L1'          : 'mp1',
+            'mpeg-L2'          : 'mp2',
+            'opus'             : 'opus',
+            'raw'              : 'raw',
+            'vorbis'           : 'vorbis',
         }
         video_mime_to_role = {
-            '3gpp'          : 'h263',
-            'avc'           : 'avc',
-            'dolby-vision'  : 'dolby-vision',
-            'hevc'          : 'hevc',
-            'mp4v-es'       : 'mpeg4',
-            'mpeg2'         : 'mpeg2',
-            'x-vnd.on2.vp8' : 'vp8',
-            'x-vnd.on2.vp9' : 'vp9',
+            '3gpp'             : 'h263',
+            'avc'              : 'avc',
+            'dolby-vision'     : 'dolby-vision',
+            'hevc'             : 'hevc',
+            'mp4v-es'          : 'mpeg4',
+            'mpeg2'            : 'mpeg2',
+            'x-vnd.on2.vp8'    : 'vp8',
+            'x-vnd.on2.vp9'    : 'vp9',
+        }
+        image_mime_to_role = {
+            'vnd.android.heic' : 'heic',
         }
         def get_role(is_encoder, mime):
             """Returns the role based on is_encoder and mime.
@@ -268,6 +271,11 @@
                     return None
                 prefix = 'video_'
                 suffix = video_mime_to_role[mime_suffix]
+            elif mime.startswith('image/'):
+                if mime_suffix not in image_mime_to_role:
+                    return None
+                prefix = 'image_'
+                suffix = image_mime_to_role[mime_suffix]
             else:
                 return None
             return prefix + middle + suffix