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

Commit cc77c6bd authored by Romain Guy's avatar Romain Guy Committed by The Android Open Source Project
Browse files

am ff686ce1: Change when gestures listeners are fired.

Merge commit 'ff686ce1'

* commit 'ff686ce1':
  Change when gestures listeners are fired.
  Manual merge from cupcake_dcm. internal CL#148693. Two donottranslate.xml-s are already submitted.
parents 94ded495 ff686ce1
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -434,13 +434,6 @@ public class GestureOverlayView extends FrameLayout {
    private void touchStart(MotionEvent event) {
        mIsListeningForGestures = true;

        // pass the event to handlers
        final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
        final int count = listeners.size();
        for (int i = 0; i < count; i++) {
            listeners.get(i).onGestureStarted(this, event);
        }

        float x = event.getX();
        float y = event.getY();

@@ -480,6 +473,13 @@ public class GestureOverlayView extends FrameLayout {

        mCurveEndX = x;
        mCurveEndY = y;

        // pass the event to handlers
        final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
        final int count = listeners.size();
        for (int i = 0; i < count; i++) {
            listeners.get(i).onGestureStarted(this, event);
        }        
    }

    private Rect touchMove(MotionEvent event) {
@@ -521,13 +521,6 @@ public class GestureOverlayView extends FrameLayout {

        mStrokeBuffer.add(new GesturePoint(x, y, event.getEventTime()));

        // pass the event to handlers
        final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
        final int count = listeners.size();
        for (int i = 0; i < count; i++) {
            listeners.get(i).onGesture(this, event);
        }

        if (mHandleGestureActions && !mIsGesturing) {
            mTotalLength += (float) Math.sqrt(dx * dx + dy * dy);

@@ -549,6 +542,13 @@ public class GestureOverlayView extends FrameLayout {
            }
        }

        // pass the event to handlers
        final ArrayList<OnGestureListener> listeners = mOnGestureListeners;
        final int count = listeners.size();
        for (int i = 0; i < count; i++) {
            listeners.get(i).onGesture(this, event);
        }        

        return areaToRefresh;
    }

@@ -557,6 +557,7 @@ public class GestureOverlayView extends FrameLayout {

        // add the stroke to the current gesture
        mCurrentGesture.addStroke(new GestureStroke(mStrokeBuffer));
        mStrokeBuffer.clear();

        if (!cancel) {
            // pass the event to handlers
@@ -581,7 +582,6 @@ public class GestureOverlayView extends FrameLayout {
        }

        mIsGesturing = false;
        mStrokeBuffer.clear();
    }

    private class FadeOutRunnable implements Runnable {
+3 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ public class WebSettings {
    private String          mSerifFontFamily = "serif";
    private String          mCursiveFontFamily = "cursive";
    private String          mFantasyFontFamily = "fantasy";
    private String          mDefaultTextEncoding = "Latin-1";
    private String          mDefaultTextEncoding;
    private String          mUserAgent;
    private boolean         mUseDefaultUserAgent;
    private String          mAcceptLanguage;
@@ -248,6 +248,8 @@ public class WebSettings {
    WebSettings(Context context) {   
        mEventHandler = new EventHandler();
        mContext = context;
        mDefaultTextEncoding = context.getString(com.android.internal.
                                                 R.string.default_text_encoding);

        if (sLockForLocaleSettings == null) {
            sLockForLocaleSettings = new Object();