am 71cbadf3: am 097d5f10: Merge "Suggestions popup must be dismissed before device rotation." into mnc-dev

* commit '71cbadf3971c67a839d91c6685ba88c9b938b1ce':
  Suggestions popup must be dismissed before device rotation.
This commit is contained in:
Yohei Yukawa
2015-05-01 18:48:20 +00:00
committed by Android Git Automerger

View File

@@ -577,7 +577,12 @@ public class Editor {
}
private void hideCursorControllers() {
if (mSuggestionsPopupWindow != null && !mSuggestionsPopupWindow.isShowingUp()) {
// When mTextView is not ExtractEditText, we need to distinguish two kinds of focus-lost.
// One is the true focus lost where suggestions pop-up (if any) should be dismissed, and the
// other is an side effect of showing the suggestions pop-up itself. We use isShowingUp()
// to distinguish one from the other.
if (mSuggestionsPopupWindow != null && ((mTextView instanceof ExtractEditText) ||
!mSuggestionsPopupWindow.isShowingUp())) {
// Should be done before hide insertion point controller since it triggers a show of it
mSuggestionsPopupWindow.hide();
}