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) {
359 device->configure(when, &mConfig, 0);
360 device->reset(when);
374 void InputReader::removeDeviceLocked(nsecs_t when, int32_t deviceId) {
394 device->reset(when);
475 void InputReader::timeoutExpiredLocked(nsecs_t when) {
479 device->timeoutExpired(when);
484 void InputReader::handleConfigurationChangedLocked(nsecs_t when) {
489 NotifyConfigurationChangedArgs args(when);
550 void InputReader::requestTimeoutAtTimeLocked(nsecs_t when) {
551 if (when < mNextTimeout) {
552 mNextTimeout = when;
805 void InputReader::ContextImpl::requestTimeoutAtTime(nsecs_t when) {
807 mReader->requestTimeoutAtTimeLocked(when);
901 void InputDevice::configure(nsecs_t when, const InputReaderConfiguration* config, uint32_t changes) {
932 mapper->configure(when, config, changes);
938 void InputDevice::reset(nsecs_t when) {
942 mapper->reset(when);
947 notifyReset(when);
959 ALOGD("Input event: device=%d type=0x%04x code=0x%04x value=0x%08x when=%lld",
961 rawEvent->when);
978 reset(rawEvent->when);
988 void InputDevice::timeoutExpired(nsecs_t when) {
992 mapper->timeoutExpired(when);
1089 void InputDevice::notifyReset(nsecs_t when) {
1090 NotifyDeviceResetArgs args(when, mId);
1559 // So when we reset the accumulator, we must assume they are all zeroes.
1563 // current slot index will not be the same as it was when the first event was
1741 void InputMapper::configure(nsecs_t when,
1745 void InputMapper::reset(nsecs_t when) {
1748 void InputMapper::timeoutExpired(nsecs_t when) {
1822 sync(rawEvent->when);
1836 void SwitchInputMapper::sync(nsecs_t when) {
1838 NotifySwitchArgs args(when, 0, mUpdatedSwitchValues, mUpdatedSwitchMask);
1908 void VibratorInputMapper::timeoutExpired(nsecs_t when) {
1910 if (when >= mNextStepTime) {
1998 void KeyboardInputMapper::configure(nsecs_t when,
2000 InputMapper::configure(when, config, changes);
2040 void KeyboardInputMapper::reset(nsecs_t when) {
2048 InputMapper::reset(when);
2065 processKey(rawEvent->when, rawEvent->value != 0, keyCode, scanCode, flags);
2090 void KeyboardInputMapper::processKey(nsecs_t when, bool down, int32_t keyCode,
2107 && mContext->shouldDropVirtualKey(when,
2118 mDownTime = when;
2164 NotifyKeyArgs args(when, getDeviceId(), mSource, policyFlags,
2286 void CursorInputMapper::configure(nsecs_t when,
2288 InputMapper::configure(when, config, changes);
2381 void CursorInputMapper::reset(nsecs_t when) {
2393 InputMapper::reset(when);
2402 sync(rawEvent->when);
2406 void CursorInputMapper::sync(nsecs_t when) {
2415 mDownTime = when;
2449 mWheelYVelocityControl.move(when, NULL, &vscroll);
2450 mWheelXVelocityControl.move(when, &hscroll, NULL);
2452 mPointerVelocityControl.move(when, &deltaX, &deltaY);
2494 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
2509 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
2518 NotifyMotionArgs hoverArgs(when, getDeviceId(), mSource, policyFlags,
2531 NotifyMotionArgs scrollArgs(when, getDeviceId(), mSource, policyFlags,
2541 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
2704 void TouchInputMapper::configure(nsecs_t when,
2706 InputMapper::configure(when, config, changes);
2739 configureSurface(when, &resetNeeded);
2745 getDevice()->notifyReset(when);
2870 void TouchInputMapper::configureSurface(nsecs_t when, bool* outResetNeeded) {
3229 // given area relative to the diagonal size of the display when no acceleration
3252 abortPointerUsage(when, 0 /*policyFlags*/);
3560 void TouchInputMapper::reset(nsecs_t when) {
3597 InputMapper::reset(when);
3606 sync(rawEvent->when);
3610 void TouchInputMapper::sync(nsecs_t when) {
3623 syncTouch(when, &havePointerIds);
3679 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_DOWN, when, getDeviceId(), mSource,
3684 if (consumeRawTouches(when, policyFlags)) {
3730 dispatchPointerUsage(when, policyFlags, pointerUsage);
3743 dispatchHoverExit(when, policyFlags);
3744 dispatchTouches(when, policyFlags);
3745 dispatchHoverEnterAndMove(when, policyFlags);
3749 synthesizeButtonKeys(getContext(), AKEY_EVENT_ACTION_UP, when, getDeviceId(), mSource,
3766 void TouchInputMapper::timeoutExpired(nsecs_t when) {
3769 dispatchPointerGestures(when, 0 /*policyFlags*/, true /*isTimeout*/);
3774 bool TouchInputMapper::consumeRawTouches(nsecs_t when, uint32_t policyFlags) {
3785 dispatchVirtualKey(when, policyFlags,
3804 // This is useful when the user swipes through from the virtual key area
3812 dispatchVirtualKey(when, policyFlags,
3831 mCurrentVirtualKey.downTime = when;
3835 when, getDevice(), virtualKey->keyCode, virtualKey->scanCode);
3843 dispatchVirtualKey(when, policyFlags,
3855 // virtual key presses when interacting with the touch screen.
3864 // area and accidentally triggers a virtual key. This often happens when virtual keys
3868 mContext->disableVirtualKeysUntil(when + mConfig.virtualKeyQuietTime);
3873 void TouchInputMapper::dispatchVirtualKey(nsecs_t when, uint32_t policyFlags,
3881 NotifyKeyArgs args(when, getDeviceId(), AINPUT_SOURCE_KEYBOARD, policyFlags,
3886 void TouchInputMapper::dispatchTouches(nsecs_t when, uint32_t policyFlags) {
3896 dispatchMotion(when, policyFlags, mSource,
3931 dispatchMotion(when, policyFlags, mSource,
3943 // events, they do not generally handle them except when presented in a move event.
3946 dispatchMotion(when, policyFlags, mSource,
3962 mDownTime = when;
3965 dispatchMotion(when, policyFlags, mSource,
3976 void TouchInputMapper::dispatchHoverExit(nsecs_t when, uint32_t policyFlags) {
3981 dispatchMotion(when, policyFlags, mSource,
3992 void TouchInputMapper::dispatchHoverEnterAndMove(nsecs_t when, uint32_t policyFlags) {
3997 dispatchMotion(when, policyFlags, mSource,
4007 dispatchMotion(when, policyFlags, mSource,
4222 void TouchInputMapper::dispatchPointerUsage(nsecs_t when, uint32_t policyFlags,
4225 abortPointerUsage(when, policyFlags);
4231 dispatchPointerGestures(when, policyFlags, false /*isTimeout*/);
4234 dispatchPointerStylus(when, policyFlags);
4237 dispatchPointerMouse(when, policyFlags);
4244 void TouchInputMapper::abortPointerUsage(nsecs_t when, uint32_t policyFlags) {
4247 abortPointerGestures(when, policyFlags);
4250 abortPointerStylus(when, policyFlags);
4253 abortPointerMouse(when, policyFlags);
4262 void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlags,
4266 bool sendEvents = preparePointerGestures(when,
4304 // Unfade the pointer when the current gesture manipulates the
4310 // Fade the pointer when the current gesture manipulates a different
4352 dispatchMotion(when, policyFlags, mSource,
4372 dispatchMotion(when, policyFlags, mSource,
4387 dispatchMotion(when, policyFlags, mSource,
4404 mPointerGesture.downTime = when;
4407 dispatchMotion(when, policyFlags, mSource,
4418 dispatchMotion(when, policyFlags, mSource,
4444 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
4470 void TouchInputMapper::abortPointerGestures(nsecs_t when, uint32_t policyFlags) {
4475 dispatchMotion(when, policyFlags, mSource,
4495 bool TouchInputMapper::preparePointerGestures(nsecs_t when,
4507 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4544 mPointerGesture.velocityTracker.addMovement(when,
4551 // This guarantees we always have an active touch id when there is at least one pointer.
4561 mPointerGesture.firstTouchTime = when;
4578 isQuietTime = when < mPointerGesture.quietTime + mConfig.pointerGestureQuietInterval;
4584 // Enter quiet time when exiting swipe or freeform state.
4586 // pointer when finishing a swipe and there is still one pointer left onscreen.
4591 // Enter quiet time when releasing the button and there are still two or more
4597 mPointerGesture.quietTime = when;
4607 + mConfig.pointerGestureQuietInterval - when) * 0.000001f);
4636 // Reset state when just starting.
4677 mPointerVelocityControl.move(when, &deltaX, &deltaY);
4713 if (when <= mPointerGesture.tapDownTime + mConfig.pointerGestureTapInterval) {
4722 mPointerGesture.tapUpTime = when;
4723 getContext()->requestTimeoutAtTime(when
4757 (when - mPointerGesture.tapDownTime) * 0.000001f);
4781 if (when <= mPointerGesture.tapUpTime + mConfig.pointerGestureTapDragInterval) {
4797 (when - mPointerGesture.tapUpTime) * 0.000001f);
4815 mPointerVelocityControl.move(when, &deltaX, &deltaY);
4859 mPointerGesture.tapDownTime = when;
4868 // The ambiguous case is deciding what to do when there are two fingers down but they
4875 // When the two fingers move enough or when additional fingers are added, we make
4879 bool settled = when >= mPointerGesture.firstTouchTime
4891 + mConfig.pointerGestureMultitouchSettleInterval - when)
4910 + mConfig.pointerGestureMultitouchSettleInterval - when)
4965 // Only transition when at least two pointers have moved further than
5071 mPointerVelocityControl.move(when, &commonDeltaX, &commonDeltaY);
5246 void TouchInputMapper::dispatchPointerStylus(nsecs_t when, uint32_t policyFlags) {
5273 dispatchPointerSimple(when, policyFlags, down, hovering);
5276 void TouchInputMapper::abortPointerStylus(nsecs_t when, uint32_t policyFlags) {
5277 abortPointerSimple(when, policyFlags);
5280 void TouchInputMapper::dispatchPointerMouse(nsecs_t when, uint32_t policyFlags) {
5298 mPointerVelocityControl.move(when, &deltaX, &deltaY);
5326 dispatchPointerSimple(when, policyFlags, down, hovering);
5329 void TouchInputMapper::abortPointerMouse(nsecs_t when, uint32_t policyFlags) {
5330 abortPointerSimple(when, policyFlags);
5335 void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
5354 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5367 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5379 mPointerSimple.downTime = when;
5382 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5392 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5406 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5416 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5428 mWheelYVelocityControl.move(when, NULL, &vscroll);
5429 mWheelXVelocityControl.move(when, &hscroll, NULL);
5437 NotifyMotionArgs args(when, getDeviceId(), mSource, policyFlags,
5455 void TouchInputMapper::abortPointerSimple(nsecs_t when, uint32_t policyFlags) {
5459 dispatchPointerSimple(when, policyFlags, false, false);
5462 void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
5499 NotifyMotionArgs args(when, getDeviceId(), source, policyFlags,
5813 void SingleTouchInputMapper::reset(nsecs_t when) {
5816 TouchInputMapper::reset(when);
5825 void SingleTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
5883 void MultiTouchInputMapper::reset(nsecs_t when) {
5888 TouchInputMapper::reset(when);
5897 void MultiTouchInputMapper::syncTouch(nsecs_t when, bool* outHavePointerIds) {
6085 void JoystickInputMapper::configure(nsecs_t when,
6087 InputMapper::configure(when, config, changes);
6221 void JoystickInputMapper::reset(nsecs_t when) {
6229 InputMapper::reset(when);
6273 sync(rawEvent->when, false /*force*/);
6280 void JoystickInputMapper::sync(nsecs_t when, bool force) {
6306 // be fairly noisy even when not in use. On the other hand, pushing a gamepad
6311 NotifyMotionArgs args(when, getDeviceId(), AINPUT_SOURCE_JOYSTICK, policyFlags,