环境:android7.1.2、sc60核心板

修改文件路径为

frameworks/native/services/inputflinger/InputReader.cpp

修改内容如下:

diff --git a/frameworks/native/services/inputflinger/InputReader.cp
old mode 100644
new mode 100755
index b9be675..94df6a3
--- a/frameworks/native/services/inputflinger/InputReader.cpp
+++ b/frameworks/native/services/inputflinger/InputReader.cpp
@@ -1285,7 +1285,8 @@ uint32_t CursorButtonAccumulator::getButtonSt
         result |= AMOTION_EVENT_BUTTON_PRIMARY;
     }
     if (mBtnRight) {
-        result |= AMOTION_EVENT_BUTTON_SECONDARY;
+        //result |= AMOTION_EVENT_BUTTON_SECONDARY;
+          result |= AMOTION_EVENT_BUTTON_BACK;
     }
     if (mBtnMiddle) {
         result |= AMOTION_EVENT_BUTTON_TERTIARY;

直接将result |= AMOTION_EVENT_BUTTON_SECONDARY; 修改成 result |= AMOTION_EVENT_BUTTON_BACK;

 每天进步一点点,点关注不迷路。

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐