Fix: Selection handles are wrongly shown.

Selection handles were always shown when selection action
mode is started at first time. When the action mode is
started without a selection, only insertion handle must be
shown.

Bug: 20264980
Bug: 20407551

Change-Id: I630804e007f795d28f87e3fa6cba0de5bf588c78
This commit is contained in:
Keisuke Kuroyanagi
2015-04-22 21:27:08 +09:00
parent 78f895a710
commit 28b5b14449

View File

@@ -3023,8 +3023,10 @@ public class Editor {
public SelectionActionModeCallback() {
SelectionModifierCursorController selectionController = getSelectionController();
if (selectionController.mStartHandle == null) {
// As these are for initializing selectionController, hide() must be called.
selectionController.initDrawables();
selectionController.initHandles();
selectionController.hide();
}
mSelectionHandleHeight = Math.max(
mSelectHandleLeft.getMinimumHeight(), mSelectHandleRight.getMinimumHeight());