目的:
实现点击鼠标右键可以返回页面上一层的功能
怎么改:
文件路径:frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp
diff --git a/frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp b/frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp
index 168b0a70b4..01be1743f7 100755
--- a/frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp
+++ b/frameworks/native/services/inputflinger/reader/mapper/accumulator/CursorButtonAccumulator.cpp
@@ -110,7 +110,7 @@ uint32_t CursorButtonAccumulator::getButtonState() const {
if (strcmp(targetProduct, "box") == 0 || strcmp(targetProduct, "atv") == 0) {
result |= AMOTION_EVENT_BUTTON_BACK;
} else {
- result |= AMOTION_EVENT_BUTTON_SECONDARY;
+ result |= AMOTION_EVENT_BUTTON_BACK;
}
}
if (mBtnMiddle) {