am e8264cab: Utilize Keyboard.getKey(codePoint)

* commit 'e8264cab71af545a6124fc6137837b7459145d25':
  Utilize Keyboard.getKey(codePoint)
main
Tadashi G. Takaoka 2013-08-12 20:37:53 -07:00 committed by Android Git Automerger
commit 1a8dfa8f1f
1 changed files with 8 additions and 9 deletions

View File

@ -204,17 +204,16 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> {
// view and only delegates to the parts of the code that care. So we don't include them here // view and only delegates to the parts of the code that care. So we don't include them here
// to keep these tests as pinpoint as possible and avoid bringing it too many dependencies, // to keep these tests as pinpoint as possible and avoid bringing it too many dependencies,
// but keep them in mind if something breaks. Commenting them out as is should work. // but keep them in mind if something breaks. Commenting them out as is should work.
//mLatinIME.onPressKey(codePoint); //mLatinIME.onPressKey(codePoint, 0 /* repeatCount */, true /* isSinglePointer */);
for (final Key key : mKeyboard.mKeys) { final Key key = mKeyboard.getKey(codePoint);
if (key.mCode == codePoint) { if (key != null) {
final int x = key.mX + key.mWidth / 2; final int x = key.mX + key.mWidth / 2;
final int y = key.mY + key.mHeight / 2; final int y = key.mY + key.mHeight / 2;
mLatinIME.onCodeInput(codePoint, x, y); mLatinIME.onCodeInput(codePoint, x, y);
return; return;
} }
}
mLatinIME.onCodeInput(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE); mLatinIME.onCodeInput(codePoint, Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
//mLatinIME.onReleaseKey(codePoint, false); //mLatinIME.onReleaseKey(codePoint, false /* withSliding */);
} }
protected void type(final String stringToType) { protected void type(final String stringToType) {