测试平台
Platform: RK3288 RK3399
OS: Android10
问题说明:
RK3288、RK3399-Android10 Table方案默认是不支持遥控鼠标模式切换功能的(Box方案是支持的),这样就导致如果部分功能遥控光标无法移动到指定位置(比如部分输入法键盘无法通过遥控输入)
解决方法
代码路径:frameworks/native/services/inputflinger/EventHub.cpp
--- a/services/inputflinger/EventHub.cpp
+++ b/services/inputflinger/EventHub.cpp
@@ -1300,7 +1300,7 @@ status_t EventHub::openDeviceLocked(const char* devicePath) {
// for infrare simulate mouse.
char targetProduct[PROPERTY_VALUE_MAX] = "";
property_get("ro.target.product", targetProduct, "");
- if (strcmp(targetProduct, "box") == 0) {
+ if (strcmp(targetProduct, "tablet") == 0) {
device->classes |= INPUT_DEVICE_CLASS_KEYMOUSE;
}
}
代码路径:frameworks/native/services/inputflinger/InputReader.cpp
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -2403,17 +2403,13 @@ void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t scanCode,
property_set("sys.ID.mID",mID);
if (down) {
- if (keyCode == AKEYCODE_PROFILE_SWITCH) {
- char targetProduct[PROPERTY_VALUE_MAX] = "";
- property_get("ro.target.product", targetProduct, "");
- if (strcmp(targetProduct, "box") == 0) {
- if (strcmp(mKeyMouseState, "on")==0) {
- property_set("sys.KeyMouse.mKeyMouseState", "off");
- } else if (strcmp(mKeyMouseState,"off")==0) {
- property_set("sys.KeyMouse.mKeyMouseState","on");
- }
- }
- }
+ if (keyCode == AKEYCODE_PROFILE_SWITCH) {
+ if (strcmp(mKeyMouseState, "on")==0) {