Merge "Do not show selection action mode when the TextView is not shown." into mnc-dev

This commit is contained in:
Seigo Nonaka
2015-06-26 05:10:33 +00:00
committed by Android (Google) Code Review

View File

@@ -5231,7 +5231,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
// ExtractEditText does not call onFocus when it is displayed, and mHasSelectionOnFocus can
// not be set. Do the test here instead.
if (isInExtractedMode() && hasSelection() && mEditor != null
&& mEditor.mTextActionMode == null) {
&& mEditor.mTextActionMode == null && isShown() && hasWindowFocus()) {
mEditor.startSelectionActionMode();
}