Package org.robolectric.shadows
Class ShadowSensor
- java.lang.Object
-
- org.robolectric.shadows.ShadowSensor
-
@Implements(android.hardware.Sensor.class) public class ShadowSensor extends Object
-
-
Constructor Summary
Constructors Constructor Description ShadowSensor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected floatgetMaximumRange()static SensornewInstance(int type)Constructs aSensorwith a given type.voidsetMaximumRange(float range)Sets the return value forSensor.getMaximumRange().voidsetWakeUpFlag(boolean wakeup)Controls the return value ofSensor.isWakeUpSensor().
-
-
-
Method Detail
-
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
@Implementation protected float getMaximumRange()
-
-