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

Commit 5231f475 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 24628 into eclair

* changes:
  Fix an exception in Contacts when you select text backwards from the end.
parents 7875e28e 686782e2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1011,8 +1011,11 @@ public class TwelveKeyDialer extends Activity implements View.OnClickListener,
        int selectionEnd;

        // SpannableStringBuilder editable_text = new SpannableStringBuilder(mDigits.getText());
        selectionStart = mDigits.getSelectionStart();
        selectionEnd = mDigits.getSelectionEnd();
        int anchor = mDigits.getSelectionStart();
        int point = mDigits.getSelectionEnd();

        selectionStart = Math.min(anchor, point);
        selectionEnd = Math.max(anchor, point);

        Editable digits = mDigits.getText();
        if (selectionStart != -1 ) {