summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2009-06-17 10:28:43 -0700
committerRomain Guy <romainguy@android.com>2009-06-17 10:28:43 -0700
commitc665672acb7b907aefcc8b07452f5d06824a3469 (patch)
tree584c2ed000dfcc18f325a909582b6d3f3e3cf43d /src/com/android/launcher
parentded9ec91f6623d2566e1b2439ab302b6451e1657 (diff)
downloadandroid_packages_apps_Trebuchet-c665672acb7b907aefcc8b07452f5d06824a3469.tar.gz
android_packages_apps_Trebuchet-c665672acb7b907aefcc8b07452f5d06824a3469.tar.bz2
android_packages_apps_Trebuchet-c665672acb7b907aefcc8b07452f5d06824a3469.zip
Fix handling of the back key on Home in the gestures panel.
Previously, pressing back in a dialog on top of the gestures panel would always dismiss the gestures panel. This is because the UP event for the BACK key is sent to the underlying window after dismissing a dialog. This fix simply checks for DOWN events only.
Diffstat (limited to 'src/com/android/launcher')
-rw-r--r--src/com/android/launcher/GesturesPanel.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher/GesturesPanel.java b/src/com/android/launcher/GesturesPanel.java
index ee3961349..33dc1028f 100644
--- a/src/com/android/launcher/GesturesPanel.java
+++ b/src/com/android/launcher/GesturesPanel.java
@@ -37,8 +37,11 @@ public class GesturesPanel extends RelativeLayout {
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
- if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+ if (event.getKeyCode() == KeyEvent.KEYCODE_BACK &&
+ event.getAction() == KeyEvent.ACTION_DOWN) {
+
((Launcher) mContext).hideGesturesPanel();
+
return true;
}