Package org.robolectric.shadows
Class ShadowSensor
java.lang.Object
org.robolectric.shadows.ShadowSensor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected float
static Sensor
newInstance
(int type) Constructs aSensor
with a given type.void
setMaximumRange
(float range) Sets the return value forSensor.getMaximumRange()
.void
setMinDelay
(int delay) Sets the return value forSensor.getMinDelay()
.void
setWakeUpFlag
(boolean wakeup) Controls the return value ofSensor.isWakeUpSensor()
.
-
Constructor Details
-
ShadowSensor
public ShadowSensor()
-
-
Method Details
-
newInstance
Constructs aSensor
with a given type. -
setWakeUpFlag
public void setWakeUpFlag(boolean wakeup) Controls the return value ofSensor.isWakeUpSensor()
. -
setMaximumRange
public void setMaximumRange(float range) Sets the return value forSensor.getMaximumRange()
. -
getMaximumRange
-
setMinDelay
public void setMinDelay(int delay) Sets the return value forSensor.getMinDelay()
.
-