Home
last modified time | relevance | path

Searched refs:event (Results 1 – 25 of 1367) sorted by relevance

12345678910>>...55

/frameworks/native/libs/input/tests/
DInputEvent_test.cpp180 KeyEvent event; in TEST_F() local
186 event.initialize(id, 2, AINPUT_SOURCE_GAMEPAD, DISPLAY_ID, HMAC, AKEY_EVENT_ACTION_DOWN, in TEST_F()
190 ASSERT_EQ(id, event.getId()); in TEST_F()
191 ASSERT_EQ(AINPUT_EVENT_TYPE_KEY, event.getType()); in TEST_F()
192 ASSERT_EQ(2, event.getDeviceId()); in TEST_F()
193 ASSERT_EQ(AINPUT_SOURCE_GAMEPAD, event.getSource()); in TEST_F()
194 ASSERT_EQ(DISPLAY_ID, event.getDisplayId()); in TEST_F()
195 EXPECT_EQ(HMAC, event.getHmac()); in TEST_F()
196 ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, event.getAction()); in TEST_F()
197 ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, event.getFlags()); in TEST_F()
[all …]
DVerifiedInputEvent_test.cpp23 KeyEvent event; in getKeyEventWithFlags() local
24 event.initialize(InputEvent::nextId(), 2 /*deviceId*/, AINPUT_SOURCE_GAMEPAD, in getKeyEventWithFlags()
28 return event; in getKeyEventWithFlags()
32 MotionEvent event; in getMotionEventWithFlags() local
42 event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_MOUSE, ADISPLAY_ID_DEFAULT, in getMotionEventWithFlags()
49 return event; in getMotionEventWithFlags()
53 KeyEvent event = getKeyEventWithFlags(0); in TEST() local
54 VerifiedKeyEvent verified = verifiedKeyEventFromKeyEvent(event); in TEST()
58 ASSERT_EQ(event.getDeviceId(), verified.deviceId); in TEST()
59 ASSERT_EQ(event.getEventTime(), verified.eventTimeNanos); in TEST()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/contentcapture/
DContentCaptureEventTest.java60 final ContentCaptureEvent event = new ContentCaptureEvent(42, TYPE_VIEW_DISAPPEARED); in testSetAutofillId_null() local
62 assertThrows(NullPointerException.class, () -> event.setAutofillId(null)); in testSetAutofillId_null()
63 assertThat(event.getId()).isNull(); in testSetAutofillId_null()
64 assertThat(event.getIds()).isNull(); in testSetAutofillId_null()
69 final ContentCaptureEvent event = new ContentCaptureEvent(42, TYPE_VIEW_DISAPPEARED); in testSetAutofillIds_null() local
71 assertThrows(NullPointerException.class, () -> event.setAutofillIds(null)); in testSetAutofillIds_null()
72 assertThat(event.getId()).isNull(); in testSetAutofillIds_null()
73 assertThat(event.getIds()).isNull(); in testSetAutofillIds_null()
78 final ContentCaptureEvent event = new ContentCaptureEvent(42, TYPE_VIEW_DISAPPEARED); in testAddAutofillId_null() local
80 assertThrows(NullPointerException.class, () -> event.addAutofillId(null)); in testAddAutofillId_null()
[all …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DTouchExplorer.java189 MotionEvent event = mState.getLastReceivedEvent(); in clear() local
190 if (event != null) { in clear()
191 clear(event, WindowManagerPolicy.FLAG_TRUSTED); in clear()
195 private void clear(MotionEvent event, int policyFlags) { in clear() argument
202 mDispatcher.sendUpForInjectedDownPointers(event, policyFlags); in clear()
205 mDispatcher.sendUpForInjectedDownPointers(event, policyFlags); in clear()
223 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
224 if (!event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)) { in onMotionEvent()
225 super.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
230 Slog.d(LOG_TAG, "Received event: " + event + ", policyFlags=0x" in onMotionEvent()
[all …]
DGestureMatcher.java92 @State int state, MotionEvent event, MotionEvent rawEvent, int policyFlags) { in setState() argument
95 mListener.onStateChanged(mGestureId, mState, event, rawEvent, policyFlags); in setState()
99 protected final void startGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in startGesture() argument
100 setState(STATE_GESTURE_STARTED, event, rawEvent, policyFlags); in startGesture()
104 protected final void cancelGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in cancelGesture() argument
105 setState(STATE_GESTURE_CANCELED, event, rawEvent, policyFlags); in cancelGesture()
109 protected final void completeGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in completeGesture() argument
110 setState(STATE_GESTURE_COMPLETED, event, rawEvent, policyFlags); in completeGesture()
126 public final int onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
130 switch (event.getActionMasked()) { in onMotionEvent()
[all …]
DEventDispatcher.java98 MotionEvent event = null; in sendMotionEvent() local
100 event = prototype; in sendMotionEvent()
103 event = prototype.split(pointerIdBits); in sendMotionEvent()
110 event.setDownTime(event.getEventTime()); in sendMotionEvent()
112 event.setDownTime(mState.getLastInjectedDownEventTime()); in sendMotionEvent()
121 event = offsetEvent(event, -mLongPressingPointerDeltaX, -mLongPressingPointerDeltaY); in sendMotionEvent()
128 + event in sendMotionEvent()
136 mReceiver.onMotionEvent(event, rawEvent, policyFlags); in sendMotionEvent()
140 mState.onInjectedMotionEvent(event); in sendMotionEvent()
142 if (event != prototype) { in sendMotionEvent()
[all …]
DSecondFingerMultiTap.java65 protected void onPointerDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onPointerDown() argument
66 if (event.getPointerCount() > 2) { in onPointerDown()
67 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
71 int index = getActionIndex(event); in onPointerDown()
72 mSecondFingerPointerId = event.getPointerId(index); in onPointerDown()
73 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onPointerDown()
75 mBaseX = event.getX(); in onPointerDown()
76 mBaseY = event.getY(); in onPointerDown()
79 cancelGesture(event, rawEvent, policyFlags); in onPointerDown()
81 mBaseX = event.getX(); in onPointerDown()
[all …]
DMultiFingerMultiTap.java93 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
97 cancelGesture(event, rawEvent, policyFlags); in onDown()
100 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onDown()
112 final int index = event.getActionIndex(); in onDown()
113 nearest.set(event.getX(index), event.getY(index)); in onDown()
115 cancelGesture(event, rawEvent, policyFlags); in onDown()
120 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
121 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
136 startGesture(event, rawEvent, policyFlags); in onUp()
140 completeAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DSecurityEventTest.java29 SecurityEvent event = createEvent(() -> { in testSecurityEventId() local
32 event.setId(20); in testSecurityEventId()
33 assertEquals(20, event.getId()); in testSecurityEventId()
38 SecurityEvent event = createEvent(() -> { in testSecurityEventParceling() local
43 p.writeParcelable(event, 0); in testSecurityEventParceling()
48 assertEquals(event.getTag(), unparceledEvent.getTag()); in testSecurityEventParceling()
49 assertEquals(event.getData(), unparceledEvent.getData()); in testSecurityEventParceling()
50 assertEquals(event.getTimeNanos(), unparceledEvent.getTimeNanos()); in testSecurityEventParceling()
51 assertEquals(event.getId(), unparceledEvent.getId()); in testSecurityEventParceling()
55 SecurityEvent event; in testSecurityEventRedaction() local
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DIntervalStats.java109 void addToEventStats(List<EventStats> out, int event, long beginTime, long endTime) { in addToEventStats() argument
112 ev.mEventType = event; in addToEventStats()
162 Event event = new Event(); in buildEvent() local
163 event.mPackage = getCachedStringRef(packageName); in buildEvent()
165 event.mClass = getCachedStringRef(className); in buildEvent()
167 return event; in buildEvent()
176 final Event event = new Event(); in buildEvent() local
180 event.mPackage = getCachedStringRef( in buildEvent()
184 event.mPackage = getCachedStringRef(stringPool.get( in buildEvent()
188 event.mClass = getCachedStringRef( in buildEvent()
[all …]
/frameworks/base/core/java/com/android/internal/midi/
DEventScheduler.java51 FastEventQueue(SchedulableEvent event) { in FastEventQueue() argument
52 mFirst = event; in FastEventQueue()
70 SchedulableEvent event = mFirst; in remove() local
71 mFirst = event.mNext; in remove()
72 event.mNext = null; in remove()
73 return event; in remove()
79 public void add(SchedulableEvent event) { in add() argument
80 event.mNext = null; in add()
81 mLast.mNext = event; in add()
82 mLast = event; in add()
[all …]
/frameworks/base/core/java/android/view/
DInputEventConsistencyVerifier.java175 public void onInputEvent(InputEvent event, int nestingLevel) { in onInputEvent() argument
176 if (event instanceof KeyEvent) { in onInputEvent()
177 final KeyEvent keyEvent = (KeyEvent)event; in onInputEvent()
180 final MotionEvent motionEvent = (MotionEvent)event; in onInputEvent()
200 public void onKeyEvent(KeyEvent event, int nestingLevel) { in onKeyEvent() argument
201 if (!startEvent(event, nestingLevel, EVENT_TYPE_KEY)) { in onKeyEvent()
206 ensureMetaStateIsNormalized(event.getMetaState()); in onKeyEvent()
208 final int action = event.getAction(); in onKeyEvent()
209 final int deviceId = event.getDeviceId(); in onKeyEvent()
210 final int source = event.getSource(); in onKeyEvent()
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextClassificationSession.java99 public void onSelectionEvent(SelectionEvent event) { in onSelectionEvent() argument
101 if (mEventHelper.sanitizeEvent(event)) { in onSelectionEvent()
102 mDelegate.onSelectionEvent(event); in onSelectionEvent()
111 public void onTextClassifierEvent(TextClassifierEvent event) { in onTextClassifierEvent() argument
113 event.mHiddenTempSessionId = mSessionId; in onTextClassifierEvent()
114 mDelegate.onTextClassifierEvent(event); in onTextClassifierEvent()
168 boolean sanitizeEvent(SelectionEvent event) { in sanitizeEvent() argument
169 updateInvocationMethod(event); in sanitizeEvent()
170 modifyAutoSelectionEventType(event); in sanitizeEvent()
172 if (event.getEventType() != SelectionEvent.EVENT_SELECTION_STARTED in sanitizeEvent()
[all …]
/frameworks/base/core/jni/
Dandroid_view_InputEventSender.cpp57 status_t sendKeyEvent(uint32_t seq, const KeyEvent* event);
58 status_t sendMotionEvent(uint32_t seq, const MotionEvent* event);
110 status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* event) { in sendKeyEvent() argument
117 mInputPublisher.publishKeyEvent(publishedSeq, event->getId(), event->getDeviceId(), in sendKeyEvent()
118 event->getSource(), event->getDisplayId(), in sendKeyEvent()
119 event->getHmac(), event->getAction(), event->getFlags(), in sendKeyEvent()
120 event->getKeyCode(), event->getScanCode(), in sendKeyEvent()
121 event->getMetaState(), event->getRepeatCount(), in sendKeyEvent()
122 event->getDownTime(), event->getEventTime()); in sendKeyEvent()
132 status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent* event) { in sendMotionEvent() argument
[all …]
Dandroid_view_VerifiedMotionEvent.cpp33 jobject android_view_VerifiedMotionEvent(JNIEnv* env, const VerifiedMotionEvent& event) { in android_view_VerifiedMotionEvent() argument
35 gVerifiedMotionEventClassInfo.constructor, event.deviceId, in android_view_VerifiedMotionEvent()
36 event.eventTimeNanos, event.source, event.displayId, event.rawX, in android_view_VerifiedMotionEvent()
37 event.rawY, event.actionMasked, event.downTimeNanos, event.flags, in android_view_VerifiedMotionEvent()
38 event.metaState, event.buttonState); in android_view_VerifiedMotionEvent()
Dandroid_view_VerifiedKeyEvent.cpp33 jobject android_view_VerifiedKeyEvent(JNIEnv* env, const VerifiedKeyEvent& event) { in android_view_VerifiedKeyEvent() argument
35 event.deviceId, event.eventTimeNanos, event.source, event.displayId, in android_view_VerifiedKeyEvent()
36 event.action, event.downTimeNanos, event.flags, event.keyCode, in android_view_VerifiedKeyEvent()
37 event.scanCode, event.metaState, event.repeatCount); in android_view_VerifiedKeyEvent()
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareNativeCallback.java372 public void eventClusterEvent(NanClusterEventInd event) { in eventClusterEvent() argument
374 Log.v(TAG, "eventClusterEvent: eventType=" + event.eventType + ", addr=" in eventClusterEvent()
375 + String.valueOf(HexEncoding.encode(event.addr))); in eventClusterEvent()
379 if (event.eventType == NanClusterEventType.DISCOVERY_MAC_ADDRESS_CHANGED) { in eventClusterEvent()
380 mWifiAwareStateManager.onInterfaceAddressChangeNotification(event.addr); in eventClusterEvent()
381 } else if (event.eventType == NanClusterEventType.STARTED_CLUSTER) { in eventClusterEvent()
383 WifiAwareClientState.CLUSTER_CHANGE_EVENT_STARTED, event.addr); in eventClusterEvent()
384 } else if (event.eventType == NanClusterEventType.JOINED_CLUSTER) { in eventClusterEvent()
386 WifiAwareClientState.CLUSTER_CHANGE_EVENT_JOINED, event.addr); in eventClusterEvent()
388 Log.e(TAG, "eventClusterEvent: invalid eventType=" + event.eventType); in eventClusterEvent()
[all …]
/frameworks/base/wifi/tests/src/android/net/wifi/p2p/
DWifiP2pProvDiscEventTest.java44 WifiP2pProvDiscEvent event = in testPbcReqEvent() local
46 assertEquals(WifiP2pProvDiscEvent.PBC_REQ, event.event); in testPbcReqEvent()
47 assertEquals(DEVICE_ADDRESS, event.device.deviceAddress); in testPbcReqEvent()
56 WifiP2pProvDiscEvent event = in testPbcRespEvent() local
58 assertEquals(WifiP2pProvDiscEvent.PBC_RSP, event.event); in testPbcRespEvent()
59 assertEquals(DEVICE_ADDRESS, event.device.deviceAddress); in testPbcRespEvent()
67 WifiP2pProvDiscEvent event = in testEnterPinEvent() local
69 assertEquals(WifiP2pProvDiscEvent.ENTER_PIN, event.event); in testEnterPinEvent()
70 assertEquals(DEVICE_ADDRESS, event.device.deviceAddress); in testEnterPinEvent()
78 WifiP2pProvDiscEvent event = in testShowPinEvent() local
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/utils/
DMotionEventMatcher.java45 public MotionEventMatcher(MotionEvent event) { in MotionEventMatcher() argument
47 event.getDownTime(), in MotionEventMatcher()
48 event.getEventTime(), in MotionEventMatcher()
49 event.getActionMasked(), in MotionEventMatcher()
50 (int) event.getX(), in MotionEventMatcher()
51 (int) event.getY()); in MotionEventMatcher()
60 public boolean matchesSafely(MotionEvent event) { in matchesSafely() argument
61 if ((event.getDownTime() == mDownTime) in matchesSafely()
62 && (event.getEventTime() == mEventTime) in matchesSafely()
63 && (event.getActionMasked() == mActionMasked) in matchesSafely()
[all …]
/frameworks/opt/net/voip/src/java/com/android/server/sip/
DSipWakeupTimer.java115 private void insertEvent(MyEvent event) { in insertEvent() argument
118 event.mTriggerTime = now + event.mPeriod; in insertEvent()
119 mEventQueue.add(event); in insertEvent()
124 if (minPeriod <= event.mMaxPeriod) { in insertEvent()
125 event.mPeriod = event.mMaxPeriod / minPeriod * minPeriod; in insertEvent()
126 int interval = event.mMaxPeriod; in insertEvent()
129 event.mTriggerTime = firstEvent.mTriggerTime + interval; in insertEvent()
130 mEventQueue.add(event); in insertEvent()
132 long triggerTime = now + event.mPeriod; in insertEvent()
134 event.mTriggerTime = firstEvent.mTriggerTime; in insertEvent()
[all …]
/frameworks/base/cmds/statsd/tests/
DLogEvent_test.cpp81 AStatsEvent* event = AStatsEvent_obtain(); in TEST() local
82 AStatsEvent_setAtomId(event, 100); in TEST()
83 AStatsEvent_writeInt32(event, 10); in TEST()
84 AStatsEvent_writeInt64(event, 0x123456789); in TEST()
85 AStatsEvent_writeFloat(event, 2.0); in TEST()
86 AStatsEvent_writeBool(event, true); in TEST()
87 AStatsEvent_build(event); in TEST()
90 uint8_t* buf = AStatsEvent_getBuffer(event, &size); in TEST()
127 AStatsEvent_release(event); in TEST()
131 AStatsEvent* event = AStatsEvent_obtain(); in TEST() local
[all …]
DLogEntryMatcher_test.cpp123 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST() local
124 makeIntLogEvent(&event, TAG_ID, 0, 11); in TEST()
127 EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
131 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
140 LogEvent event(/*uid=*/0, /*pid=*/0); in TEST() local
141 makeAttributionLogEvent(&event, TAG_ID, 0, attributionUids, attributionTags, "some value"); in TEST()
162 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
165 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
168 EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
172 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
[all …]
/frameworks/base/apct-tests/perftests/autofill/src/android/view/autofill/
DMyAutofillCallback.java51 public void onAutofillEvent(View view, int event) { in onAutofillEvent() argument
54 offered = mEvents.offer(new MyEvent(view, event), TIMEOUT_MS, TimeUnit.MILLISECONDS); in onAutofillEvent()
59 String error = "could not offer " + toString(view, event) + " in " + TIMEOUT_MS + "ms"; in onAutofillEvent()
68 public void expectEvent(@NonNull View view, int event) { in expectEvent() argument
74 + "ms while waiting for " + toString(view, event)); in expectEvent()
78 throw new IllegalStateException("interrupted waiting for " + toString(view, event)); in expectEvent()
80 if (!myEvent.view.equals(view) || myEvent.event != event) { in expectEvent()
82 + toString(view, event)); in expectEvent()
96 private static String eventToString(int event) { in eventToString() argument
97 switch (event) { in eventToString()
[all …]
/frameworks/base/core/java/com/android/internal/policy/
DPhoneFallbackEventHandler.java64 public void preDispatchKeyEvent(KeyEvent event) { in preDispatchKeyEvent() argument
65 getAudioManager().preDispatchKeyEvent(event, AudioManager.USE_DEFAULT_STREAM_TYPE); in preDispatchKeyEvent()
68 public boolean dispatchKeyEvent(KeyEvent event) { in dispatchKeyEvent() argument
70 final int action = event.getAction(); in dispatchKeyEvent()
71 final int keyCode = event.getKeyCode(); in dispatchKeyEvent()
74 return onKeyDown(keyCode, event); in dispatchKeyEvent()
76 return onKeyUp(keyCode, event); in dispatchKeyEvent()
81 boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
92 handleVolumeKeyEvent(event); in onKeyDown()
114 handleMediaKeyEvent(event); in onKeyDown()
[all …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DFullScreenMagnificationGestureHandler.java211 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
213 storeEventInto(mDebugInputEventHistory, event); in onMotionEvent()
215 onMotionEventInternal(event, rawEvent, policyFlags); in onMotionEvent()
221 onMotionEventInternal(event, rawEvent, policyFlags); in onMotionEvent()
225 private void onMotionEventInternal(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEventInternal() argument
226 if (DEBUG_ALL) Slog.i(LOG_TAG, "onMotionEvent(" + event + ")"); in onMotionEventInternal()
229 || !event.isFromSource(SOURCE_TOUCHSCREEN)) { in onMotionEventInternal()
230 dispatchTransformedEvent(event, rawEvent, policyFlags); in onMotionEventInternal()
234 handleEventWith(mCurrentState, event, rawEvent, policyFlags); in onMotionEventInternal()
238 MotionEvent event, MotionEvent rawEvent, int policyFlags) { in handleEventWith() argument
[all …]

12345678910>>...55