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

Commit c811cd91 authored by Grace Kloba's avatar Grace Kloba Committed by Android Git Automerger
Browse files

am caf0ce3c: Delay resetting mPreventDrag flags so that the Plugin will have...

am caf0ce3c: Delay resetting mPreventDrag flags so that the Plugin will have more time to respond whether it wants to handle the touch events. (not have to return the value from WebViewCore before the first tap is up)

Merge commit 'caf0ce3c' into eclair-mr2-plus-aosp

* commit 'caf0ce3c':
  Delay resetting mPreventDrag flags so that the Plugin
parents cf0957ce caf0ce3c
Loading
Loading
Loading
Loading
+17 −8
Original line number Original line Diff line number Diff line
@@ -4443,14 +4443,11 @@ public class WebView extends AbsoluteLayout
                                break;
                                break;
                            }
                            }
                        } else {
                        } else {
                            if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
                            // mPreventDrag can be PREVENT_DRAG_MAYBE_YES in
                                // if mPreventDrag is not confirmed, treat it as
                            // TOUCH_INIT_MODE. To give WebCoreThread a little
                                // no so that it won't block tap or double tap.
                            // more time to send PREVENT_TOUCH_ID, we check
                                mPreventDrag = PREVENT_DRAG_NO;
                            // again in responding RELEASE_SINGLE_TAP.
                                mPreventLongPress = false;
                            if (mPreventDrag != PREVENT_DRAG_YES) {
                                mPreventDoubleTap = false;
                            }
                            if (mPreventDrag == PREVENT_DRAG_NO) {
                                if (mTouchMode == TOUCH_INIT_MODE) {
                                if (mTouchMode == TOUCH_INIT_MODE) {
                                    mPrivateHandler.sendMessageDelayed(
                                    mPrivateHandler.sendMessageDelayed(
                                            mPrivateHandler.obtainMessage(
                                            mPrivateHandler.obtainMessage(
@@ -5444,6 +5441,13 @@ public class WebView extends AbsoluteLayout
                    break;
                    break;
                }
                }
                case RELEASE_SINGLE_TAP: {
                case RELEASE_SINGLE_TAP: {
                    if (mPreventDrag == PREVENT_DRAG_MAYBE_YES) {
                        // if mPreventDrag is not confirmed, treat it as
                        // no so that it won't block tap.
                        mPreventDrag = PREVENT_DRAG_NO;
                        mPreventLongPress = false;
                        mPreventDoubleTap = false;
                    }
                    if (mPreventDrag == PREVENT_DRAG_NO) {
                    if (mPreventDrag == PREVENT_DRAG_NO) {
                        mTouchMode = TOUCH_DONE_MODE;
                        mTouchMode = TOUCH_DONE_MODE;
                        doShortPress();
                        doShortPress();
@@ -5807,6 +5811,11 @@ public class WebView extends AbsoluteLayout
                        mFullScreenHolder.setCancelable(false);
                        mFullScreenHolder.setCancelable(false);
                        mFullScreenHolder.setCanceledOnTouchOutside(false);
                        mFullScreenHolder.setCanceledOnTouchOutside(false);
                        mFullScreenHolder.show();
                        mFullScreenHolder.show();
                    } else if (mFullScreenHolder == null) {
                        // this may happen if user dismisses the fullscreen and
                        // then the WebCore re-position message finally reached
                        // the UI thread.
                        break;
                    }
                    }
                    // move the matching embedded view fully into the view so
                    // move the matching embedded view fully into the view so
                    // that touch will be valid instead of rejected due to out
                    // that touch will be valid instead of rejected due to out