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: I62706b49abd7be1dcebc3c5166ea03f426fc8c86main
parent
ce9e4f926b
commit
416ee19d33
|
@ -649,7 +649,7 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVibrateAndSoundFeedbackRequired() {
|
public boolean isVibrateAndSoundFeedbackRequired() {
|
||||||
return mKeyboardView == null || !mKeyboardView.isInSlidingKeyInput();
|
return mKeyboardView != null && !mKeyboardView.isInSlidingKeyInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPointerCount() {
|
private int getPointerCount() {
|
||||||
|
|
|
@ -1259,6 +1259,7 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||||
break;
|
break;
|
||||||
case Keyboard.CODE_CAPSLOCK:
|
case Keyboard.CODE_CAPSLOCK:
|
||||||
switcher.toggleCapsLock();
|
switcher.toggleCapsLock();
|
||||||
|
vibrate();
|
||||||
break;
|
break;
|
||||||
case Keyboard.CODE_SHORTCUT:
|
case Keyboard.CODE_SHORTCUT:
|
||||||
mSubtypeSwitcher.switchToShortcutIME();
|
mSubtypeSwitcher.switchToShortcutIME();
|
||||||
|
|
Loading…
Reference in New Issue