android usb触摸屏idc实现触摸唤醒

平台:rk3288

系统:6.0

idc(Input Device Configuration)为输入设备配置文件,协助源码一起来影响设备的输入行为。下面看一个具体的例子:

路径在system/usr/idc下面我的文件名为:Vendor_222a_Product_0001.idc,

device.internal = 0                                               /*触摸唤醒参数*/
touch.deviceType = touchScreen                       
touch.orientationAware = 1                                 

touch.size.calibration = diameter                          
touch.size.scale = 10
touch.size.bias = 0
touch.size.isSummed = 0

touch.pressure.calibration = amplitude
touch.pressure.scale = 0.005

touch.orientetion.calibration = none

重点说下第一个参数,为触摸唤醒参数,当设置为0时,系统休眠点击触摸屏可以唤醒,1则反之。如果是i2c接口触摸屏需要修改驱动。

有的可能在目录下面没有发现对应Vid pid设备,可手动添加

附加一句,有的时候调试完触摸屏之后会出现边缘触摸点有偏差问题,这个一般也是idc导致了,添加一个idc之后问题解决。

 

如果修改之后仍无法唤醒,可以尝试如下修改:

frameworks/native/services/inputflinger/InputReader.cpp

    // Initial downs on external touch devices should wake the device.
    // Normally we don't do this for internal touch screens to prevent them from waking
    // up in your pocket but you can enable it using the input device configuration.
--    mParameters.wake = getDevice()->isExternal();
++   mParameters.wake = true;
    getDevice()->getConfiguration().tryGetProperty(String8("touch.wake"),
            mParameters.wake);
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值