Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a38e14fd authored by Satoshi Kataoka's avatar Satoshi Kataoka Committed by Android (Google) Code Review
Browse files

Merge "Refactor skippable code point" into jb-mr2-dev

parents 8067b769 cbb816d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ AK_FORCE_INLINE static int toBaseLowerCase(const int c) {
    return toLowerCase(toBaseCodePoint(c));
}

inline static bool isSkippableCodePoint(const int codePoint) {
inline static bool isIntentionalOmissionCodePoint(const int codePoint) {
    // TODO: Do not hardcode here
    return codePoint == KEYCODE_SINGLE_QUOTE || codePoint == KEYCODE_HYPHEN_MINUS;
}
+1 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ float ProximityInfoState::getPointToKeyLength(
        const int index = inputIndex * mProximityInfo->getKeyCount() + keyId;
        return min(mSampledDistanceCache_G[index], mMaxPointToKeyLength);
    }
    if (isSkippableCodePoint(codePoint)) {
    if (isIntentionalOmissionCodePoint(codePoint)) {
        return 0.0f;
    }
    // If the char is not a key on the keyboard then return the max length.