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,8 +978,11 @@ 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);
}
else
vibrator.vibrate(Long.parseLong(vibrateDuration));
// For newer versions it seems we have to wait for the vibration to complete. // Wait for the vibration to complete.
try try
{ {
Thread.sleep(Long.parseLong(vibrateDuration)); Thread.sleep(Long.parseLong(vibrateDuration));
@@ -989,9 +992,6 @@ public class Actions
Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5); Miscellaneous.logEvent("e", "VibrateSleep", Log.getStackTraceString(e), 5);
} }
} }
else
vibrator.vibrate(Long.parseLong(vibrateDuration));
}
else else
{ {
try try

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