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

Commit 67094f5b authored by satok's avatar satok
Browse files

Do not re-calculate primary code in WordComposer

Bug: 4343280
Test: Ib43c0f1d1a19d067ea0

Change-Id: I3393a6099cb7fb824994f4656ccfef884f9c6bc4
parent 1551119e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -139,9 +139,8 @@ public class WordComposer {
            keyX = x;
            keyY = y;
        } else {
            final Key key = keyDetector.detectHitKey(x, y);
            // TODO: Pass an integer instead of an integer array
            codes = new int[] { key != null ? key.mCode : NOT_A_CODE };
            codes = new int[] { primaryCode };
            keyX = keyDetector.getTouchX(x);
            keyY = keyDetector.getTouchY(y);
        }
@@ -158,7 +157,8 @@ public class WordComposer {
        mTypedWord.appendCodePoint(primaryCode);
        refreshSize();
        if (newIndex < BinaryDictionary.MAX_WORD_LENGTH) {
            mPrimaryKeyCodes[newIndex] = codes[0];
            mPrimaryKeyCodes[newIndex] = primaryCode >= Keyboard.CODE_SPACE
                    ? Character.toLowerCase(primaryCode) : primaryCode;
            mXCoordinates[newIndex] = keyX;
            mYCoordinates[newIndex] = keyY;
        }