From 5545a7b0e1d18b9cff8b839ad4974de087646d5b Mon Sep 17 00:00:00 2001 From: wjt983049539 Date: Fri, 16 Jul 2021 11:34:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9findbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../github/tbouron/shakedetector/library/ShakeDetector.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/src/main/java/com/github/tbouron/shakedetector/library/ShakeDetector.java b/library/src/main/java/com/github/tbouron/shakedetector/library/ShakeDetector.java index cd2482d..288fdde 100644 --- a/library/src/main/java/com/github/tbouron/shakedetector/library/ShakeDetector.java +++ b/library/src/main/java/com/github/tbouron/shakedetector/library/ShakeDetector.java @@ -28,7 +28,7 @@ public class ShakeDetector implements ICategoryOrientationDataCallback { /** * 实际震动强度 */ - public static float mThresholdAcceleration; + public static float mThresholdAcceleration = 1200f ; /** * 2 */ @@ -40,7 +40,7 @@ public class ShakeDetector implements ICategoryOrientationDataCallback { /** * 默认震动触发次数 */ - public static int mThresholdShakeNumber; + public static int mThresholdShakeNumber = 3; private static CategoryOrientation orientationSensor; private static CategoryOrientationAgent categoryOrientationAgent = new CategoryOrientationAgent(); private static final long INTERVAL = 500L; @@ -101,8 +101,6 @@ public class ShakeDetector implements ICategoryOrientationDataCallback { mShakeListener = listener; mSensorBundles = new ArrayList(); mLock = new Object(); - mThresholdAcceleration = DEFAULT_THRESHOLD_ACCELERATION; - mThresholdShakeNumber = DEFAULT_THRESHOLD_SHAKE_NUMBER; } /** -- Gitee From 76693095aa90bc12bf40fd4756367933c599c07c Mon Sep 17 00:00:00 2001 From: wjt983049539 Date: Fri, 23 Jul 2021 10:10:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=95=8F=E6=84=9F?= =?UTF-8?q?=E5=AD=97=E7=9C=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/github/tbouron/shakedetector/example/LogUtils.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/entry/src/main/java/com/github/tbouron/shakedetector/example/LogUtils.java b/entry/src/main/java/com/github/tbouron/shakedetector/example/LogUtils.java index f30d8de..3875e54 100644 --- a/entry/src/main/java/com/github/tbouron/shakedetector/example/LogUtils.java +++ b/entry/src/main/java/com/github/tbouron/shakedetector/example/LogUtils.java @@ -105,10 +105,6 @@ public class LogUtils { * 持续时间 */ public static final String TAG = "wjtt"; - /** - * ACTIVITY_MOTION - */ - public static final String ACTIVITY_MOTION = "ohos.permission.ACTIVITY_MOTION"; /** * GYROSCOPE */ -- Gitee