Vibrations fix
This commit is contained in:
@@ -978,19 +978,19 @@ public class Actions
|
|||||||
{
|
{
|
||||||
VibrationEffect ve = VibrationEffect.createOneShot(Long.parseLong(vibrateDuration), VibrationEffect.DEFAULT_AMPLITUDE);
|
VibrationEffect ve = VibrationEffect.createOneShot(Long.parseLong(vibrateDuration), VibrationEffect.DEFAULT_AMPLITUDE);
|
||||||
vibrator.vibrate(ve);
|
vibrator.vibrate(ve);
|
||||||
|
|
||||||
// For newer versions it seems we have to wait for the vibration to complete.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Thread.sleep(Long.parseLong(vibrateDuration));
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
vibrator.vibrate(Long.parseLong(vibrateDuration));
|
vibrator.vibrate(Long.parseLong(vibrateDuration));
|
||||||
|
|
||||||
|
// Wait for the vibration to complete.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Thread.sleep(Long.parseLong(vibrateDuration));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,4 +8,5 @@
|
|||||||
* Fixed: Variable trigger didn't always compare correctly.
|
* Fixed: Variable trigger didn't always compare correctly.
|
||||||
* Fixed: Permission check for ability to schedule exact timers
|
* Fixed: Permission check for ability to schedule exact timers
|
||||||
* Fixed: Crash in Google Play version
|
* Fixed: Crash in Google Play version
|
||||||
|
* Fixed: Added waiting period for vibrations
|
||||||
* Added Possibility to select UI theme, hence enabling modern UI designs
|
* Added Possibility to select UI theme, hence enabling modern UI designs
|
||||||
Reference in New Issue
Block a user