From c665672acb7b907aefcc8b07452f5d06824a3469 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Wed, 17 Jun 2009 10:28:43 -0700 Subject: [PATCH] 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. --- src/com/android/launcher/GesturesPanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher/GesturesPanel.java b/src/com/android/launcher/GesturesPanel.java index ee39613..33dc102 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; } -- 2.11.0