summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Xiao Huang <xiaohx@google.com> 2023-04-27 15:49:46 +0000
committer Xiao Huang <xiaohx@google.com> 2023-04-27 15:49:46 +0000
commit5f8b51b8b05837d83b6896c02ff912e4adb09fa6 (patch)
tree278dd0581b957252a679354efe5982b01c7dd241
parent1fcf501bee2bf97e5972701ddc7f9835dcea0582 (diff)
Use REGULAR_CODECS instead of ALL_CODECS
Checking if P010 or HEVC is supported does not need ALL_CODECS, which includes codecs supporting special features like secure or tunnel. REGULAR_CODECS is enough to use here. Bug: 278664575 Test: atest BitmapFactoryTest ImageDecoderTest Change-Id: Id7f27ec204d85e1c177bc3101b4be81f21affeae
-rw-r--r--graphics/java/android/graphics/ImageDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/ImageDecoder.java b/graphics/java/android/graphics/ImageDecoder.java
index fc286faa41d1..dd4b58eb83dc 100644
--- a/graphics/java/android/graphics/ImageDecoder.java
+++ b/graphics/java/android/graphics/ImageDecoder.java
@@ -2084,7 +2084,7 @@ public final class ImageDecoder implements AutoCloseable {
}
MediaFormat format = new MediaFormat();
format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_VIDEO_HEVC);
- MediaCodecList mcl = new MediaCodecList(MediaCodecList.ALL_CODECS);
+ MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
sIsHevcDecoderSupported = mcl.findDecoderForFormat(format) != null;
sIsHevcDecoderSupportedInitialized = true;
return sIsHevcDecoderSupported;
@@ -2129,7 +2129,7 @@ public final class ImageDecoder implements AutoCloseable {
* Checks if the device supports decoding 10-bit for the given mime type.
*/
private static void checkP010SupportforAV1HEVC() {
- MediaCodecList codecList = new MediaCodecList(MediaCodecList.ALL_CODECS);
+ MediaCodecList codecList = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
for (MediaCodecInfo mediaCodecInfo : codecList.getCodecInfos()) {
if (mediaCodecInfo.isEncoder()) {
continue;