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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/michaelcao1980/article/details/80336455

系统版本: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)

猜你喜欢

转载自blog.csdn.net/michaelcao1980/article/details/80336455