Search in sources :

Example 1 with SensorDirectChannel

use of android.hardware.SensorDirectChannel 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();
}
Also used : MemoryFile(android.os.MemoryFile) SensorDirectChannel(android.hardware.SensorDirectChannel) Test(org.junit.Test) Config(org.robolectric.annotation.Config)

Aggregations

SensorDirectChannel (android.hardware.SensorDirectChannel)1 MemoryFile (android.os.MemoryFile)1 Test (org.junit.Test)1 Config (org.robolectric.annotation.Config)1