Loading java/src/com/android/inputmethod/keyboard/ProximityInfo.java +3 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,9 @@ y |---+---+---+---+-v-+-|-+---+---+---+---+---| | thresholdBase and get for (int centerY = yStart; centerY <= yEnd; centerY += mCellHeight) { int index = baseIndexOfCurrentRow; for (int centerX = xStart; centerX <= xEnd; centerX += mCellWidth) { if (key.squaredDistanceToEdge(centerX, centerY) < thresholdSquared) { // TODO: Remove "index < neighborCountPerCell.length" below. if (index < neighborCountPerCell.length && key.squaredDistanceToEdge(centerX, centerY) < thresholdSquared) { neighborsFlatBuffer[index * keyCount + neighborCountPerCell[index]] = key; ++neighborCountPerCell[index]; } Loading Loading
java/src/com/android/inputmethod/keyboard/ProximityInfo.java +3 −1 Original line number Diff line number Diff line Loading @@ -342,7 +342,9 @@ y |---+---+---+---+-v-+-|-+---+---+---+---+---| | thresholdBase and get for (int centerY = yStart; centerY <= yEnd; centerY += mCellHeight) { int index = baseIndexOfCurrentRow; for (int centerX = xStart; centerX <= xEnd; centerX += mCellWidth) { if (key.squaredDistanceToEdge(centerX, centerY) < thresholdSquared) { // TODO: Remove "index < neighborCountPerCell.length" below. if (index < neighborCountPerCell.length && key.squaredDistanceToEdge(centerX, centerY) < thresholdSquared) { neighborsFlatBuffer[index * keyCount + neighborCountPerCell[index]] = key; ++neighborCountPerCell[index]; } Loading