Loading include/input/InputVerifier.h +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ class InputVerifier { public: InputVerifier(const std::string& name); android::base::Result<void> processMovement(int32_t deviceId, int32_t action, android::base::Result<void> processMovement(int32_t deviceId, int32_t source, int32_t action, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags); Loading libs/graphicsenv/GraphicsEnv.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -63,8 +63,7 @@ typedef bool (*fpANGLEFreeSystemInfoHandle)(void* handle); namespace { static bool isVndkEnabled() { #ifdef __BIONIC__ // TODO(b/290159430) Use ro.vndk.version to check if VNDK is enabled instead static bool isVndkEnabled = !android::base::GetBoolProperty("ro.vndk.deprecate", false); static bool isVndkEnabled = android::base::GetProperty("ro.vndk.version", "") != ""; return isVndkEnabled; #endif return false; Loading libs/gui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ aconfig_declarations { cc_aconfig_library { name: "libguiflags", host_supported: true, vendor_available: true, aconfig_declarations: "libgui_flags", } Loading libs/input/Android.bp +22 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,28 @@ rust_bindgen { "--allowlist-var=AMOTION_EVENT_ACTION_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT", "--allowlist-var=MAX_POINTER_ID", "--allowlist-var=AINPUT_SOURCE_CLASS_NONE", "--allowlist-var=AINPUT_SOURCE_CLASS_BUTTON", "--allowlist-var=AINPUT_SOURCE_CLASS_POINTER", "--allowlist-var=AINPUT_SOURCE_CLASS_NAVIGATION", "--allowlist-var=AINPUT_SOURCE_CLASS_POSITION", "--allowlist-var=AINPUT_SOURCE_CLASS_JOYSTICK", "--allowlist-var=AINPUT_SOURCE_UNKNOWN", "--allowlist-var=AINPUT_SOURCE_KEYBOARD", "--allowlist-var=AINPUT_SOURCE_DPAD", "--allowlist-var=AINPUT_SOURCE_GAMEPAD", "--allowlist-var=AINPUT_SOURCE_TOUCHSCREEN", "--allowlist-var=AINPUT_SOURCE_MOUSE", "--allowlist-var=AINPUT_SOURCE_STYLUS", "--allowlist-var=AINPUT_SOURCE_BLUETOOTH_STYLUS", "--allowlist-var=AINPUT_SOURCE_TRACKBALL", "--allowlist-var=AINPUT_SOURCE_MOUSE_RELATIVE", "--allowlist-var=AINPUT_SOURCE_TOUCHPAD", "--allowlist-var=AINPUT_SOURCE_TOUCH_NAVIGATION", "--allowlist-var=AINPUT_SOURCE_JOYSTICK", "--allowlist-var=AINPUT_SOURCE_HDMI", "--allowlist-var=AINPUT_SOURCE_SENSOR", "--allowlist-var=AINPUT_SOURCE_ROTARY_ENCODER", ], static_libs: [ Loading libs/input/InputTransport.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -632,8 +632,8 @@ status_t InputPublisher::publishMotionEvent( MotionEvent::actionToString(action).c_str())); if (verifyEvents()) { Result<void> result = mInputVerifier.processMovement(deviceId, action, pointerCount, pointerProperties, pointerCoords, flags); mInputVerifier.processMovement(deviceId, source, action, pointerCount, pointerProperties, pointerCoords, flags); if (!result.ok()) { LOG(FATAL) << "Bad stream: " << result.error(); } Loading Loading @@ -1276,13 +1276,13 @@ void InputConsumer::resampleTouchState(nsecs_t sampleTime, MotionEvent* event, PointerCoords& resampledCoords = touchState.lastResample.pointers[i]; const PointerCoords& currentCoords = current->getPointerById(id); resampledCoords = currentCoords; resampledCoords.isResampled = true; if (other->idBits.hasBit(id) && shouldResampleTool(event->getToolType(i))) { const PointerCoords& otherCoords = other->getPointerById(id); resampledCoords.setAxisValue(AMOTION_EVENT_AXIS_X, lerp(currentCoords.getX(), otherCoords.getX(), alpha)); resampledCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, lerp(currentCoords.getY(), otherCoords.getY(), alpha)); resampledCoords.isResampled = true; ALOGD_IF(debugResampling(), "[%d] - out (%0.3f, %0.3f), cur (%0.3f, %0.3f), " "other (%0.3f, %0.3f), alpha %0.3f", Loading Loading
include/input/InputVerifier.h +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ class InputVerifier { public: InputVerifier(const std::string& name); android::base::Result<void> processMovement(int32_t deviceId, int32_t action, android::base::Result<void> processMovement(int32_t deviceId, int32_t source, int32_t action, uint32_t pointerCount, const PointerProperties* pointerProperties, const PointerCoords* pointerCoords, int32_t flags); Loading
libs/graphicsenv/GraphicsEnv.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -63,8 +63,7 @@ typedef bool (*fpANGLEFreeSystemInfoHandle)(void* handle); namespace { static bool isVndkEnabled() { #ifdef __BIONIC__ // TODO(b/290159430) Use ro.vndk.version to check if VNDK is enabled instead static bool isVndkEnabled = !android::base::GetBoolProperty("ro.vndk.deprecate", false); static bool isVndkEnabled = android::base::GetProperty("ro.vndk.version", "") != ""; return isVndkEnabled; #endif return false; Loading
libs/gui/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,7 @@ aconfig_declarations { cc_aconfig_library { name: "libguiflags", host_supported: true, vendor_available: true, aconfig_declarations: "libgui_flags", } Loading
libs/input/Android.bp +22 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,28 @@ rust_bindgen { "--allowlist-var=AMOTION_EVENT_ACTION_DOWN", "--allowlist-var=AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT", "--allowlist-var=MAX_POINTER_ID", "--allowlist-var=AINPUT_SOURCE_CLASS_NONE", "--allowlist-var=AINPUT_SOURCE_CLASS_BUTTON", "--allowlist-var=AINPUT_SOURCE_CLASS_POINTER", "--allowlist-var=AINPUT_SOURCE_CLASS_NAVIGATION", "--allowlist-var=AINPUT_SOURCE_CLASS_POSITION", "--allowlist-var=AINPUT_SOURCE_CLASS_JOYSTICK", "--allowlist-var=AINPUT_SOURCE_UNKNOWN", "--allowlist-var=AINPUT_SOURCE_KEYBOARD", "--allowlist-var=AINPUT_SOURCE_DPAD", "--allowlist-var=AINPUT_SOURCE_GAMEPAD", "--allowlist-var=AINPUT_SOURCE_TOUCHSCREEN", "--allowlist-var=AINPUT_SOURCE_MOUSE", "--allowlist-var=AINPUT_SOURCE_STYLUS", "--allowlist-var=AINPUT_SOURCE_BLUETOOTH_STYLUS", "--allowlist-var=AINPUT_SOURCE_TRACKBALL", "--allowlist-var=AINPUT_SOURCE_MOUSE_RELATIVE", "--allowlist-var=AINPUT_SOURCE_TOUCHPAD", "--allowlist-var=AINPUT_SOURCE_TOUCH_NAVIGATION", "--allowlist-var=AINPUT_SOURCE_JOYSTICK", "--allowlist-var=AINPUT_SOURCE_HDMI", "--allowlist-var=AINPUT_SOURCE_SENSOR", "--allowlist-var=AINPUT_SOURCE_ROTARY_ENCODER", ], static_libs: [ Loading
libs/input/InputTransport.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -632,8 +632,8 @@ status_t InputPublisher::publishMotionEvent( MotionEvent::actionToString(action).c_str())); if (verifyEvents()) { Result<void> result = mInputVerifier.processMovement(deviceId, action, pointerCount, pointerProperties, pointerCoords, flags); mInputVerifier.processMovement(deviceId, source, action, pointerCount, pointerProperties, pointerCoords, flags); if (!result.ok()) { LOG(FATAL) << "Bad stream: " << result.error(); } Loading Loading @@ -1276,13 +1276,13 @@ void InputConsumer::resampleTouchState(nsecs_t sampleTime, MotionEvent* event, PointerCoords& resampledCoords = touchState.lastResample.pointers[i]; const PointerCoords& currentCoords = current->getPointerById(id); resampledCoords = currentCoords; resampledCoords.isResampled = true; if (other->idBits.hasBit(id) && shouldResampleTool(event->getToolType(i))) { const PointerCoords& otherCoords = other->getPointerById(id); resampledCoords.setAxisValue(AMOTION_EVENT_AXIS_X, lerp(currentCoords.getX(), otherCoords.getX(), alpha)); resampledCoords.setAxisValue(AMOTION_EVENT_AXIS_Y, lerp(currentCoords.getY(), otherCoords.getY(), alpha)); resampledCoords.isResampled = true; ALOGD_IF(debugResampling(), "[%d] - out (%0.3f, %0.3f), cur (%0.3f, %0.3f), " "other (%0.3f, %0.3f), alpha %0.3f", Loading