Merge "Make getFallbackAction return false when there is none." into honeycomb

This commit is contained in:
Jeff Brown 2011-01-14 17:59:56 -08:00 committed by Android (Google) Code Review
commit d2690932bd

View File

@ -185,9 +185,11 @@ bool KeyCharacterMap::getFallbackAction(int32_t keyCode, int32_t metaState,
const Key* key;
const Behavior* behavior;
if (getKeyBehavior(keyCode, metaState, &key, &behavior)) {
outFallbackAction->keyCode = behavior->fallbackKeyCode;
outFallbackAction->metaState = metaState & ~behavior->metaState;
result = true;
if (behavior->fallbackKeyCode) {
outFallbackAction->keyCode = behavior->fallbackKeyCode;
outFallbackAction->metaState = metaState & ~behavior->metaState;
result = true;
}
}
#if DEBUG_MAPPING
LOGD("getFallbackKeyCode: keyCode=%d, metaState=0x%08x ~ Result %s, "