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,
330 addDeviceLocked(rawEvent->when, rawEvent->deviceId);
333 removeDeviceLocked(rawEvent->when, rawEvent->deviceId);
336 handleConfigurationChangedLocked(rawEvent->when);
348 void InputReader::addDeviceLocked(nsecs_t when, int32_t deviceId) {
360 device->configure(when, &mConfig, 0);
361 device->reset(when);
375 void InputReader::removeDeviceLocked(nsecs_t when, int32_t deviceId) {
395 device->reset(when);
476 void InputReader::timeoutExpiredLocked(nsecs_t when) {
480 device->timeoutExpired(when);
485 void InputReader::handleConfigurationChangedLocked(nsecs_t when) {
490 NotifyConfigurationChangedArgs args(when);
551 void InputReader::requestTimeoutAtTimeLocked(nsecs_t when) {
552 if (when < mNextTimeout) {
553 mNextTimeout = when;
806 void InputReader::ContextImpl::requestTimeoutAtTime(nsecs_t when) {
808 mReader->requestTimeoutAtTimeLocked(when);
903 void InputDevice::configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) {
934 mapper->configure(when, config, changes);
940 void InputDevice::reset(nsecs_t when) {
944 mapper->reset(when);
949 notifyReset(when);
961 ALOGD("Input event: device=%d type=0x%04x code=0x%04x value=0x%08x when=%lld",
963 rawEvent->when);
980 reset(rawEvent->when);
990 void InputDevice::timeoutExpired(nsecs_t when) {
994 mapper->timeoutExpired(when);
1092 void InputDevice::notifyReset(nsecs_t when) {
1093 NotifyDeviceResetArgs args(when, mId);
1562 // So when we reset the accumulator, we must assume they are all zeroes.
1566 // current slot index will not be the same as it was when the first event was
1744 void InputMapper::configure(nsecs_t when,
1748 void InputMapper::reset(nsecs_t when) {
1751 void InputMapper::timeoutExpired(nsecs_t when) {
1825 sync(rawEvent->when);
1839 void SwitchInputMapper::sync(nsecs_t when) {
1841 NotifySwitchArgs args(when, 0, mUpdatedSwitchValues, mUpdatedSwitchMask);
1911 void VibratorInputMapper::timeoutExpired(nsecs_t when) {
1913 if (when >= mNextStepTime) {
2001 void KeyboardInputMapper::configure(nsecs_t when,
2003 InputMapper::configure(when, config, changes);
2043 void KeyboardInputMapper::reset(nsecs_t when) {
2051 InputMapper::reset(when);
2068 processKey(rawEvent->when, rawEvent->value != 0, keyCode, scanCode, flags);
2093 void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
2110 && mContext->shouldDropVirtualKey(when,
2121 mDownTime = when;
2166 NotifyKeyArgs args(when, getDeviceId(), mSource, policyFlags,
2288 void CursorInputMapper::configure(nsecs_t when,
2290 InputMapper::configure(when, config, changes);
2383 void CursorInputMapper::reset(nsecs_t when) {
2395 InputMapper::reset(when);
2404 sync(rawEvent->when);
2408 void CursorInputMapper::sync(nsecs_t when) {
2417 mDownTime = when;
2451 mWheelYVelocityControl.move(when, NULL, &vscroll);
2452 mWheelXVelocityControl.move(when, &hscroll, NULL);
2454 mPointerVelocityControl.move(when, &deltaX, &deltaY);
2496 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
2511 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
2520 NotifyMotionArgs hoverArgs(when, getDeviceId(), mSource, policyFlags,
2533 NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags,
2543 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
2721 void TouchInputMapper::configure(nsecs_t when,
2723 InputMapper::configure(when, config, changes);
2756 configureSurface(when, &resetNeeded);
2762 getDevice()->notifyReset(when);
2895 void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
3267 // given area relative to the diagonal size of the display when no acceleration
3289 abortPointerUsage(when, 0 /*policyFlags*/);
3627 void TouchInputMapper::reset(nsecs_t when) {
3664 InputMapper::reset(when);
3673 sync(rawEvent->when);
3677 void TouchInputMapper::sync(nsecs_t when) {
3690 syncTouch(when, &havePointerIds);
3746 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
3751 if (consumeRawTouches(when, policyFlags)) {
3797 dispatchPointerUsage(when, policyFlags, pointerUsage);
3810 dispatchHoverExit(when, policyFlags);
3811 dispatchTouches(when, policyFlags);
3812 dispatchHoverEnterAndMove(when, policyFlags);
3816 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
3833 void TouchInputMapper::timeoutExpired(nsecs_t when) {
3836 dispatchPointerGestures(when, 0 /*policyFlags*/, true /*isTimeout*/);
3841 bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) {
3852 dispatchVirtualKey(when, policyFlags,
3871 // This is useful when the user swipes through from the virtual key area
3879 dispatchVirtualKey(when, policyFlags,
3898 mCurrentVirtualKey.downTime = when;
3902 when, getDevice(), virtualKey->keyCode, virtualKey->scanCode);
3910 dispatchVirtualKey(when, policyFlags,
3922 // virtual key presses when interacting with the touch screen.
3931 // area and accidentally triggers a virtual key. This often happens when virtual keys
3935 mContext->disableVirtualKeysUntil(when + mConfig.virtualKeyQuietTime);
3940 void TouchInputMapper::dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
3948 NotifyKeyArgs args(when, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags,
3953 void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
3963 dispatchMotion(when, policyFlags, mSource,
3998 dispatchMotion(when, policyFlags, mSource,
4010 // events, they do not generally handle them except when presented in a move event.
4013 dispatchMotion(when, policyFlags, mSource,
4029 mDownTime = when;
4032 dispatchMotion(when, policyFlags, mSource,
4043 void TouchInputMapper::dispatchHoverExit(nsecs_t when, uint32_t policyFlags) {
4048 dispatchMotion(when, policyFlags, mSource,
4059 void TouchInputMapper::dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags) {
4064 dispatchMotion(when, policyFlags, mSource,
4074 dispatchMotion(when, policyFlags, mSource,
4330 void TouchInputMapper::dispatchPointerUsage(nsecs_t when, uint32_t policyFlags,
4333 abortPointerUsage(when, policyFlags);
4339 dispatchPointerGestures(when, policyFlags, false /*isTimeout*/);
4342 dispatchPointerStylus(when, policyFlags);
4345 dispatchPointerMouse(when, policyFlags);
4352 void TouchInputMapper::abortPointerUsage(nsecs_t when, uint32_t policyFlags) {
4355 abortPointerGestures(when, policyFlags);
4358 abortPointerStylus(when, policyFlags);
4361 abortPointerMouse(when, policyFlags);
4370 void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlags,
4374 bool sendEvents = preparePointerGestures(when,
4412 // Unfade the pointer when the current gesture manipulates the
4418 // Fade the pointer when the current gesture manipulates a different
4460 dispatchMotion(when, policyFlags, mSource,
4480 dispatchMotion(when, policyFlags, mSource,
4495 dispatchMotion(when, policyFlags, mSource,
4512 mPointerGesture.downTime = when;
4515 dispatchMotion(when, policyFlags, mSource,
4526 dispatchMotion(when, policyFlags, mSource,
4552 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
4578 void TouchInputMapper::abortPointerGestures(nsecs_t when, uint32_t policyFlags) {
4583 dispatchMotion(when, policyFlags, mSource,
4603 bool TouchInputMapper::preparePointerGestures(nsecs_t when,
4615 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4652 mPointerGesture.velocityTracker.addMovement(when,
4667 // This guarantees we always have an active touch id when there is at least one pointer.
4677 mPointerGesture.firstTouchTime = when;
4694 isQuietTime = when < mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval;
4700 // Enter quiet time when exiting swipe or freeform state.
4702 // pointer when finishing a swipe and there is still one pointer left onscreen.
4707 // Enter quiet time when releasing the button and there are still two or more
4713 mPointerGesture.quietTime = when;
4723 + mConfig.pointerGestureQuietInterval - when) * 0.000001f);
4752 // Reset state when just starting.
4793 mPointerVelocityControl.move(when, &deltaX, &deltaY);
4829 if (when <= mPointerGesture.tapDownTime + mConfig.pointerGestureTapInterval) {
4838 mPointerGesture.tapUpTime = when;
4839 getContext()->requestTimeoutAtTime(when
4874 (when - mPointerGesture.tapDownTime) * 0.000001f);
4901 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4917 (when - mPointerGesture.tapUpTime) * 0.000001f);
4935 mPointerVelocityControl.move(when, &deltaX, &deltaY);
4979 mPointerGesture.tapDownTime = when;
4988 // The ambiguous case is deciding what to do when there are two fingers down but they
4995 // When the two fingers move enough or when additional fingers are added, we make
4999 bool settled = when >= mPointerGesture.firstTouchTime
5011 + mConfig.pointerGestureMultitouchSettleInterval - when)
5030 + mConfig.pointerGestureMultitouchSettleInterval - when)
5085 // Only transition when at least two pointers have moved further than
5191 mPointerVelocityControl.move(when, &commonDeltaX, &commonDeltaY);
5366 void TouchInputMapper::dispatchPointerStylus(nsecs_t when, uint32_t policyFlags) {
5393 dispatchPointerSimple(when, policyFlags, down, hovering);
5396 void TouchInputMapper::abortPointerStylus(nsecs_t when, uint32_t policyFlags) {
5397 abortPointerSimple(when, policyFlags);
5400 void TouchInputMapper::dispatchPointerMouse(nsecs_t when, uint32_t policyFlags) {
5418 mPointerVelocityControl.move(when, &deltaX, &deltaY);
5446 dispatchPointerSimple(when, policyFlags, down, hovering);
5449 void TouchInputMapper::abortPointerMouse(nsecs_t when, uint32_t policyFlags) {
5450 abortPointerSimple(when, policyFlags);
5455 void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
5474 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5487 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5499 mPointerSimple.downTime = when;
5502 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5512 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5526 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5536 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5548 mWheelYVelocityControl.move(when, NULL, &vscroll);
5549 mWheelXVelocityControl.move(when, &hscroll, NULL);
5557 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5575 void TouchInputMapper::abortPointerSimple(nsecs_t when, uint32_t policyFlags) {
5579 dispatchPointerSimple(when, policyFlags, false, false);
5582 void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
5619 NotifyMotionArgs args(when, getDeviceId(), source, policyFlags,
5933 void SingleTouchInputMapper::reset(nsecs_t when) {
5936 TouchInputMapper::reset(when);
5945 void SingleTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
6003 void MultiTouchInputMapper::reset(nsecs_t when) {
6008 TouchInputMapper::reset(when);
6017 void MultiTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
6232 void JoystickInputMapper::configure(nsecs_t when,
6234 InputMapper::configure(when, config, changes);
6371 void JoystickInputMapper::reset(nsecs_t when) {
6379 InputMapper::reset(when);
6423 sync(rawEvent->when, false /*force*/);
6430 void JoystickInputMapper::sync(nsecs_t when, bool force) {
6457 // be fairly noisy even when not in use. On the other hand, pushing a gamepad
6462 NotifyMotionArgs args(when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags,