ParcelableMemoryCache

public enum ParcelableMemoryCache

Internal use only.

This singleton cache keeps references to byte arrays and Bitmaps to be preserved between parceling and unparceling.

This solution is needed because it is not possible to pass large byte arrays and Bitmaps via Intents.

Entries

INSTANCE
Link copied to clipboard
INSTANCE

Types

Token
Link copied to clipboard
public final class Token implements Parcelable
Opaque tokenId type to identify a document.

Functions

getBitmap
Link copied to clipboard
Bitmap getBitmap(@NonNull() ParcelableMemoryCache.Token token)
getByteArray
Link copied to clipboard
Array<byte> getByteArray(@NonNull() ParcelableMemoryCache.Token token)
getInstance
Link copied to clipboard
static ParcelableMemoryCache getInstance()
removeBitmap
Link copied to clipboard
void removeBitmap(@NonNull() ParcelableMemoryCache.Token token)
removeByteArray
Link copied to clipboard
void removeByteArray(@NonNull() ParcelableMemoryCache.Token token)
removeEntriesWithTag
Link copied to clipboard
void removeEntriesWithTag(@NonNull() String tag)
storeBitmap
Link copied to clipboard
ParcelableMemoryCache.Token storeBitmap(@Nullable() Bitmap documentBitmap)
ParcelableMemoryCache.Token storeBitmap(@Nullable() Bitmap documentBitmap, @NonNull() String tag)
storeByteArray
Link copied to clipboard
ParcelableMemoryCache.Token storeByteArray(@NonNull() Array<byte> documentJpeg)
ParcelableMemoryCache.Token storeByteArray(@NonNull() Array<byte> documentJpeg, @NonNull() String tag)
valueOf
Link copied to clipboard
static ParcelableMemoryCache valueOf(String name)
values
Link copied to clipboard
static Array<ParcelableMemoryCachevalues()