Package org.robolectric.shadows
Class ShadowNativeImageDecoder
java.lang.Object
org.robolectric.shadows.ShadowNativeImageDecoder
@Implements(value=android.graphics.ImageDecoder.class,
minSdk=28,
shadowPicker=Picker.class)
public class ShadowNativeImageDecoder
extends Object
Shadow for
ImageDecoder that is backed by native code-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ImageDecodercreateFromAsset(AssetManager.AssetInputStream ais, boolean preferAnimation, ImageDecoder.Source source) protected static ImageDecoderprotected static voidnClose(long nativePtr) protected static ImageDecodernCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecodernCreate(byte[] data, int offset, int length, ImageDecoder.Source src) protected static ImageDecodernCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecodernCreate(long asset, ImageDecoder.Source src) protected static ImageDecodernCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecodernCreate(FileDescriptor fd, ImageDecoder.Source src) protected static ImageDecodernCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecodernCreate(InputStream is, byte[] storage, ImageDecoder.Source src) protected static ImageDecodernCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecodernCreate(ByteBuffer buffer, int position, int limit, ImageDecoder.Source src) protected static BitmapnDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended) protected static BitmapnDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, ColorSpace desiredColorSpace) protected static ColorSpacenGetColorSpace(long nativePtr) protected static StringnGetMimeType(long nativePtr) protected static voidnGetPadding(long nativePtr, Rect outRect) protected static SizenGetSampledSize(long nativePtr, int sampleSize)
-
Constructor Details
-
ShadowNativeImageDecoder
public ShadowNativeImageDecoder()
-
-
Method Details
-
createFromAsset
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder createFromAsset(AssetManager.AssetInputStream ais, ImageDecoder.Source source) throws IOException - Throws:
IOException
-
createFromAsset
@Implementation(minSdk=30) protected static ImageDecoder createFromAsset(AssetManager.AssetInputStream ais, boolean preferAnimation, ImageDecoder.Source source) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(long asset, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(long asset, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(byte[] data, int offset, int length, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=28, maxSdk=29) protected static ImageDecoder nCreate(InputStream is, byte[] storage, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=30) protected static ImageDecoder nCreate(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(maxSdk=29) protected static ImageDecoder nCreate(FileDescriptor fd, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nCreate
@Implementation(minSdk=31) protected static ImageDecoder nCreate(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) throws IOException - Throws:
IOException
-
nDecodeBitmap
@Implementation(minSdk=28, maxSdk=28) protected static Bitmap nDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, ColorSpace desiredColorSpace) throws IOException - Throws:
IOException
-
nDecodeBitmap
@Implementation(minSdk=29) protected static Bitmap nDecodeBitmap(long nativePtr, ImageDecoder decoder, boolean doPostProcess, int width, int height, Rect cropRect, boolean mutable, int allocator, boolean unpremulRequired, boolean conserveMemory, boolean decodeAsAlphaMask, long desiredColorSpace, boolean extended) throws IOException - Throws:
IOException
-
nGetSampledSize
-
nGetPadding
-
nClose
-
nGetMimeType
-
nGetColorSpace
-