Remove long press settings key function

Bug: 5759092
Change-Id: I328e2043075ce5d0d0285febc4a9b7356702c250
This commit is contained in:
Tadashi G. Takaoka 2011-12-14 15:20:52 +09:00
parent e35e13fc7d
commit 17dc10724b

View file

@ -409,20 +409,17 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke
invokeReleaseKey(primaryCode); invokeReleaseKey(primaryCode);
return true; return true;
} }
} if (primaryCode == Keyboard.CODE_SPACE) {
if (primaryCode == Keyboard.CODE_SETTINGS || primaryCode == Keyboard.CODE_SPACE) { // Long pressing the space key invokes IME switcher dialog.
// Both long pressing settings key and space key invoke IME switcher dialog.
if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) { if (invokeCustomRequest(LatinIME.CODE_SHOW_INPUT_METHOD_PICKER)) {
tracker.onLongPressed(); tracker.onLongPressed();
invokeReleaseKey(primaryCode); invokeReleaseKey(primaryCode);
return true; return true;
} else {
return openMoreKeysPanel(parentKey, tracker);
} }
} else {
return openMoreKeysPanel(parentKey, tracker);
} }
} }
return openMoreKeysPanel(parentKey, tracker);
}
private boolean invokeCustomRequest(int code) { private boolean invokeCustomRequest(int code) {
return getKeyboardActionListener().onCustomRequest(code); return getKeyboardActionListener().onCustomRequest(code);