diff options
author | 2012-09-20 09:29:27 -0700 | |
---|---|---|
committer | 2012-09-20 09:29:27 -0700 | |
commit | f5d891d99e9fd367beb7fd0b347ba28397b45594 (patch) | |
tree | 1274fe1ff2ae29e03ba008b76c6427d062f84dde | |
parent | 9850c1f04ca8ffd8b817f3e76032863fbcc5fb21 (diff) | |
parent | 8d1967b1b5beff39659b88cecb5dafa7bda2792e (diff) | |
download | latinime-f5d891d99e9fd367beb7fd0b347ba28397b45594.tar.gz latinime-f5d891d99e9fd367beb7fd0b347ba28397b45594.tar.xz latinime-f5d891d99e9fd367beb7fd0b347ba28397b45594.zip |
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 localized
-rw-r--r-- | native/jni/src/proximity_info_state.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/native/jni/src/proximity_info_state.cpp b/native/jni/src/proximity_info_state.cpp index b9fce5fef..c5f2884c6 100644 --- a/native/jni/src/proximity_info_state.cpp +++ b/native/jni/src/proximity_info_state.cpp @@ -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; } |