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() "
|
if (DEBUG) Log.v(TAG, "clearInsetOfPreviousIme() "
|
||||||
+ " mShouldClearInsetOfPreviousIme=" + mShouldClearInsetOfPreviousIme);
|
+ " mShouldClearInsetOfPreviousIme=" + mShouldClearInsetOfPreviousIme);
|
||||||
if (!mShouldClearInsetOfPreviousIme || mWindow == null) return;
|
if (!mShouldClearInsetOfPreviousIme || mWindow == null) return;
|
||||||
// We do not call onWindowShown() and onWindowHidden() so as not to make the IME author
|
try {
|
||||||
// confused.
|
// We do not call onWindowShown() and onWindowHidden() so as not to make the IME author
|
||||||
// TODO: Find out a better way which has less side-effect.
|
// confused.
|
||||||
mWindow.show();
|
// TODO: Find out a better way which has less side-effect.
|
||||||
mWindow.hide();
|
mWindow.show();
|
||||||
|
mWindow.hide();
|
||||||
|
} catch (WindowManager.BadTokenException e) {
|
||||||
|
if (DEBUG) Log.v(TAG, "clearInsetOfPreviousIme: BadTokenException: IME is done.");
|
||||||
|
mWindowVisible = false;
|
||||||
|
mWindowAdded = false;
|
||||||
|
}
|
||||||
mShouldClearInsetOfPreviousIme = false;
|
mShouldClearInsetOfPreviousIme = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user