Add release haptic to nav bar buttons

Test: physical
Change-Id: I519a410e4570d88fed6432889c4e376f74044eae
Fixes: 62655913
This commit is contained in:
Jason Monk
2017-06-22 14:00:13 -04:00
parent ca35ed5cb9
commit db5b8f6a3a

View File

@@ -226,6 +226,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
case MotionEvent.ACTION_UP:
final boolean doIt = isPressed() && !mLongClicked;
setPressed(false);
// Always send a release ourselves because it doesn't seem to be sent elsewhere
// and it feels weird to sometimes get a release haptic and other times not.
performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY_RELEASE);
if (mCode != 0) {
if (doIt) {
sendEvent(KeyEvent.ACTION_UP, 0);