cancel vibration with 0

This commit is contained in:
Chloe committed 2025-09-20 17:37:55 -07:00
1 parent 69b00fecf5
commit 2797e52683
1 file changed
+4
@@ -476,6 +476,10 @@ object GeodeUtils {
*/
@JvmStatic
fun vibrate(ms: Long) {
if (ms == 0L) {
getVibrator()?.cancel()
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
getVibrator()?.vibrate(VibrationEffect.createOneShot(ms, VibrationEffect.DEFAULT_AMPLITUDE))
} else {