From d4d1d6eca0ad195c1ab64c0f4dd38ae328b2b042 Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Mon, 18 Jan 2010 10:43:59 -0800 Subject: [PATCH] If ZoomButttonsController detects more than one pointer, give up the control. This should enable the View behind it, like WebView, will always get the multi-pointer events even when ZoomButtonsController is up. --- core/java/android/widget/ZoomButtonsController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/java/android/widget/ZoomButtonsController.java b/core/java/android/widget/ZoomButtonsController.java index e55fbb8c062e7..c683e71159d83 100644 --- a/core/java/android/widget/ZoomButtonsController.java +++ b/core/java/android/widget/ZoomButtonsController.java @@ -546,6 +546,11 @@ public class ZoomButtonsController implements View.OnTouchListener { public boolean onTouch(View v, MotionEvent event) { int action = event.getAction(); + if (event.getPointerCount() > 1) { + // ZoomButtonsController doesn't handle mutitouch. Give up control. + return false; + } + if (mReleaseTouchListenerOnUp) { // The controls were dismissed but we need to throw away all events until the up if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) {