Merge "Add release haptic to nav bar buttons" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
43a0236891
@@ -226,6 +226,9 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
|
|||||||
case MotionEvent.ACTION_UP:
|
case MotionEvent.ACTION_UP:
|
||||||
final boolean doIt = isPressed() && !mLongClicked;
|
final boolean doIt = isPressed() && !mLongClicked;
|
||||||
setPressed(false);
|
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 (mCode != 0) {
|
||||||
if (doIt) {
|
if (doIt) {
|
||||||
sendEvent(KeyEvent.ACTION_UP, 0);
|
sendEvent(KeyEvent.ACTION_UP, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user