am ff686ce1: Change when gestures listeners are fired.
Merge commit 'ff686ce11e952a9001b1384d8e7d82127b0529a2' * commit 'ff686ce11e952a9001b1384d8e7d82127b0529a2': Change when gestures listeners are fired. Manual merge from cupcake_dcm. internal CL#148693. Two donottranslate.xml-s are already submitted.
This commit is contained in:
committed by
The Android Open Source Project
commit
cc77c6bd6f
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user