@Implements(value=android.hardware.SensorManager.class, looseSignatures=true) public class ShadowSensorManager extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
forceListenersToFail |
Constructor and Description |
---|
ShadowSensorManager() |
Modifier and Type | Method and Description |
---|---|
void |
addSensor(int sensorType,
android.hardware.Sensor sensor)
Provide a Sensor for the indicated sensor type.
|
java.lang.Object |
createDirectChannel(android.os.MemoryFile mem) |
android.hardware.SensorEvent |
createSensorEvent() |
android.hardware.Sensor |
getDefaultSensor(int type) |
boolean |
hasListener(android.hardware.SensorEventListener listener) |
boolean |
registerListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor,
int rate) |
void |
unregisterListener(android.hardware.SensorEventListener listener) |
void |
unregisterListener(android.hardware.SensorEventListener listener,
android.hardware.Sensor sensor) |
public void addSensor(int sensorType, android.hardware.Sensor sensor)
Provide a Sensor for the indicated sensor type.
sensorType
- from Sensor constantssensor
- Sensor instance@Implementation public android.hardware.Sensor getDefaultSensor(int type)
@Implementation public boolean registerListener(android.hardware.SensorEventListener listener, android.hardware.Sensor sensor, int rate)
@Implementation public void unregisterListener(android.hardware.SensorEventListener listener, android.hardware.Sensor sensor)
@Implementation public void unregisterListener(android.hardware.SensorEventListener listener)
public boolean hasListener(android.hardware.SensorEventListener listener)
public android.hardware.SensorEvent createSensorEvent()
@Implementation(minSdk=26) public java.lang.Object createDirectChannel(android.os.MemoryFile mem)