am a202d86d: am dcfbb618: Merge "Catch BadTokenException and continue in clearInsetofPreviousIme." into mnc-dev
* commit 'a202d86d123103089d2cd4f7b6a60ed832acf079': Catch BadTokenException and continue in clearInsetofPreviousIme.
This commit is contained in:
@@ -1565,11 +1565,17 @@ public class InputMethodService extends AbstractInputMethodService {
|
||||
if (DEBUG) Log.v(TAG, "clearInsetOfPreviousIme() "
|
||||
+ " mShouldClearInsetOfPreviousIme=" + mShouldClearInsetOfPreviousIme);
|
||||
if (!mShouldClearInsetOfPreviousIme || mWindow == null) return;
|
||||
// We do not call onWindowShown() and onWindowHidden() so as not to make the IME author
|
||||
// confused.
|
||||
// TODO: Find out a better way which has less side-effect.
|
||||
mWindow.show();
|
||||
mWindow.hide();
|
||||
try {
|
||||
// We do not call onWindowShown() and onWindowHidden() so as not to make the IME author
|
||||
// confused.
|
||||
// TODO: Find out a better way which has less side-effect.
|
||||
mWindow.show();
|
||||
mWindow.hide();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
if (DEBUG) Log.v(TAG, "clearInsetOfPreviousIme: BadTokenException: IME is done.");
|
||||
mWindowVisible = false;
|
||||
mWindowAdded = false;
|
||||
}
|
||||
mShouldClearInsetOfPreviousIme = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user