--- a/android/frameworks/native/services/inputflinger/InputReader.cpp
+++ b/android/frameworks/native/services/inputflinger/InputReader.cpp
@@ -58,7 +58,7 @@
#include <input/Keyboard.h>
#include <input/VirtualKeyMap.h>
#include <statslog.h>
-
+#include <cutils/properties.h>
#define INDENT " "
#define INDENT2 " "
#define INDENT3 " "
@@ -1348,9 +1348,19 @@ uint32_t CursorButtonAccumulator::getButtonState() const {
if (mBtnLeft) {
result |= AMOTION_EVENT_BUTTON_PRIMARY;
}
- if (mBtnRight) {
+ if (mBtnRight) { //Sam Jiang
#if defined(TARGET_PLATFORM_HOMLET) || defined(TARGET_PLATFORM_AUTO)
- result |= AMOTION_EVENT_BUTTON_BACK;
+ ALOGD("Will Switch Mouse Right Function");
+ if (property_get_bool("persist.sys.disable_btn_right", false))
+ {
+
Allwinner H313 实现APP 屏蔽鼠标右键功能
最新推荐文章于 2022-09-19 10:41:04 发布
本文详细介绍了如何在基于Allwinner H313平台的Android系统中,通过编程方式实现APP屏蔽鼠标右键点击的功能。通过修改源代码和添加特定的事件处理,可以确保用户在使用鼠标操作时,右键点击不再产生任何响应,从而提供定制化的用户体验。
摘要由CSDN通过智能技术生成