Merge "Add release haptic to nav bar buttons" into oc-dr1-dev am: 43a0236891

am: 02680636eb

Change-Id: I7957392182936abb5b5f394f3c23c70ec3451572
This commit is contained in:
Jason Monk
2017-06-26 17:55:05 +00:00
committed by android-build-merger

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);