Loading include/android/input.h +9 −0 Original line number Diff line number Diff line Loading @@ -772,8 +772,17 @@ enum { */ AMOTION_EVENT_AXIS_GENERIC_16 = 47, /** * Note: This is not an "Axis constant". It does not represent any axis, nor should it be used * to represent any axis. It is a constant holding the value of the largest defined axis value, * to make some computations (like iterating through all possible axes) cleaner. * Please update the value accordingly if you add a new axis. */ AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GENERIC_16, // NOTE: If you add a new axis here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. // Update AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE accordingly as well. }; /** Loading services/inputflinger/InputCommonConverter.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,8 @@ static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_13) == common static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_14) == common::Axis::GENERIC_14); static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_15) == common::Axis::GENERIC_15); static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16) == common::Axis::GENERIC_16); static_assert(static_cast<common::Axis>(AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) == static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16)); static common::VideoFrame getHalVideoFrame(const TouchVideoFrame& frame) { common::VideoFrame out; Loading services/inputflinger/reader/mapper/JoystickInputMapper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -146,12 +146,12 @@ std::list<NotifyArgs> JoystickInputMapper::configure(nsecs_t when, for (auto it = mAxes.begin(); it != mAxes.end(); /*increment it inside loop*/) { Axis& axis = it->second; if (axis.axisInfo.axis < 0) { while (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16 && while (nextGenericAxisId <= AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE && haveAxis(nextGenericAxisId)) { nextGenericAxisId += 1; } if (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16) { if (nextGenericAxisId <= AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) { axis.axisInfo.axis = nextGenericAxisId; nextGenericAxisId += 1; } else { Loading Loading
include/android/input.h +9 −0 Original line number Diff line number Diff line Loading @@ -772,8 +772,17 @@ enum { */ AMOTION_EVENT_AXIS_GENERIC_16 = 47, /** * Note: This is not an "Axis constant". It does not represent any axis, nor should it be used * to represent any axis. It is a constant holding the value of the largest defined axis value, * to make some computations (like iterating through all possible axes) cleaner. * Please update the value accordingly if you add a new axis. */ AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GENERIC_16, // NOTE: If you add a new axis here you must also add it to several other files. // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list. // Update AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE accordingly as well. }; /** Loading
services/inputflinger/InputCommonConverter.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -263,6 +263,8 @@ static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_13) == common static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_14) == common::Axis::GENERIC_14); static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_15) == common::Axis::GENERIC_15); static_assert(static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16) == common::Axis::GENERIC_16); static_assert(static_cast<common::Axis>(AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) == static_cast<common::Axis>(AMOTION_EVENT_AXIS_GENERIC_16)); static common::VideoFrame getHalVideoFrame(const TouchVideoFrame& frame) { common::VideoFrame out; Loading
services/inputflinger/reader/mapper/JoystickInputMapper.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -146,12 +146,12 @@ std::list<NotifyArgs> JoystickInputMapper::configure(nsecs_t when, for (auto it = mAxes.begin(); it != mAxes.end(); /*increment it inside loop*/) { Axis& axis = it->second; if (axis.axisInfo.axis < 0) { while (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16 && while (nextGenericAxisId <= AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE && haveAxis(nextGenericAxisId)) { nextGenericAxisId += 1; } if (nextGenericAxisId <= AMOTION_EVENT_AXIS_GENERIC_16) { if (nextGenericAxisId <= AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE) { axis.axisInfo.axis = nextGenericAxisId; nextGenericAxisId += 1; } else { Loading