TP----Android4.0 Touch Screen 不可用

本文讨论了Android 4.0系统输入子系统更改导致touchscreen输入不可用的问题,通过修改驱动和IDC文件解决了触摸屏无法正常工作的问题。包括添加自定义TP配置文件和指定touch.deviceType=touchScreen。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Android4.0 Touch Screen 不可用

2013-02-26 09:14:44|  分类: Android |  标签:tp  |字号 订阅

由于Android4.0 的输入子系统的改变,导致touch screen的输入,上层无法使用。

这个时候必需修改驱动跟上层对应起来,驱动改好后,输入的事件上层发现了,但是很奇怪有一个圆点,后来研究和查资料才发现原来现在上层认到的Touch 设备不是Touch Screen, 原来是 Touch Pad, 以前2.3是没有这个问题的,找了很久,终于找到问题的根源:


现在touch screen 必需指定 touch.deviceType = touchScreen 要不然系统会认为是 touchPad 导致touch Screen 无法正常使用

而touch.deviceType的指定是放在系统的ystem/usr/idc/ 下面的.idc 文件,以注册的输入系统的名字作为文件名的( input->name = client->name;),跟以前的按键映射表差不多

现修改如下: device/samsung/smdk4x12/device.mk    添加自己TP的配置文件

PRODUCT_COPY_FILES += \                            //该指令个含义编译的时候是把:前的文件拷贝到后面的目录中
device/common/gps/gps.conf_US:system/etc/gps.conf \
device/honmax/PAD1103/init.rc:root/init.freescale.rc \
device/honmax/PAD1103/init.usb.rc:root/init.freescale.usb.rc \
device/honmax/PAD1103/vold.fstab:system/etc/vold.fstab \
device/honmax/PAD1103/gpsreset.sh:system/etc/gpsreset.sh \
device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/eGalax_Touch_Screen.idc \
device/honmax/PAD1103/eGalax_Touch_Screen.idc:system/usr/idc/HannStar_P1003_Touchscreen.idc
device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/Honmax_Touch_Screen.idc \
device/honmax/product/Honmax_Touch_Screen.idc:system/usr/idc/ilitek_Touch_Screen.idc \

   

pixcir_ts.idc配置文件参考

# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

#
# Input Device Calibration File for the touch screen.
#

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

# Size
# Based on empirical measurements, we estimate the size of the contact
# using size = sqrt(area) * 43 + 0.
touch.size.calibration = area
touch.size.scale = 43
touch.size.bias = 0
touch.size.isSummed = 0

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

# Orientation
touch.orientation.calibration = none


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值