// Passes the touch event to ScaleGestureDetector so that its internal // state won't go wrong, but instructs the listener to ignore the result // of processing, if any. void passTouchEventThrough(MotionEvent event) { mMultiTouchListener.setTemporarilyIgnoreDetectorEvents(true); try { mMultiTouchDetector.onTouchEvent(event); } catch (Exception e) { Log.e(TAG, "ScaleGestureDetector got into a bad state!", e); assert (false); } }
// Passes the touch event to ScaleGestureDetector so that its internal state // won't go wrong. ScaleGestureDetector needs two pointers in a MotionEvent // to recognize a zoom gesture. boolean processTouchEvent(MotionEvent event) { // TODO: Need to deal with multi-touch transition mMultiTouchListener.setTemporarilyIgnoreDetectorEvents(false); try { return mMultiTouchDetector.onTouchEvent(event); } catch (Exception e) { Log.e(TAG, "ScaleGestureDetector got into a bad state!", e); assert (false); } return false; }
void updateMultiTouchSupport() { mMultiTouchListener.setPermanentlyIgnoreDetectorEvents( !mContentViewCore.getContentSettings().supportsMultiTouchZoom()); }
boolean isMultiTouchZoomSupported() { return !mMultiTouchListener.getPermanentlyIgnoreDetectorEvents(); }