Rk3288 双屏异显单触摸

系统版本:RK3288 android 5.1

设备同时有两个lcd,主屏是mipi接口,带有触摸屏,触摸屏是usb接口,副屏是hdmi接口,没有触摸屏,正常情况下,两个lcd显示相同内容,触摸屏一切正常;
当打开双屏异显的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)
原文地址:https://www.cnblogs.com/zxouxuewei/p/8359294.html