android9/android10 鼠标右键返回(已验证)
android9/10修改鼠标右键功能
·
android10 鼠标右键返回
基于RK3399 官方SDK验证。
android9和android10的修改方法一致,和android11的修改位置不同。
具体修改如下:
frameworks/native/services/inputflinger/InputReader.cpp
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index 8a66fc735a..d5e69289da 100755
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -1377,7 +1377,7 @@ uint32_t CursorButtonAccumulator::getButtonState() const {
if (mBtnRight) {
char targetProduct[PROPERTY_VALUE_MAX] = {0};
property_get("ro.target.product", targetProduct, "");
- if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0) {
+ if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0 || strcmp(targetProduct,"tablet") == 0) {
result |= AMOTION_EVENT_BUTTON_BACK;
} else {
result |= AMOTION_EVENT_BUTTON_SECONDARY;
参考:
android11 鼠标右键返回
更多推荐
所有评论(0)