Fix a critical underflow in the touch calibration. This is a cherry-pick of Iacc746e1cc97bf3
Bug: 5629373 Change-Id: Ia198fe5e82b9e7fb801d9bae65cf9c6bbbd1befa
This commit is contained in:
parent
1c0f94c591
commit
4c1dfc62c8
1 changed files with 3 additions and 0 deletions
|
@ -711,6 +711,9 @@ int Correction::RankingAlgorithm::calculateFinalFreq(const int inputIndex, const
|
||||||
// \ .
|
// \ .
|
||||||
// C \ .
|
// C \ .
|
||||||
// 0 R1 R2
|
// 0 R1 R2
|
||||||
|
if (factor <= 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
multiplyRate((int)(factor * 100), &finalFreq);
|
multiplyRate((int)(factor * 100), &finalFreq);
|
||||||
} else if (squaredDistance == PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO) {
|
} else if (squaredDistance == PROXIMITY_CHAR_WITHOUT_DISTANCE_INFO) {
|
||||||
multiplyRate(WORDS_WITH_PROXIMITY_CHARACTER_DEMOTION_RATE, &finalFreq);
|
multiplyRate(WORDS_WITH_PROXIMITY_CHARACTER_DEMOTION_RATE, &finalFreq);
|
||||||
|
|
Loading…
Reference in a new issue