Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 765407 - Don't setOnDoubleTapListener(null); fixes crash in Gestu…

…reDetector [r=kats, a=johnath]
  • Loading branch information...
commit 760e3756f6485b7863d4e1a500854730563aaec9 1 parent a7ba622
@mbrubeck mbrubeck authored
View
5 mobile/android/base/gfx/LayerController.java
@@ -356,11 +356,6 @@ public void setCheckerboardColor(int newColor) {
public void setAllowZoom(final boolean aValue) {
mAllowZoom = aValue;
- mView.post(new Runnable() {
- public void run() {
- mView.getTouchEventHandler().setDoubleTapEnabled(aValue);
- }
- });
}
public boolean getAllowZoom() {
View
9 mobile/android/base/gfx/TouchEventHandler.java
@@ -60,7 +60,6 @@
private final GestureDetector mGestureDetector;
private final SimpleScaleGestureDetector mScaleGestureDetector;
private final PanZoomController mPanZoomController;
- private final GestureDetector.OnDoubleTapListener mDoubleTapListener;
// the queue of events that we are holding on to while waiting for a preventDefault
// notification
@@ -135,8 +134,7 @@
mListenerTimeoutProcessor = new ListenerTimeoutProcessor();
mDispatchEvents = true;
- mDoubleTapListener = controller.getDoubleTapListener();
- setDoubleTapEnabled(true);
+ mGestureDetector.setOnDoubleTapListener(controller.getDoubleTapListener());
Tabs.registerOnTabsChangedListener(this);
}
@@ -217,11 +215,6 @@ public void handleEventListenerAction(boolean allowDefaultAction) {
}
/* This function MUST be called on the UI thread. */
- public void setDoubleTapEnabled(boolean aValue) {
- mGestureDetector.setOnDoubleTapListener(aValue ? mDoubleTapListener : null);
- }
-
- /* This function MUST be called on the UI thread. */
public void setWaitForTouchListeners(boolean aValue) {
mWaitForTouchListeners = aValue;
}
Please sign in to comment.
Something went wrong with that request. Please try again.