am 8d1967b1: am 511218a5: Merge "Refine gesture point duration calcuation to be more localized" into jb-mr1-dev
* commit '8d1967b1b5beff39659b88cecb5dafa7bda2792e': Refine gesture point duration calcuation to be more localizedmain
commit
f5d891d99e
|
@ -464,8 +464,8 @@ float ProximityInfoState::calculateNormalizedSquaredDistance(
|
|||
}
|
||||
|
||||
int ProximityInfoState::getDuration(const int index) const {
|
||||
if (mInputSize > 0 && index > 0 && index < mInputSize - 1) {
|
||||
return mTimes[index + 1] - mTimes[index - 1];
|
||||
if (mInputSize > 0 && index >= 0 && index < mInputSize - 1) {
|
||||
return mTimes[index + 1] - mTimes[index];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue