屏幕解锁时的vibrator反馈时间

 默认的解锁时间很短,震动很微弱,所以要调整。
关键的地方是搜索 "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;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值