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

Commit 5c98206d authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka Committed by Android (Google) Code Review
Browse files

Merge "Use Keyboard.getKey"

parents 040aa28e adc80eef
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -167,14 +167,13 @@ public class WordComposer {
     * Internal method to retrieve reasonable proximity info for a character.
     */
    private void addKeyInfo(final int codePoint, final Keyboard keyboard) {
        for (final Key key : keyboard.mKeys) {
            if (key.mCode == codePoint) {
        final Key key = keyboard.getKey(codePoint);
        if (key != null) {
            final int x = key.mX + key.mWidth / 2;
            final int y = key.mY + key.mHeight / 2;
            add(codePoint, x, y);
            return;
        }
        }
        add(codePoint, WordComposer.NOT_A_COORDINATE, WordComposer.NOT_A_COORDINATE);
    }