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);
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
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
{