Package org.robolectric.shadows
Class ShadowSystemVibrator
- java.lang.Object
-
- org.robolectric.shadows.ShadowVibrator
-
- org.robolectric.shadows.ShadowSystemVibrator
-
@Implements(value=android.os.SystemVibrator.class, isInAndroidSdk=false) public class ShadowSystemVibrator extends ShadowVibrator
-
-
Field Summary
-
Fields inherited from class org.robolectric.shadows.ShadowVibrator
pattern, supportedPrimitives, vibrationAttributesFromLastVibration, vibrationEffectSegments
-
-
Constructor Summary
Constructors Constructor Description ShadowSystemVibrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cancel()
protected boolean
hasAmplitudeControl()
protected boolean
hasVibrator()
protected void
recordVibratePattern(long[] pattern, int repeat)
void
vibrate(int owningUid, String owningPackage, long milliseconds)
protected void
vibrate(int owningUid, String owningPackage, long[] pattern, int repeat)
protected void
vibrate(int uid, String opPkg, long[] pattern, int repeat, AudioAttributes attributes)
protected void
vibrate(int uid, String opPkg, long milliseconds, AudioAttributes attributes)
protected void
vibrate(int uid, String opPkg, VibrationEffect effect, AudioAttributes attributes)
protected void
vibrate(int uid, String opPkg, VibrationEffect effect, String reason, AudioAttributes attributes)
protected void
vibrate(int uid, String opPkg, VibrationEffect effect, String reason, VibrationAttributes attributes)
void
vibrate(long milliseconds)
protected void
vibrate(long[] pattern, int repeat)
-
Methods inherited from class org.robolectric.shadows.ShadowVibrator
areAllPrimitivesSupported, getEffectId, getMilliseconds, getPattern, getRepeat, getVibrationAttributesFromLastVibration, getVibrationEffectSegments, isCancelled, isVibrating, setHasAmplitudeControl, setHasVibrator, setSupportedPrimitives
-
-
-
-
Method Detail
-
hasVibrator
@Implementation protected boolean hasVibrator()
-
hasAmplitudeControl
@Implementation(minSdk=26) protected boolean hasAmplitudeControl()
-
vibrate
@Implementation(maxSdk=17) protected void vibrate(long[] pattern, int repeat)
-
vibrate
@Implementation(minSdk=18, maxSdk=20) protected void vibrate(int owningUid, String owningPackage, long[] pattern, int repeat)
-
vibrate
@Implementation(minSdk=21, maxSdk=25) protected void vibrate(int uid, String opPkg, long[] pattern, int repeat, AudioAttributes attributes)
-
vibrate
@Implementation(maxSdk=17) public void vibrate(long milliseconds)
-
vibrate
@Implementation(minSdk=18, maxSdk=20) public void vibrate(int owningUid, String owningPackage, long milliseconds)
-
vibrate
@Implementation(minSdk=21, maxSdk=25) protected void vibrate(int uid, String opPkg, long milliseconds, AudioAttributes attributes)
-
vibrate
@Implementation(minSdk=26, maxSdk=28) protected void vibrate(int uid, String opPkg, VibrationEffect effect, AudioAttributes attributes)
-
vibrate
@Implementation(minSdk=29, maxSdk=30) protected void vibrate(int uid, String opPkg, VibrationEffect effect, String reason, AudioAttributes attributes)
-
vibrate
@Implementation(minSdk=31) protected void vibrate(int uid, String opPkg, VibrationEffect effect, String reason, VibrationAttributes attributes)
-
recordVibratePattern
protected void recordVibratePattern(long[] pattern, int repeat)
-
cancel
@Implementation protected void cancel()
-
-