diff options
| author | 2021-03-31 19:51:17 +0000 | |
|---|---|---|
| committer | 2021-03-31 19:51:17 +0000 | |
| commit | 5c4553b29f17cc69bcbf3311011f2abafab3a4da (patch) | |
| tree | bc87c3656fbfb573b6400624b3b65c353dc50fa4 | |
| parent | 87c3471588d3f3095c54ae22dc852c60c569d64b (diff) | |
| parent | d41d038515bfc6ea8e9772c4e2cf4d10cc689a72 (diff) | |
Merge "Don't send long-press event if KEYCODE_UNKNOWN" into sc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java index f0e4cce299ee..531ccb4eb1cb 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java @@ -127,8 +127,10 @@ public class KeyButtonView extends ImageView implements ButtonInterface { performLongClick(); mLongClicked = true; } else { - sendEvent(KeyEvent.ACTION_DOWN, KeyEvent.FLAG_LONG_PRESS); - sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); + if (mCode != KEYCODE_UNKNOWN) { + sendEvent(KeyEvent.ACTION_DOWN, KeyEvent.FLAG_LONG_PRESS); + sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_LONG_CLICKED); + } mLongClicked = true; } } |