private DispatchEvent copyDispatchEventLocked(DispatchEvent d) { DispatchEvent copy = obtainUninitializedDispatchEventLocked(); if (d.mEvent != null) { copy.mEvent = d.mEvent.copy(); } copy.mEventType = d.mEventType; copy.mFlags = d.mFlags; copy.mTimeoutTime = d.mTimeoutTime; copy.mWebKitXOffset = d.mWebKitXOffset; copy.mWebKitYOffset = d.mWebKitYOffset; copy.mWebKitScale = d.mWebKitScale; copy.mNext = d.mNext; return copy; }
private DispatchEvent obtainDispatchEventLocked( MotionEvent event, int eventType, int flags, int webKitXOffset, int webKitYOffset, float webKitScale) { DispatchEvent d = obtainUninitializedDispatchEventLocked(); d.mEvent = event; d.mEventType = eventType; d.mFlags = flags; d.mTimeoutTime = SystemClock.uptimeMillis() + WEBKIT_TIMEOUT_MILLIS; d.mWebKitXOffset = webKitXOffset; d.mWebKitYOffset = webKitYOffset; d.mWebKitScale = webKitScale; if (DEBUG) { Log.d(TAG, "Timeout time: " + (d.mTimeoutTime - SystemClock.uptimeMillis())); } return d; }