Vibrations fix

This commit is contained in:
2025-12-07 14:00:17 +01:00
parent e52ce4cd30
commit 3d2b48706d
2 changed files with 11 additions and 10 deletions

View File

@@ -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
{ {

View File

@@ -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