Merge "Voice input replaces selected text." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
b72a335a7f
@@ -6668,10 +6668,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
if (mInputContentType != null) {
|
||||
mInputContentType.enterDown = false;
|
||||
}
|
||||
hideInsertionPointCursorController();
|
||||
if (mSelectionModifierCursorController != null) {
|
||||
mSelectionModifierCursorController.hide();
|
||||
}
|
||||
hideControllers();
|
||||
}
|
||||
|
||||
startStopMarquee(hasWindowFocus);
|
||||
@@ -6681,10 +6678,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
protected void onVisibilityChanged(View changedView, int visibility) {
|
||||
super.onVisibilityChanged(changedView, visibility);
|
||||
if (visibility != VISIBLE) {
|
||||
hideInsertionPointCursorController();
|
||||
if (mSelectionModifierCursorController != null) {
|
||||
mSelectionModifierCursorController.hide();
|
||||
}
|
||||
hideControllers();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7643,10 +7637,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
private void stopTextSelectionMode() {
|
||||
if (mIsInTextSelectionMode) {
|
||||
Selection.setSelection((Spannable) mText, getSelectionEnd());
|
||||
if (mSelectionModifierCursorController != null) {
|
||||
mSelectionModifierCursorController.hide();
|
||||
}
|
||||
|
||||
hideSelectionModifierCursorController();
|
||||
mIsInTextSelectionMode = false;
|
||||
}
|
||||
}
|
||||
@@ -8182,9 +8173,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
|
||||
}
|
||||
}
|
||||
|
||||
private void hideSelectionModifierCursorController() {
|
||||
if (mSelectionModifierCursorController != null) {
|
||||
mSelectionModifierCursorController.hide();
|
||||
}
|
||||
}
|
||||
|
||||
private void hideControllers() {
|
||||
hideInsertionPointCursorController();
|
||||
stopTextSelectionMode();
|
||||
hideSelectionModifierCursorController();
|
||||
}
|
||||
|
||||
private int getOffsetForHorizontal(int line, int x) {
|
||||
|
||||
Reference in New Issue
Block a user