am 511218a5: Merge "Refine gesture point duration calcuation to be more localized" into jb-mr1-dev

* commit '511218a52baa678829ba71b21b8c6750dddf8b1e':
  Refine gesture point duration calcuation to be more localized
main
Tom Ouyang 2012-09-20 06:09:16 -07:00 committed by Android Git Automerger
commit 8d1967b1b5
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}