RK3288 android6.0双屏异显时,USB触摸屏只映射到prmry

系统版本:RK3288 android 6.0

设备同时有两个lcd,主屏是lvds接口,带有触摸屏,触摸屏是usb接口,副屏是hdmi接口,没有触摸屏,正常情况下,两个lcd显示相同内容,触摸屏一切正常;测试过hdmi作为主屏,lvds作为副屏,此方法同样适用。
当打开双屏异显的app时,触摸屏就失效,触摸没反应,插上usb鼠标是正常的。
经过测试,在打开双屏异显app后,触摸主屏触摸屏,主屏没反应,副屏会响应触摸信号,但是要求是只能主屏响应触摸信号。

想要达到以上效果,修改如下:

diff --git a/frameworks/native/services/inputflinger/EventHub.cpp b/frameworks/native/services/inputflinger/EventHub.cpp
old mode 100644
new mode 100755
index e15401d..9cd17d2
--- a/frameworks/native/services/inputflinger/EventHub.cpp
+++ b/frameworks/native/services/inputflinger/EventHub.cpp
@@ -1285,7 +1285,7 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {

// Determine whether the device is external or internal.
if (isExternalDeviceLocked(device)) {
- device->classes |= INPUT_DEVICE_CLASS_EXTERNAL;
+// device->classes |= INPUT_DEVICE_CLASS_EXTERNAL;
}

if (device->classes & (INPUT_DEVICE_CLASS_JOYSTICK | INPUT_DEVICE_CLASS_DPAD)

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值