Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65a1de96 authored by Adam Powell's avatar Adam Powell
Browse files

Fix bug 3405899 - android.view.WindowManager$BadTokenException

Clear any pending runnables involved with TextViews when cursor
controllers are released

Change-Id: I96898fcc237f20d0b0f2351181244cb171fa2083
parent 71a22b3b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -7391,14 +7391,20 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener

        if (!mInsertionControllerEnabled) {
            hideInsertionPointCursorController();
            if (mInsertionPointCursorController != null) {
                mInsertionPointCursorController.onDetached();
                mInsertionPointCursorController = null;
            }
        }

        if (!mSelectionControllerEnabled) {
            stopSelectionActionMode();
            if (mSelectionModifierCursorController != null) {
                mSelectionModifierCursorController.onDetached();
                mSelectionModifierCursorController = null;
            }
        }
    }

    /**
     * @return True iff this TextView contains a text that can be edited, or if this is