From 40c86618c1dab44ccb4fe1ae3e7eee88f4cfb998 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Wed, 30 Jun 2010 12:38:41 +0900 Subject: No capitalization for inputs from the symbols keyboard. bug: 2220892 Change-Id: I832e855e8882c0ccbc48505acce5b605761cd93a --- .../com/android/inputmethod/latin/LatinKeyboardView.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardView.java') diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java index bfa26f668..bce2cde25 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardView.java @@ -111,6 +111,19 @@ public class LatinKeyboardView extends LatinKeyboardBaseView { } } + @Override + protected CharSequence adjustCase(CharSequence label) { + Keyboard keyboard = getKeyboard(); + if (keyboard.isShifted() + && keyboard instanceof LatinKeyboard + && ((LatinKeyboard) keyboard).isAlphaKeyboard() + && label != null && label.length() < 3 + && Character.isLowerCase(label.charAt(0))) { + label = label.toString().toUpperCase(); + } + return label; + } + /** * This function checks to see if we need to handle any sudden jumps in the pointer location * that could be due to a multi-touch being treated as a move by the firmware or hardware. -- cgit v1.2.3-83-g751a