Package org.robolectric.shadows
Class ShadowSensor
java.lang.Object
org.robolectric.shadows.ShadowSensor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected floatstatic SensornewInstance(int type) Constructs aSensorwith a given type.voidsetMaximumRange(float range) Sets the return value forSensor.getMaximumRange().voidsetMinDelay(int delay) Sets the return value forSensor.getMinDelay().voidsetWakeUpFlag(boolean wakeup) Controls the return value ofSensor.isWakeUpSensor().
-
Constructor Details
-
ShadowSensor
public ShadowSensor()
-
-
Method Details
-
newInstance
Constructs aSensorwith 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().
-