何为idc

  idc(Input Device Configuration)为输入设备配置文件,它包含设备具体的配置属性,这些属性影响输入设备的行为。

  对于touch screen设备,总是需要一个idc文件来定义其行为。

  Android根据输入设备驱动汇报的事件类型和属性来检测和配置大部分输入设备的能力。然而有些分类是模棱两可的,如:多点触摸屏(multi-touch touch screen)和touch pad都支持EV_ABS事件类型和ABS_MT_POSITION_X和ABS_MT_POSTION_Y事件,然而这两类设备的使用是不同的,且不总是能自动判断。

  所以,需要另外的信息来指示设备上报的pressrue和size信息的真正含义。

  因此,触摸设备,特别是内嵌的touch screen,经常需要idc文件。

idc例子

实验的触摸屏设备的idc文件位于:/system/usr/idc目录下,文件名为:Vendor_5697_Product_0008.idc,其内容如下:

 1 # Filename:Vendor_5697_Product_0008.idc   2 # My TouchScreen Device configuration file.   3 #   4    5 touch.deviceType = touchScreen   6 touch.orientationAware = 1   7    8 keyboard.layout = Vendor_5697_Product_0008   9 keyboard.orientationAware = 1  10   11 cursor.mode = navigation  12 cursor.orientationAware = 1 

  当然,在驱动程序中,驱动的name为:Vendor_5697_Product_0008,即input_dev结构的name成员值为:Vendor_5697_Product_0008

idc访问路径及文件名规则

  下列路径被依次访问:

  • /system/usr/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
  • /system/usr/idc/Vendor_XXXX_Product_XXXX.idc
  • /system/usr/idc/DEVICE_NAME.idc
  • /data/system/devices/idc/Vendor_XXXX_Product_XXXX_Version_XXXX.idc
  • /data/system/devices/idc/Vendor_XXXX_Product_XXXX.idc
  • /data/system/devices/idc/DEVICE_NAME.idc

参考

  http://source.android.com/tech/input/input-device-configuration-files.html

  http://source.android.com/tech/input/touch-devices.html

  http://blog.csdn.net/myarrow

更多相关文章

  1. Android(安卓)Developers:处理音频输出的硬件
  2. 图片显示上下有空白的解决办法
  3. Android(安卓)WebView显示HTML时右边有空白
  4. Android(安卓)数据存储---File内部存储
  5. Android之文件&XML
  6. 在Android(安卓)Studio 2.2上集成OpenCV For Android(安卓)SDK
  7. android手机QQ尾巴修改(QQ for Pad)
  8. Android(安卓)Retrofit 2.0(一)初次见面请多多关照
  9. [Android实例] android实现顶级圆角弹窗(个人)

随机推荐

  1. Android(安卓)Studio开发环境配置
  2. Qualcomm Android(安卓)display架构分析
  3. Notes on the implementation of encrypt
  4. Android(安卓)通过Intent调用系统功能和A
  5. Android(安卓)获取设备各种信息以及其它
  6. android 发送短信的两种方式
  7. 【Android】键盘的展开和收起
  8. Android(安卓)Service 的添加流程
  9. Android(安卓)中汉字转化为拼音
  10. android selector 的不能是空节点