From 5a2d0630474d6df639e97ff48f5f48b220ca4ee9 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Mon, 20 Jun 2011 11:58:56 +0900 Subject: 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 --- .../android/inputmethod/compat/InputMethodServiceCompatWrapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java') diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java index 828aea41f..7d8c745c3 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatWrapper.java @@ -16,12 +16,12 @@ package com.android.inputmethod.compat; -import com.android.inputmethod.deprecated.LanguageSwitcherProxy; -import com.android.inputmethod.latin.SubtypeSwitcher; - import android.inputmethodservice.InputMethodService; import android.view.inputmethod.InputMethodSubtype; +import com.android.inputmethod.deprecated.LanguageSwitcherProxy; +import com.android.inputmethod.latin.SubtypeSwitcher; + public class InputMethodServiceCompatWrapper extends InputMethodService { // CAN_HANDLE_ON_CURRENT_INPUT_METHOD_SUBTYPE_CHANGED needs to be false if the API level is 10 // or previous. Note that InputMethodSubtype was added in the API level 11. -- cgit v1.2.3-83-g751a