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
6 files changed
tree: b18a79d43ed577c7ad67f9a29df1f3c2e30aa006
  1. dictionaries/
  2. java/
  3. native/
  4. tests/
  5. tools/
  6. Android.mk
  7. CleanSpec.mk