Lines Matching refs:when

65 // Maximum number of slots supported when using the slot-based Multitouch Protocol B.
176 nsecs_t when, int32_t deviceId, uint32_t source,
186 NotifyKeyArgs args(when, deviceId, source, policyFlags,
187 action, 0, keyCode, 0, context->getGlobalMetaState(), when);
193 nsecs_t when, int32_t deviceId, uint32_t source,
195 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
198 synthesizeButtonKey(context, action, when, deviceId, source, policyFlags,
341 addDeviceLocked(rawEvent->when, rawEvent->deviceId);
344 removeDeviceLocked(rawEvent->when, rawEvent->deviceId);
347 handleConfigurationChangedLocked(rawEvent->when);
359 void InputReader::addDeviceLocked(nsecs_t when, int32_t deviceId) {
371 device->configure(when, &mConfig, 0);
372 device->reset(when);
386 void InputReader::removeDeviceLocked(nsecs_t when, int32_t deviceId) {
406 device->reset(when);
487 void InputReader::timeoutExpiredLocked(nsecs_t when) {
491 device->timeoutExpired(when);
496 void InputReader::handleConfigurationChangedLocked(nsecs_t when) {
501 NotifyConfigurationChangedArgs args(when);
562 void InputReader::requestTimeoutAtTimeLocked(nsecs_t when) {
563 if (when < mNextTimeout) {
564 mNextTimeout = when;
817 void InputReader::ContextImpl::requestTimeoutAtTime(nsecs_t when) {
819 mReader->requestTimeoutAtTimeLocked(when);
914 void InputDevice::configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) {
945 mapper->configure(when, config, changes);
951 void InputDevice::reset(nsecs_t when) {
955 mapper->reset(when);
960 notifyReset(when);
972 ALOGD("Input event: device=%d type=0x%04x code=0x%04x value=0x%08x when=%lld",
974 rawEvent->when);
991 reset(rawEvent->when);
1001 void InputDevice::timeoutExpired(nsecs_t when) {
1005 mapper->timeoutExpired(when);
1103 void InputDevice::notifyReset(nsecs_t when) {
1104 NotifyDeviceResetArgs args(when, mId);
1573 // So when we reset the accumulator, we must assume they are all zeroes.
1577 // current slot index will not be the same as it was when the first event was
1755 void InputMapper::configure(nsecs_t when,
1759 void InputMapper::reset(nsecs_t when) {
1762 void InputMapper::timeoutExpired(nsecs_t when) {
1836 sync(rawEvent->when);
1852 void SwitchInputMapper::sync(nsecs_t when) {
1855 NotifySwitchArgs args(when, 0, updatedSwitchValues, mUpdatedSwitchMask);
1928 void VibratorInputMapper::timeoutExpired(nsecs_t when) {
1930 if (when >= mNextStepTime) {
2018 void KeyboardInputMapper::configure(nsecs_t when,
2020 InputMapper::configure(when, config, changes);
2066 void KeyboardInputMapper::reset(nsecs_t when) {
2074 InputMapper::reset(when);
2091 processKey(rawEvent->when, rawEvent->value != 0, keyCode, scanCode, flags);
2116 void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
2133 && mContext->shouldDropVirtualKey(when,
2144 mDownTime = when;
2192 NotifyKeyArgs args(when, getDeviceId(), mSource, policyFlags,
2314 void CursorInputMapper::configure(nsecs_t when,
2316 InputMapper::configure(when, config, changes);
2409 void CursorInputMapper::reset(nsecs_t when) {
2421 InputMapper::reset(when);
2430 sync(rawEvent->when);
2434 void CursorInputMapper::sync(nsecs_t when) {
2443 mDownTime = when;
2477 mWheelYVelocityControl.move(when, NULL, &vscroll);
2478 mWheelXVelocityControl.move(when, &hscroll, NULL);
2480 mPointerVelocityControl.move(when, &deltaX, &deltaY);
2522 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
2537 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
2546 NotifyMotionArgs hoverArgs(when, getDeviceId(), mSource, policyFlags,
2559 NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags,
2569 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
2748 void TouchInputMapper::configure(nsecs_t when,
2750 InputMapper::configure(when, config, changes);
2788 configureSurface(when, &resetNeeded);
2794 getDevice()->notifyReset(when);
2934 void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
3309 // given area relative to the diagonal size of the display when no acceleration
3331 abortPointerUsage(when, 0 /*policyFlags*/);
3685 void TouchInputMapper::reset(nsecs_t when) {
3722 InputMapper::reset(when);
3731 sync(rawEvent->when);
3735 void TouchInputMapper::sync(nsecs_t when) {
3748 syncTouch(when, &havePointerIds);
3800 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
3805 if (consumeRawTouches(when, policyFlags)) {
3851 dispatchPointerUsage(when, policyFlags, pointerUsage);
3864 dispatchHoverExit(when, policyFlags);
3865 dispatchTouches(when, policyFlags);
3866 dispatchHoverEnterAndMove(when, policyFlags);
3870 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
3887 void TouchInputMapper::timeoutExpired(nsecs_t when) {
3890 dispatchPointerGestures(when, 0 /*policyFlags*/, true /*isTimeout*/);
3895 bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) {
3906 dispatchVirtualKey(when, policyFlags,
3925 // This is useful when the user swipes through from the virtual key area
3933 dispatchVirtualKey(when, policyFlags,
3952 mCurrentVirtualKey.downTime = when;
3956 when, getDevice(), virtualKey->keyCode, virtualKey->scanCode);
3964 dispatchVirtualKey(when, policyFlags,
3976 // virtual key presses when interacting with the touch screen.
3985 // area and accidentally triggers a virtual key. This often happens when virtual keys
3989 mContext->disableVirtualKeysUntil(when + mConfig.virtualKeyQuietTime);
3994 void TouchInputMapper::dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
4002 NotifyKeyArgs args(when, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags,
4007 void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
4017 dispatchMotion(when, policyFlags, mSource,
4052 dispatchMotion(when, policyFlags, mSource,
4064 // events, they do not generally handle them except when presented in a move event.
4067 dispatchMotion(when, policyFlags, mSource,
4083 mDownTime = when;
4086 dispatchMotion(when, policyFlags, mSource,
4097 void TouchInputMapper::dispatchHoverExit(nsecs_t when, uint32_t policyFlags) {
4102 dispatchMotion(when, policyFlags, mSource,
4113 void TouchInputMapper::dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags) {
4118 dispatchMotion(when, policyFlags, mSource,
4128 dispatchMotion(when, policyFlags, mSource,
4390 void TouchInputMapper::dispatchPointerUsage(nsecs_t when, uint32_t policyFlags,
4393 abortPointerUsage(when, policyFlags);
4399 dispatchPointerGestures(when, policyFlags, false /*isTimeout*/);
4402 dispatchPointerStylus(when, policyFlags);
4405 dispatchPointerMouse(when, policyFlags);
4412 void TouchInputMapper::abortPointerUsage(nsecs_t when, uint32_t policyFlags) {
4415 abortPointerGestures(when, policyFlags);
4418 abortPointerStylus(when, policyFlags);
4421 abortPointerMouse(when, policyFlags);
4430 void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlags,
4434 bool sendEvents = preparePointerGestures(when,
4472 // Unfade the pointer when the current gesture manipulates the
4478 // Fade the pointer when the current gesture manipulates a different
4520 dispatchMotion(when, policyFlags, mSource,
4540 dispatchMotion(when, policyFlags, mSource,
4555 dispatchMotion(when, policyFlags, mSource,
4572 mPointerGesture.downTime = when;
4575 dispatchMotion(when, policyFlags, mSource,
4586 dispatchMotion(when, policyFlags, mSource,
4612 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
4638 void TouchInputMapper::abortPointerGestures(nsecs_t when, uint32_t policyFlags) {
4643 dispatchMotion(when, policyFlags, mSource,
4663 bool TouchInputMapper::preparePointerGestures(nsecs_t when,
4675 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4712 mPointerGesture.velocityTracker.addMovement(when,
4727 // This guarantees we always have an active touch id when there is at least one pointer.
4737 mPointerGesture.firstTouchTime = when;
4754 isQuietTime = when < mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval;
4760 // Enter quiet time when exiting swipe or freeform state.
4762 // pointer when finishing a swipe and there is still one pointer left onscreen.
4767 // Enter quiet time when releasing the button and there are still two or more
4773 mPointerGesture.quietTime = when;
4783 + mConfig.pointerGestureQuietInterval - when) * 0.000001f);
4812 // Reset state when just starting.
4853 mPointerVelocityControl.move(when, &deltaX, &deltaY);
4889 if (when <= mPointerGesture.tapDownTime + mConfig.pointerGestureTapInterval) {
4898 mPointerGesture.tapUpTime = when;
4899 getContext()->requestTimeoutAtTime(when
4934 (when - mPointerGesture.tapDownTime) * 0.000001f);
4961 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4977 (when - mPointerGesture.tapUpTime) * 0.000001f);
4995 mPointerVelocityControl.move(when, &deltaX, &deltaY);
5039 mPointerGesture.tapDownTime = when;
5048 // The ambiguous case is deciding what to do when there are two fingers down but they
5055 // When the two fingers move enough or when additional fingers are added, we make
5059 bool settled = when >= mPointerGesture.firstTouchTime
5071 + mConfig.pointerGestureMultitouchSettleInterval - when)
5090 + mConfig.pointerGestureMultitouchSettleInterval - when)
5145 // Only transition when at least two pointers have moved further than
5251 mPointerVelocityControl.move(when, &commonDeltaX, &commonDeltaY);
5426 void TouchInputMapper::dispatchPointerStylus(nsecs_t when, uint32_t policyFlags) {
5453 dispatchPointerSimple(when, policyFlags, down, hovering);
5456 void TouchInputMapper::abortPointerStylus(nsecs_t when, uint32_t policyFlags) {
5457 abortPointerSimple(when, policyFlags);
5460 void TouchInputMapper::dispatchPointerMouse(nsecs_t when, uint32_t policyFlags) {
5478 mPointerVelocityControl.move(when, &deltaX, &deltaY);
5506 dispatchPointerSimple(when, policyFlags, down, hovering);
5509 void TouchInputMapper::abortPointerMouse(nsecs_t when, uint32_t policyFlags) {
5510 abortPointerSimple(when, policyFlags);
5515 void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
5534 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5547 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5559 mPointerSimple.downTime = when;
5562 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5572 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5586 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5596 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5608 mWheelYVelocityControl.move(when, NULL, &vscroll);
5609 mWheelXVelocityControl.move(when, &hscroll, NULL);
5617 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5635 void TouchInputMapper::abortPointerSimple(nsecs_t when, uint32_t policyFlags) {
5639 dispatchPointerSimple(when, policyFlags, false, false);
5642 void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
5679 NotifyMotionArgs args(when, getDeviceId(), source, policyFlags,
5993 void SingleTouchInputMapper::reset(nsecs_t when) {
5996 TouchInputMapper::reset(when);
6005 void SingleTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
6063 void MultiTouchInputMapper::reset(nsecs_t when) {
6068 TouchInputMapper::reset(when);
6077 void MultiTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
6292 void JoystickInputMapper::configure(nsecs_t when,
6294 InputMapper::configure(when, config, changes);
6431 void JoystickInputMapper::reset(nsecs_t when) {
6439 InputMapper::reset(when);
6483 sync(rawEvent->when, false /*force*/);
6490 void JoystickInputMapper::sync(nsecs_t when, bool force) {
6517 // be fairly noisy even when not in use. On the other hand, pushing a gamepad
6522 NotifyMotionArgs args(when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags,