Use Keyboard.getKey
Change-Id: I722b9e981389f660db928b7fd5ced1b82371fbf3
This commit is contained in:
parent
b0593636b1
commit
adc80eef15
1 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue