From ec622ced359cfe646efc14b68e25539fa7a438d9 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Tue, 21 Jun 2011 18:03:18 +0900 Subject: Support Turkish keyboard (DO NOT MERGE) Basically this change is back port from Master I1ae2c4ff. Bug: 4435347 Change-Id: Ide1a46bbf5584d8783bb93bbe64328f514c6ab79 --- .../com/android/inputmethod/latin/LatinKeyboardBaseView.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java') diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index 008d37202..fece78689 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -50,6 +50,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; +import java.util.Locale; import java.util.WeakHashMap; /** @@ -705,10 +706,18 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx return mKeyDetector.isProximityCorrectionEnabled(); } + protected Locale getKeyboardLocale() { + if (mKeyboard instanceof LatinKeyboard) { + return ((LatinKeyboard)mKeyboard).getInputLocale(); + } else { + return getContext().getResources().getConfiguration().locale; + } + } + protected CharSequence adjustCase(CharSequence label) { if (mKeyboard.isShifted() && label != null && label.length() < 3 && Character.isLowerCase(label.charAt(0))) { - label = label.toString().toUpperCase(); + return label.toString().toUpperCase(getKeyboardLocale()); } return label; } -- cgit v1.2.3-83-g751a