aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2011-06-20 11:58:56 +0900
committerTadashi G. Takaoka <takaoka@google.com>2011-06-20 19:21:31 +0900
commit5a2d0630474d6df639e97ff48f5f48b220ca4ee9 (patch)
treeb18a79d43ed577c7ad67f9a29df1f3c2e30aa006 /java/src/com/android/inputmethod/latin
parente218baa6cc64ae51ecbf0848826253e5f43b9d56 (diff)
downloadlatinime-5a2d0630474d6df639e97ff48f5f48b220ca4ee9.tar.gz
latinime-5a2d0630474d6df639e97ff48f5f48b220ca4ee9.tar.xz
latinime-5a2d0630474d6df639e97ff48f5f48b220ca4ee9.zip
Remove unnecessary onRefreshKeyboard call.
When using the sliding spacebar language switch on ICS, both LatinIME.toggleLanguage() and InputMethodService.onCurrentInputMethodSubtypeChanged() invoke LatinIME.onRefreshKeyboard(). This change eliminates the first one if it isn't necessary. This change also cleans up the followings. * reuse theme Context when the keyboard theme hasn't been changed. * clear the Keyboard cache when theme has been switched. * eliminates unnecessary Context reference from LatinKeyboard and SlidingLocaleDrawable. * recycle Bitmap and reuse Canvas in KeyboardView. Bug: 4725930 Change-Id: I87366e9304879d94d12b7345adea768d86d43519
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 7446aff9e..fd4a47c39 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1871,7 +1871,8 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
}
// The following is necessary because on API levels < 10, we don't get notified when
// subtype changes.
- onRefreshKeyboard();
+ if (!CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED)
+ onRefreshKeyboard();
}
@Override