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 float
getMaximumRange()
static Sensor
newInstance(int type)
Constructs aSensor
with a given type.void
setMaximumRange(float range)
Sets the return value forSensor.getMaximumRange()
.void
setWakeUpFlag(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()
-
-