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
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()
.
-
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
-