Bugfix: IME gives haptic feedback when button wasn't pressed
bug: 3142416 Change-Id: If7630b89d6c2a8ec38e191c263c03f8f11d3c498
This commit is contained in:
parent
1f2113b27d
commit
9dce586eaa
1 changed files with 6 additions and 5 deletions
|
@ -272,11 +272,12 @@ public class PointerTracker {
|
|||
mIsRepeatableKey = false;
|
||||
checkMultiTap(eventTime, keyIndex);
|
||||
if (mListener != null) {
|
||||
int primaryCode = isValidKeyIndex(keyIndex) ? mKeys[keyIndex].codes[0] : 0;
|
||||
mListener.onPress(primaryCode);
|
||||
// This onPress call may have changed keyboard layout and have updated mKeyIndex.
|
||||
// If that's the case, mKeyIndex has been updated in setKeyboard().
|
||||
keyIndex = mKeyState.getKeyIndex();
|
||||
if (isValidKeyIndex(keyIndex)) {
|
||||
mListener.onPress(mKeys[keyIndex].codes[0]);
|
||||
// This onPress call may have changed keyboard layout and have updated mKeyIndex.
|
||||
// If that's the case, mKeyIndex has been updated in setKeyboard().
|
||||
keyIndex = mKeyState.getKeyIndex();
|
||||
}
|
||||
}
|
||||
if (isValidKeyIndex(keyIndex)) {
|
||||
if (mKeys[keyIndex].repeatable) {
|
||||
|
|
Loading…
Reference in a new issue