use of android.os.MemoryFile in project fresco by facebook.
the class WebpDecodingTest method test_webp_extended_decoding_filedescriptor_bitmap.
@Test
public void test_webp_extended_decoding_filedescriptor_bitmap() throws Throwable {
final MemoryFile memoryFile = getMemoryFile("webp_e.webp");
final Bitmap bitmap = mWebpBitmapFactory.decodeFileDescriptor(getMemoryFileDescriptor(memoryFile), null, null);
memoryFile.close();
assertBitmap(bitmap, 480, 320);
}
use of android.os.MemoryFile in project robolectric by robolectric.
the class ShadowSensorManagerTest method createDirectChannel.
@Test
@Config(minSdk = Build.VERSION_CODES.O)
public void createDirectChannel() throws Exception {
SensorDirectChannel channel = sensorManager.createDirectChannel(new MemoryFile("name", 10));
assertThat(channel.isOpen()).isTrue();
channel.close();
assertThat(channel.isOpen()).isFalse();
}
Aggregations