public final class HardwareConfigState
extends java.lang.Object
Bitmap.Config.HARDWARE
on
Android O+.Modifier and Type | Field and Description |
---|---|
static boolean |
BLOCK_HARDWARE_BITMAPS_WHEN_GL_CONTEXT_MIGHT_NOT_BE_INITIALIZED
Force the state to wait until a call to allow hardware Bitmaps to be used when they'd otherwise
be eligible to work around a framework issue pre Q that can cause a native crash when
allocating a hardware Bitmap in this specific circumstance.
|
static boolean |
HARDWARE_BITMAPS_SUPPORTED
Support for the hardware bitmap config was added in Android O.
|
static int |
NO_MAX_FD_COUNT
This constant will be removed in a future version without deprecation, avoid using it.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areHardwareBitmapsBlocked() |
void |
blockHardwareBitmaps() |
static HardwareConfigState |
getInstance() |
boolean |
isHardwareConfigAllowed(int targetWidth,
int targetHeight,
boolean isHardwareConfigAllowed,
boolean isExifOrientationRequired) |
void |
unblockHardwareBitmaps() |
public static final boolean BLOCK_HARDWARE_BITMAPS_WHEN_GL_CONTEXT_MIGHT_NOT_BE_INITIALIZED
public static final boolean HARDWARE_BITMAPS_SUPPORTED
public static final int NO_MAX_FD_COUNT
public static HardwareConfigState getInstance()
public boolean areHardwareBitmapsBlocked()
public void blockHardwareBitmaps()
public void unblockHardwareBitmaps()
public boolean isHardwareConfigAllowed(int targetWidth, int targetHeight, boolean isHardwareConfigAllowed, boolean isExifOrientationRequired)