add VelocityTracker::isAxisSupported

This commit is contained in:
侯歌 2024-05-08 21:34:34 +08:00
parent fb6d2005a7
commit 8288cbd2ba
2 changed files with 5 additions and 0 deletions

View File

@ -436,6 +436,10 @@ void VelocityTracker::clear(){
mTrackerState->clear();
}
bool VelocityTracker::isAxisSupported(int axis)const{
return VelocityTrackerImpl::isAxisSupported(axis);
}
void VelocityTracker::addMovement(const MotionEvent& event){
mTrackerState->addMovement(event);
}

View File

@ -109,6 +109,7 @@ public:
static VelocityTracker*obtain(int strategy);
void recycle();
void clear();
bool isAxisSupported(int axis)const;
void addMovement(const MotionEvent& event);
void computeCurrentVelocity(int units);
void computeCurrentVelocity(int units,float maxVelocity);