android4.2触摸屏驱动与4.0的差异

1、上报的消息不同:

在android4.0系统中只需要报告:

ABS_MT_POSITION_X

ABS_MT_POSITION_Y

ABS_MT_TOUCH_MAJOR

ABS_MT_WIDTH_MAJOR等主要消息;

但android4.2已经修改消息ABS_MT_TOUCH_MAJOR的表示的功能,所以讲ABS_MT_TOUCH_MAJOR修改为ABS_MT_PRESSURE消息

事件上报;

2、idc配置文件的不同:

在android4.0的配置文件如下:

   # Basic Parameters
   touch.deviceType = touchScreen
   touch.orientationAware = 1

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

   # Pressure
   # Driver reports signal strength as pressure.
   #
   # A normal thumb touch typically registers about 200 signal strength
   # units although we don't expect these values to be accurate.
   touch.pressure.calibration = amplitude
   touch.pressure.scale = 0.005

   # Orientation
   touch.orientation.calibration = none

在android4.2系统后,其idc配置文件如下:

   # Basic Parameters
   touch.deviceType = touchScreen
   touch.orientationAware = 1

   # Size
   #touch.size.calibration = diameter
   #touch.size.scale = 10
   #touch.size.bias = 0
   #touch.size.isSummed = 0
   touch.size.calibration = area
   touch.size.scale = 28
   touch.size.bias = 0
   touch.size.isSummed = 0

   # Pressure
   # Driver reports signal strength as pressure.
   #
   # A normal thumb touch typically registers about 200 signal strength
   # units although we don't expect these values to be accurate.
   #touch.pressure.calibration = amplitude
   #touch.pressure.scale = 0.005
   touch.pressure.calibration = amplitude
   touch.pressure.scale = 0.0125

   # Orientation
 touch.orientation.calibration = vector

其上为android4.0与android4.2对应触摸屏需要修改的部分。

建议:对于android系统出现新版本是可参考:http://source.android.com/devices/index.html


你可能感兴趣的:(android4.2触摸屏驱动与4.0的差异)