Update imagedecoder for header updates
Bug: 135133301
Test: Ibf7c0e563feeb08ce6dbabb5e86ddb385c9dff54
Remove isAnimated and update parameters/returns to match
I93df851dd9fee2eb8d097e2158fb95003a0474db.
Change-Id: Ida2af1682b5f9b91e37079005391b1594239d345
diff --git a/native/graphics/jni/imagedecoder.cpp b/native/graphics/jni/imagedecoder.cpp
index 1c45ea6..79bcc15 100644
--- a/native/graphics/jni/imagedecoder.cpp
+++ b/native/graphics/jni/imagedecoder.cpp
@@ -208,13 +208,6 @@
return getMimeType(toDecoder(info)->mCodec->getEncodedFormat());
}
-bool AImageDecoderHeaderInfo_isAnimated(const AImageDecoderHeaderInfo* info) {
- if (!info) {
- return false;
- }
- return toDecoder(info)->mCodec->codec()->getFrameCount() > 1;
-}
-
int32_t AImageDecoderHeaderInfo_getDataSpace(const AImageDecoderHeaderInfo* info) {
if (!info) {
return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
@@ -247,8 +240,7 @@
}
}
-AndroidBitmapFormat AImageDecoderHeaderInfo_getAndroidBitmapFormat(
- const AImageDecoderHeaderInfo* info) {
+int32_t AImageDecoderHeaderInfo_getAndroidBitmapFormat(const AImageDecoderHeaderInfo* info) {
if (!info) {
return ANDROID_BITMAP_FORMAT_NONE;
}
@@ -281,7 +273,7 @@
? ANDROID_IMAGE_DECODER_SUCCESS : ANDROID_IMAGE_DECODER_INVALID_CONVERSION;
}
-int AImageDecoder_setTargetSize(AImageDecoder* decoder, int width, int height) {
+int AImageDecoder_setTargetSize(AImageDecoder* decoder, int32_t width, int32_t height) {
if (!decoder) {
return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
}
@@ -291,7 +283,7 @@
}
int AImageDecoder_computeSampledSize(const AImageDecoder* decoder, int sampleSize,
- int* width, int* height) {
+ int32_t* width, int32_t* height) {
if (!decoder || !width || !height || sampleSize < 1) {
return ANDROID_IMAGE_DECODER_BAD_PARAMETER;
}
diff --git a/native/graphics/jni/libjnigraphics.map.txt b/native/graphics/jni/libjnigraphics.map.txt
index 1b396b8..01c1477 100644
--- a/native/graphics/jni/libjnigraphics.map.txt
+++ b/native/graphics/jni/libjnigraphics.map.txt
@@ -17,7 +17,6 @@
AImageDecoderHeaderInfo_getHeight; # introduced=30
AImageDecoderHeaderInfo_getMimeType; # introduced=30
AImageDecoderHeaderInfo_getAlphaFlags; # introduced=30
- AImageDecoderHeaderInfo_isAnimated; # introduced=30
AImageDecoderHeaderInfo_getAndroidBitmapFormat; # introduced=30
AImageDecoderHeaderInfo_getDataSpace; # introduced=30
AndroidBitmap_getInfo;