From c7ebceb6675670080389472445d0bcb3c71f8bc9 Mon Sep 17 00:00:00 2001 From: simple <383559698@qq.com> Date: Thu, 25 Apr 2024 10:36:38 +0800 Subject: [PATCH] add VibrateUtils comment --- .../blankj/utilcode/pkg/feature/vibrate/VibrateActivity.kt | 1 + .../src/main/java/com/blankj/utilcode/util/VibrateUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/vibrate/VibrateActivity.kt b/feature/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/vibrate/VibrateActivity.kt index ee88dab0f..5dc337bc5 100644 --- a/feature/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/vibrate/VibrateActivity.kt +++ b/feature/utilcode/pkg/src/main/java/com/blankj/utilcode/pkg/feature/vibrate/VibrateActivity.kt @@ -41,6 +41,7 @@ class VibrateActivity : CommonActivity() { CommonItemClick(R.string.vibrate_background) { backHome() mContentView.postDelayed({ +// VibrateUtils.vibrate(1000) -- can not vibrate in background VibrateUtils.vibrateCompat(longArrayOf(0, 1000, 1000, 2000, 2000, 1000), 1) // VibrateUtils.vibrateCompat(1000) }, 1000) diff --git a/lib/utilcode/src/main/java/com/blankj/utilcode/util/VibrateUtils.java b/lib/utilcode/src/main/java/com/blankj/utilcode/util/VibrateUtils.java index 8d2ab055e..164810381 100644 --- a/lib/utilcode/src/main/java/com/blankj/utilcode/util/VibrateUtils.java +++ b/lib/utilcode/src/main/java/com/blankj/utilcode/util/VibrateUtils.java @@ -58,7 +58,7 @@ public static void vibrate(final long milliseconds, AudioAttributes attributes) } /** - * VibrateCompat + * VibrateCompat - Can vibrate in background *
Must hold {@code
Must hold {@code