summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2010-12-08 18:33:05 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-08 18:33:05 -0800
commit19f5a91e9203174d951d9a679e122eb15ec870a2 (patch)
treed8186bc7b5a6f7932910db6e8d53dc7eeca6daac /core
parent436786e759ed5f5eee34137ea6bfe57414bb9ff4 (diff)
parent52715a7c10eeb798692ffdb4bc8c4305cb0aa705 (diff)
downloadframeworks_base-19f5a91e9203174d951d9a679e122eb15ec870a2.zip
frameworks_base-19f5a91e9203174d951d9a679e122eb15ec870a2.tar.gz
frameworks_base-19f5a91e9203174d951d9a679e122eb15ec870a2.tar.bz2
Merge "Fix a regression in clearMetaKeyState."
Diffstat (limited to 'core')
-rw-r--r--core/java/android/text/method/MetaKeyKeyListener.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/core/java/android/text/method/MetaKeyKeyListener.java b/core/java/android/text/method/MetaKeyKeyListener.java
index 923a555..0a097f9 100644
--- a/core/java/android/text/method/MetaKeyKeyListener.java
+++ b/core/java/android/text/method/MetaKeyKeyListener.java
@@ -105,10 +105,6 @@ public abstract class MetaKeyKeyListener {
*/
public static final int META_SELECTING = KeyEvent.META_SELECTING;
- private static final int META_SHIFT_ON_AND_LOCKED = META_SHIFT_ON | META_CAP_LOCKED;
- private static final int META_ALT_ON_AND_LOCKED = META_ALT_ON | META_ALT_LOCKED;
- private static final int META_SYM_ON_AND_LOCKED = META_SYM_ON | META_SYM_LOCKED;
-
// These bits are privately used by the meta key key listener.
// They are deliberately assigned values outside of the representable range of an 'int'
// so as not to conflict with any meta key states publicly defined by KeyEvent.
@@ -565,13 +561,13 @@ public abstract class MetaKeyKeyListener {
* {@link #META_ALT_ON} or {@link #META_SYM_ON}.
*/
public long clearMetaKeyState(long state, int which) {
- if ((which & META_SHIFT_ON_AND_LOCKED) == META_SHIFT_ON_AND_LOCKED) {
+ if ((which & META_SHIFT_ON) != 0 && (state & META_CAP_LOCKED) != 0) {
state &= ~META_SHIFT_MASK;
}
- if ((which & META_ALT_ON_AND_LOCKED) == META_ALT_ON_AND_LOCKED) {
+ if ((which & META_ALT_ON) != 0 && (state & META_ALT_LOCKED) != 0) {
state &= ~META_ALT_MASK;
}
- if ((which & META_SYM_ON_AND_LOCKED) == META_SYM_ON_AND_LOCKED) {
+ if ((which & META_SYM_ON) != 0 && (state & META_SYM_LOCKED) != 0) {
state &= ~META_SYM_MASK;
}
return state;