默认的解锁时间很短,震动很微弱,所以要调整。
关键的地方是搜索 "vibrate(" 这样可以过滤掉很多选项。
解锁时有两次震动,在frameworks/base/core/java/com/android/internal/widget/SlidingTab.java
private static final long VIBRATE_SHORT = 100; //jeff. 30;
private static final long VIBRATE_LONG = 200; //jeff. 40;
按住图标不放时的震动位于packages/apps/Launcher2/src/com/android/launcher2/DragController.java
private static final int VIBRATE_DURATION = 200; //jeff. 35;
--------------------------------------------------------------------------------------------
<!-- Vibrator pattern for feedback about a long screen/key press -->
<integer-array name="config_longPressVibePattern">
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
</integer-array>
<!-- Vibrator pattern for feedback about touching a virtual key -->
<integer-array name="config_virtualKeyVibePattern">
<item>0</item>
<item>10</item>
<item>20</item>
<item>30</item>
</integer-array>
<!-- Vibrator pattern for feedback about booting with safe mode disabled -->
<integer-array name="config_safeModeDisabledVibePattern">
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
</integer-array>
<!-- Vibrator pattern for feedback about booting with safe mode disabled -->
<integer-array name="config_safeModeEnabledVibePattern">
<item>0</item>
<item>1</item>
<item>20</item>
<item>21</item>
<item>500</item>
<item>600</item>
</integer-array>
<!-- Vibrator pattern for feedback about hitting a scroll barrier -->
<integer-array name="config_scrollBarrierVibePattern">
<item>0</item>
<item>15</item>
<item>10</item>
<item>10</item>
</integer-array>
import android.os.Vibrator;
kernel: drivers/misc/vibrator.c
# vib for 35 msec
vib for 35 msec
vib for 30 msec
vib for 30 msec
vib for 30 msec
vib for 30 msec
vib for 40 msec
vibrate(
frameworks/base/core/java/com/android/internal/widget/SlidingTab.java
jeff@translogic-desktop:jeff-2.3.7_r1$ grep "vibrate(" packages/apps/Launcher2/ -r --include=*.java
packages/apps/Launcher2/src/com/android/launcher2/DragController.java: mVibrator.vibrate(VIBRATE_DURATION);
private static final int VIBRATE_DURATION = 200; //jeff. 35;