public final class DummySurface extends Surface
Surface.Surface.OutOfResourcesExceptionParcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>| Modifier and Type | Field and Description |
|---|---|
boolean |
secure
Whether the surface is secure.
|
CREATOR, ROTATION_0, ROTATION_180, ROTATION_270, ROTATION_90CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Modifier and Type | Method and Description |
|---|---|
static boolean |
isSecureSupported(Context context)
Returns whether the device supports secure dummy surfaces.
|
static DummySurface |
newInstanceV17(Context context,
boolean secure)
Returns a newly created dummy surface.
|
void |
release() |
describeContents, finalize, isValid, lockCanvas, lockHardwareCanvas, readFromParcel, toString, unlockCanvas, unlockCanvasAndPost, writeToParcelpublic static boolean isSecureSupported(Context context)
context - Any Context.public static DummySurface newInstanceV17(Context context, boolean secure)
release()
when it's no longer required.
Must only be called if Util.SDK_INT is 17 or higher.
context - Any Context.secure - Whether a secure surface is required. Must only be requested if
isSecureSupported(Context) returns true.IllegalStateException - If a secure surface is requested on a device for which
isSecureSupported(Context) returns false.