diff options
author | 2010-10-08 22:17:16 +0900 | |
---|---|---|
committer | 2010-10-09 02:39:39 +0900 | |
commit | 7e1f5a2d5a96c74691b3b09fa986efb7161e5a12 (patch) | |
tree | fb6b91af889c669dabda15c6061e02e851dd4d8c /java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | |
parent | cb0046288d58648dbc2a3100e4e8aa483a62a353 (diff) | |
download | latinime-7e1f5a2d5a96c74691b3b09fa986efb7161e5a12.tar.gz latinime-7e1f5a2d5a96c74691b3b09fa986efb7161e5a12.tar.xz latinime-7e1f5a2d5a96c74691b3b09fa986efb7161e5a12.zip |
Make sure to set symbol keyboard shifted
To avoid a corner case of bug#3070963, in toggleShift() method of
KeyboardSwitcher, the shifted symbol keyboard will be set if current
keyboard is symbol keyboard or is not shifted symbol keyboard.
This change also implements mini keyboard cache with WeakHashMap.
Bug: 3070963
Change-Id: I868fc072e2f21bddded1622b800a53b9a6a43e91
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index bcd1bb056..f96a3599d 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -47,10 +47,9 @@ import android.widget.PopupWindow; import android.widget.TextView; import java.util.ArrayList; -import java.util.HashMap; import java.util.LinkedList; import java.util.List; -import java.util.Map; +import java.util.WeakHashMap; /** * A view that renders a virtual {@link LatinKeyboard}. It handles rendering of keys and @@ -199,7 +198,7 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx private PopupWindow mMiniKeyboardPopup; private LatinKeyboardBaseView mMiniKeyboard; private View mMiniKeyboardParent; - private Map<Key,View> mMiniKeyboardCache; + private final WeakHashMap<Key, View> mMiniKeyboardCache = new WeakHashMap<Key, View>(); private int mMiniKeyboardOriginX; private int mMiniKeyboardOriginY; private long mMiniKeyboardPopupTime; @@ -489,7 +488,6 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx mPaint.setAlpha(255); mPadding = new Rect(0, 0, 0, 0); - mMiniKeyboardCache = new HashMap<Key,View>(); mKeyBackground.getPadding(mPadding); mSwipeThreshold = (int) (500 * res.getDisplayMetrics().density); |