summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/statusbar/policy
diff options
context:
space:
mode:
authorPatrick Dubroy <dubroy@google.com>2011-02-23 18:35:01 -0800
committerPatrick Dubroy <dubroy@google.com>2011-02-24 10:03:23 -0800
commitece945291e04ea8493895349ed95a2ab46b51c93 (patch)
tree9d5c498ec1530514bfa046f7b2c8097cc848c005 /packages/SystemUI/src/com/android/systemui/statusbar/policy
parent7b76c8d3fc25aedea6edfed9638b008faa2f6ae8 (diff)
downloadframeworks_base-ece945291e04ea8493895349ed95a2ab46b51c93.zip
frameworks_base-ece945291e04ea8493895349ed95a2ab46b51c93.tar.gz
frameworks_base-ece945291e04ea8493895349ed95a2ab46b51c93.tar.bz2
Fix 3272590: Long-press on home & menu should be same as click
Change-Id: I151571900f4bb63910ccfb77fc64c8be9676a224
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index e80e37d..8ab231b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -42,13 +42,12 @@ public class KeyButtonView extends ImageView {
IWindowManager mWindowManager;
long mDownTime;
- boolean mSending, mLongPressed;
+ boolean mSending;
int mCode;
int mRepeat;
Runnable mCheckLongPress = new Runnable() {
public void run() {
if (isPressed()) {
- mLongPressed = true;
mRepeat++;
sendEvent(KeyEvent.ACTION_DOWN,
KeyEvent.FLAG_FROM_SYSTEM
@@ -91,7 +90,6 @@ public class KeyButtonView extends ImageView {
mDownTime = SystemClock.uptimeMillis();
mRepeat = 0;
mSending = true;
- mLongPressed = false;
sendEvent(KeyEvent.ACTION_DOWN,
KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY, mDownTime);
setPressed(true);
@@ -107,7 +105,7 @@ public class KeyButtonView extends ImageView {
break;
case MotionEvent.ACTION_CANCEL:
setPressed(false);
- if (mSending && !mLongPressed) {
+ if (mSending) {
mSending = false;
sendEvent(KeyEvent.ACTION_UP,
KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY
@@ -117,7 +115,7 @@ public class KeyButtonView extends ImageView {
break;
case MotionEvent.ACTION_UP:
setPressed(false);
- if (mSending && !mLongPressed) {
+ if (mSending) {
mSending = false;
sendEvent(KeyEvent.ACTION_UP,
KeyEvent.FLAG_FROM_SYSTEM | KeyEvent.FLAG_VIRTUAL_HARD_KEY);