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

Commit e19a2184 authored by Kenny Root's avatar Kenny Root Committed by Android Git Automerger
Browse files

am 6613ffb3: am 16197a24: am 0db37997: Merge "Revert to previous text...

am 6613ffb3: am 16197a24: am 0db37997: Merge "Revert to previous text selection behavior" into froyo
parents 6cf720c4 6613ffb3
Loading
Loading
Loading
Loading
+31 −23
Original line number Diff line number Diff line
@@ -252,7 +252,6 @@ implements MovementMethod
              int offset = getOffset(x, y, widget);

              if (cap) {

                  buffer.setSpan(LAST_TAP_DOWN, offset, offset,
                                 Spannable.SPAN_POINT_POINT);

@@ -292,7 +291,7 @@ implements MovementMethod
                              (MetaKeyKeyListener.getMetaState(buffer,
                                MetaKeyKeyListener.META_SELECTING) != 0);

                if (cap & handled) {
                if (cap && handled) {
                    // Before selecting, make sure we've moved out of the "slop".
                    // handled will be true, if we're in select mode AND we're
                    // OUT of the slop
@@ -308,6 +307,10 @@ implements MovementMethod
                    int y = (int) event.getY();
                    int offset = getOffset(x, y, widget);

                    final OnePointFiveTapState[] tap = buffer.getSpans(0, buffer.length(),
                            OnePointFiveTapState.class);

                    if (tap.length > 0 && tap[0].active) {
                        // Get the last down touch position (the position at which the
                        // user started the selection)
                        int lastDownOffset = buffer.getSpanStart(LAST_TAP_DOWN);
@@ -330,6 +333,9 @@ implements MovementMethod
                            spanend = findWordStart(buffer, offset);
                        }
                        Selection.setSelection(buffer, spanstart, spanend);
                    } else {
                        Selection.extendSelection(buffer, offset);
                    }
                    return true;
                }
            } else if (event.getAction() == MotionEvent.ACTION_UP) {
@@ -393,6 +399,8 @@ implements MovementMethod
                        // If we selecting something with the onepointfivetap-and
                        // swipe gesture, stop it on finger up.
                        MetaKeyKeyListener.stopSelecting(widget, buffer);
                    } else {
                        Selection.extendSelection(buffer, off);
                    }
                } else if (doubletap) {
                    Selection.setSelection(buffer,