aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2010-10-08 22:17:16 +0900
committerTadashi G. Takaoka <takaoka@google.com>2010-10-09 02:39:39 +0900
commit7e1f5a2d5a96c74691b3b09fa986efb7161e5a12 (patch)
treefb6b91af889c669dabda15c6061e02e851dd4d8c /java/src/com/android/inputmethod/latin/LatinIME.java
parentcb0046288d58648dbc2a3100e4e8aa483a62a353 (diff)
downloadlatinime-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/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 8eeae8600..7f84ed775 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -159,7 +159,7 @@ public class LatinIME extends InputMethodService
private AlertDialog mOptionsDialog;
private AlertDialog mVoiceWarningDialog;
- KeyboardSwitcher mKeyboardSwitcher;
+ /* package */ KeyboardSwitcher mKeyboardSwitcher;
private UserDictionary mUserDictionary;
private UserBigramDictionary mUserBigramDictionary;
@@ -168,7 +168,7 @@ public class LatinIME extends InputMethodService
private Hints mHints;
- Resources mResources;
+ private Resources mResources;
private String mInputLocale;
private String mSystemLocale;
@@ -307,7 +307,7 @@ public class LatinIME extends InputMethodService
}
}
- Handler mHandler = new Handler() {
+ /* package */ Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
@@ -339,7 +339,8 @@ public class LatinIME extends InputMethodService
}
};
- @Override public void onCreate() {
+ @Override
+ public void onCreate() {
LatinImeLogger.init(this);
super.onCreate();
//setStatusIcon(R.drawable.ime_qwerty);
@@ -396,7 +397,7 @@ public class LatinIME extends InputMethodService
* Loads a dictionary or multiple separated dictionary
* @return returns array of dictionary resource ids
*/
- static int[] getDictionary(Resources res) {
+ /* package */ static int[] getDictionary(Resources res) {
String packageName = LatinIME.class.getPackage().getName();
XmlResourceParser xrp = res.getXml(R.xml.dictionary);
ArrayList<Integer> dictionaries = new ArrayList<Integer>();
@@ -1013,9 +1014,6 @@ public class LatinIME extends InputMethodService
}
private void reloadKeyboards() {
- if (mKeyboardSwitcher == null) {
- mKeyboardSwitcher = new KeyboardSwitcher(this);
- }
mKeyboardSwitcher.setLanguageSwitcher(mLanguageSwitcher);
if (mKeyboardSwitcher.getInputView() != null
&& mKeyboardSwitcher.getKeyboardMode() != KeyboardSwitcher.MODE_NONE) {
@@ -2406,20 +2404,20 @@ public class LatinIME extends InputMethodService
mHandler.sendMessageDelayed(mHandler.obtainMessage(MSG_START_TUTORIAL), 500);
}
- void tutorialDone() {
+ /* package */ void tutorialDone() {
mTutorial = null;
}
- void promoteToUserDictionary(String word, int frequency) {
+ /* package */ void promoteToUserDictionary(String word, int frequency) {
if (mUserDictionary.isValidWord(word)) return;
mUserDictionary.addWord(word, frequency);
}
- WordComposer getCurrentWord() {
+ /* package */ WordComposer getCurrentWord() {
return mWord;
}
- boolean getPopupOn() {
+ /* package */ boolean getPopupOn() {
return mPopupOn;
}
@@ -2576,7 +2574,8 @@ public class LatinIME extends InputMethodService
return list;
}
- @Override protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
+ @Override
+ protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) {
super.dump(fd, fout, args);
final Printer p = new PrintWriterPrinter(fout);