diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-07-23 19:01:31 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-07-24 17:30:15 -0700 |
commit | ddca3ee3e86fbaa05c1528bd72afd955f0fb4ee6 (patch) | |
tree | 8ebc21b041c8abb73e648ff9edc31a665901ae15 /core/java/android/view/WindowManagerPolicy.java | |
parent | 8e4ac7140a038ca135c5981700efc75a0ad59765 (diff) | |
download | frameworks_base-ddca3ee3e86fbaa05c1528bd72afd955f0fb4ee6.zip frameworks_base-ddca3ee3e86fbaa05c1528bd72afd955f0fb4ee6.tar.gz frameworks_base-ddca3ee3e86fbaa05c1528bd72afd955f0fb4ee6.tar.bz2 |
Add support for power keys, improve behavior of virtual keys.
The platform now knows how to deal with a platform key, which at this
point is "just like end call, but don't end a call."
Also improve the handling of virtual keys, to allow for canceling when
sliding off into the display and providing haptic feedback.
Finally fixes a bug where the raw x and y in motion event were not
always set which caused the status bar to not work.
Diffstat (limited to 'core/java/android/view/WindowManagerPolicy.java')
-rw-r--r-- | core/java/android/view/WindowManagerPolicy.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 1371932..f4e9900 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -533,14 +533,15 @@ public interface WindowManagerPolicy { * @param win The window that currently has focus. This is where the key * event will normally go. * @param code Key code. - * @param metaKeys TODO + * @param metaKeys bit mask of meta keys that are held. * @param down Is this a key press (true) or release (false)? * @param repeatCount Number of times a key down has repeated. + * @param flags event's flags. * @return Returns true if the policy consumed the event and it should * not be further dispatched. */ public boolean interceptKeyTi(WindowState win, int code, - int metaKeys, boolean down, int repeatCount); + int metaKeys, boolean down, int repeatCount, int flags); /** * Called when layout of the windows is about to start. @@ -792,6 +793,13 @@ public interface WindowManagerPolicy { public boolean performHapticFeedbackLw(WindowState win, int effectId, boolean always); /** + * A special function that is called from the very low-level input queue + * to provide feedback to the user. Currently only called for virtual + * keys. + */ + public void keyFeedbackFromInput(KeyEvent event); + + /** * Called when we have stopped keeping the screen on because a window * requesting this is no longer visible. */ |