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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static ImageDecoder
createFromAsset
(AssetManager.AssetInputStream ais, boolean preferAnimation, ImageDecoder.Source source) protected static ImageDecoder
protected static void
nClose
(long nativePtr) protected static ImageDecoder
nCreate
(byte[] data, int offset, int length, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(byte[] data, int offset, int length, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(long asset, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(long asset, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(FileDescriptor fd, long length, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(FileDescriptor fd, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(InputStream is, byte[] storage, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(InputStream is, byte[] storage, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(ByteBuffer buffer, int position, int limit, boolean preferAnimation, ImageDecoder.Source src) protected static ImageDecoder
nCreate
(ByteBuffer buffer, int position, int limit, ImageDecoder.Source src) 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) 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) protected static ColorSpace
nGetColorSpace
(long nativePtr) protected static String
nGetMimeType
(long nativePtr) protected static void
nGetPadding
(long nativePtr, Rect outRect) protected static Size
nGetSampledSize
(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
-