@Implements(value=android.os.Vibrator.class) public class ShadowVibrator extends Object
Modifier and Type | Field and Description |
---|---|
protected long[] |
pattern |
Constructor and Description |
---|
ShadowVibrator() |
Modifier and Type | Method and Description |
---|---|
long |
getMilliseconds()
Returns the last vibration duration in MS.
|
long[] |
getPattern()
Returns the last vibration pattern.
|
int |
getRepeat()
Returns the last vibration repeat times.
|
boolean |
isCancelled()
Returns true if the Vibrator has been cancelled.
|
boolean |
isVibrating()
Returns true if the Vibrator is currently vibrating as controlled by
Vibrator.vibrate(long) |
void |
setHasAmplitudeControl(boolean hasAmplitudeControl)
Controls the return value of
Vibrator.hasAmplitudeControl() the default is false. |
void |
setHasVibrator(boolean hasVibrator)
Controls the return value of
Vibrator.hasVibrator() the default is true. |
public void setHasVibrator(boolean hasVibrator)
Controls the return value of Vibrator.hasVibrator()
the default is true.
public void setHasAmplitudeControl(boolean hasAmplitudeControl)
Controls the return value of Vibrator.hasAmplitudeControl()
the default is false.
public boolean isVibrating()
Returns true if the Vibrator is currently vibrating as controlled by Vibrator.vibrate(long)
public boolean isCancelled()
Returns true if the Vibrator has been cancelled.
public long getMilliseconds()
Returns the last vibration duration in MS.
public long[] getPattern()
Returns the last vibration pattern.
public int getRepeat()
Returns the last vibration repeat times.