android4.0 is resolved differently from TP in version 2.3

  • 2020-06-03 08:20:04
  • OfStack

Generally speaking, when debugging TP on android2.3, you only need to tune the linux driver and android will work normally. However, es5EN 4.0 is a little different. For linux drivers, we need to add the following contents:

1. Call the following function to report Key Down when the finger is pressed:

input_report_key(struct input_dev *input, BTN_TOUCH, 1);

2. Call the following function to report Key Up when the finger is released:

input_report_key(struct input_dev *input, BTN_TOUCH, 0);

By this way, can be in android4. 0 see the mouse pointer (circle) can be moved on, the touch screen to make the mouse on the laptop computer touch screen, then check again, need to add 1 idc original documents, specific to identify priority reference: http: / / source android. com tech/input/input - device - configuration - files. html this document, will identify the configuration files in the following order:


For convenience, I directly created a "device name.idc" file and put it in /system/usr/idc/ directory. The corresponding contents are as follows:

# 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

Once configured, TP on android4.0 works without becoming a mouse touch screen.

Related articles: