diff options
| author | nadlabak <pavel@doshaska.net> | 2011-11-14 01:35:09 +0100 |
|---|---|---|
| committer | nadlabak <pavel@doshaska.net> | 2011-11-14 01:35:09 +0100 |
| commit | 323cd41c9e03aec9820dcc0070708caa944dc917 (patch) | |
| tree | 0e4a2b6f8fee04d60bfdd2792b2c63c85aefab34 | |
| parent | 5f668627cea3edf3eb0c1ade17919b3fec10783c (diff) | |
| download | android_packages_inputmethods_LatinIME-323cd41c9e03aec9820dcc0070708caa944dc917.tar.gz android_packages_inputmethods_LatinIME-323cd41c9e03aec9820dcc0070708caa944dc917.tar.bz2 android_packages_inputmethods_LatinIME-323cd41c9e03aec9820dcc0070708caa944dc917.zip | |
remove view from parent to prevent FC
Change-Id: I1ea8c249bcbd1326ed5f90c4ec32f5c70b276496
| -rw-r--r-- | java/src/com/android/inputmethod/latin/KeyboardSwitcher.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java index 0db204ed8..ee6458bd2 100644 --- a/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java +++ b/java/src/com/android/inputmethod/latin/KeyboardSwitcher.java @@ -21,6 +21,8 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.preference.PreferenceManager; import android.view.InflateException; +import android.view.ViewGroup; +import android.view.ViewParent; import java.lang.ref.SoftReference; import java.util.Arrays; @@ -549,6 +551,10 @@ public class KeyboardSwitcher implements SharedPreferences.OnSharedPreferenceCha mInputMethodService.mHandler.post(new Runnable() { public void run() { if (mInputView != null) { + ViewParent p = mInputView.getParent(); + if (p != null && p instanceof ViewGroup) { + ((ViewGroup)mInputView.getParent()).removeView(mInputView); + } mInputMethodService.setInputView(mInputView); } mInputMethodService.updateInputViewShown(); |
