Skip to content
Snippets Groups Projects
Commit 416ee19d authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Add haptic feedback for caps lock

When long press triggers caps lock, the keyboard also triggers haptic
feedback.

This change also fixes trivial harmless bug in KeyboardSwitcher.

Bug: 5424681
Change-Id: I62706b49abd7be1dcebc3c5166ea03f426fc8c86
parent ce9e4f92
No related branches found
No related tags found
No related merge requests found
......@@ -649,7 +649,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
}
public boolean isVibrateAndSoundFeedbackRequired() {
return mKeyboardView == null || !mKeyboardView.isInSlidingKeyInput();
return mKeyboardView != null && !mKeyboardView.isInSlidingKeyInput();
}
private int getPointerCount() {
......
......@@ -1259,6 +1259,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
break;
case Keyboard.CODE_CAPSLOCK:
switcher.toggleCapsLock();
vibrate();
break;
case Keyboard.CODE_SHORTCUT:
mSubtypeSwitcher.switchToShortcutIME();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment