Home
last modified time | relevance | path

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

12345678910>>...72

/frameworks/base/services/autofill/java/com/android/server/autofill/
DPresentationStatsEventLogger.java253 mEventInternal.ifPresent(event -> event.mRequestId = requestId); in maybeSetRequestId()
260 mEventInternal.ifPresent(event -> event.mIsCredentialRequest = isCredentialRequest); in maybeSetIsCredentialRequest()
267 mEventInternal.ifPresent(event -> in maybeSetWebviewRequestedCredential()
268 event.mWebviewRequestedCredential = webviewRequestedCredential); in maybeSetWebviewRequestedCredential()
272 mEventInternal.ifPresent(event -> { in maybeSetNoPresentationEventReason()
273 if (event.mCountShown == 0) { in maybeSetNoPresentationEventReason()
274 event.mNoPresentationReason = reason; in maybeSetNoPresentationEventReason()
280 mEventInternal.ifPresent(event -> { in maybeSetNoPresentationEventReasonIfNoReasonExists()
281 if (event.mCountShown == 0 && event.mNoPresentationReason == NOT_SHOWN_REASON_UNKNOWN) { in maybeSetNoPresentationEventReasonIfNoReasonExists()
282 event.mNoPresentationReason = reason; in maybeSetNoPresentationEventReasonIfNoReasonExists()
[all …]
DSaveEventLogger.java140 mEventInternal.ifPresent(event -> event.mRequestId = requestId); in maybeSetRequestId()
147 mEventInternal.ifPresent(event -> { in maybeSetAppPackageUid()
148 event.mAppPackageUid = val; in maybeSetAppPackageUid()
156 mEventInternal.ifPresent(event -> { in maybeSetSaveUiTriggerIds()
157 event.mSaveUiTriggerIds = val; in maybeSetSaveUiTriggerIds()
165 mEventInternal.ifPresent(event -> { in maybeSetFlag()
166 event.mFlag = val; in maybeSetFlag()
174 mEventInternal.ifPresent(event -> { in maybeSetIsNewField()
175 event.mIsNewField = val; in maybeSetIsNewField()
183 mEventInternal.ifPresent(event -> { in maybeSetSaveUiShownReason()
[all …]
DSessionCommittedEventLogger.java56 mEventInternal.ifPresent(event -> { in maybeSetComponentPackageUid()
57 event.mComponentPackageUid = val; in maybeSetComponentPackageUid()
65 mEventInternal.ifPresent(event -> { in maybeSetRequestCount()
66 event.mRequestCount = val; in maybeSetRequestCount()
74 mEventInternal.ifPresent(event -> { in maybeSetCommitReason()
75 event.mCommitReason = val; in maybeSetCommitReason()
83 mEventInternal.ifPresent(event -> { in maybeSetSessionDurationMillis()
84 event.mSessionDurationMillis = timestamp; in maybeSetSessionDurationMillis()
91 event -> { in maybeSetAutofillServiceUid()
92 event.mServiceUid = uid; in maybeSetAutofillServiceUid()
[all …]
DFillResponseEventLogger.java222 mEventInternal.ifPresent(event -> event.mRequestId = val); in maybeSetRequestId()
229 mEventInternal.ifPresent(event -> { in maybeSetAppPackageUid()
230 event.mAppPackageUid = val; in maybeSetAppPackageUid()
238 mEventInternal.ifPresent(event -> { in maybeSetDisplayPresentationType()
239 event.mDisplayPresentationType = val; in maybeSetDisplayPresentationType()
249 mEventInternal.ifPresent(event -> { in maybeSetAvailableCount()
251 event.mAvailableCount = availableCount; in maybeSetAvailableCount()
256 mEventInternal.ifPresent(event -> { in maybeSetAvailableCount()
257 event.mAvailableCount = val; in maybeSetAvailableCount()
262 mEventInternal.ifPresent(event -> { in maybeSetTotalDatasetsProvided()
[all …]
DFieldClassificationEventLogger.java92 mEventInternal.ifPresent(event -> { in maybeSetLatencyMillis()
93 event.mLatencyClassificationRequestMillis = timestamp; in maybeSetLatencyMillis()
101 mEventInternal.ifPresent(event -> { in maybeSetCountClassifications()
102 event.mCountClassifications = countClassifications; in maybeSetCountClassifications()
110 mEventInternal.ifPresent(event -> { in maybeSetSessionId()
111 event.mSessionId = sessionId; in maybeSetSessionId()
119 mEventInternal.ifPresent(event -> { in maybeSetRequestId()
120 event.mRequestId = requestId; in maybeSetRequestId()
128 mEventInternal.ifPresent(event -> { in maybeSetNextFillRequestId()
129 event.mNextFillRequestId = nextFillRequestId; in maybeSetNextFillRequestId()
[all …]
DFillRequestEventLogger.java108 mEventInternal.ifPresent(event -> event.mRequestId = requestId); in maybeSetRequestId()
115 mEventInternal.ifPresent(event -> { in maybeSetAutofillServiceUid()
116 event.mAutofillServiceUid = uid; in maybeSetAutofillServiceUid()
124 mEventInternal.ifPresent(event -> { in maybeSetInlineSuggestionHostUid()
145 event.mInlineSuggestionHostUid = imeUid; in maybeSetInlineSuggestionHostUid()
154 mEventInternal.ifPresent(event -> { in maybeSetFlags()
155 event.mFlags = flags; in maybeSetFlags()
163 mEventInternal.ifPresent(event -> { in maybeSetRequestTriggerReason()
164 event.mRequestTriggerReason = reason; in maybeSetRequestTriggerReason()
172 mEventInternal.ifPresent(event -> { in maybeSetIsAugmented()
[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/native/libs/input/tests/
DVerifiedInputEvent_test.cpp24 KeyEvent event; in getKeyEventWithFlags() local
25 event.initialize(InputEvent::nextId(), /*deviceId=*/2, AINPUT_SOURCE_GAMEPAD, in getKeyEventWithFlags()
29 return event; in getKeyEventWithFlags()
33 MotionEvent event; in getMotionEventWithFlags() local
46 event.initialize(InputEvent::nextId(), /*deviceId=*/0, AINPUT_SOURCE_MOUSE, in getMotionEventWithFlags()
53 return event; in getMotionEventWithFlags()
57 KeyEvent event = getKeyEventWithFlags(0); in TEST() local
58 VerifiedKeyEvent verified = verifiedKeyEventFromKeyEvent(event); in TEST()
62 ASSERT_EQ(event.getDeviceId(), verified.deviceId); in TEST()
63 ASSERT_EQ(event.getEventTime(), verified.eventTimeNanos); in TEST()
[all …]
DInputEvent_test.cpp219 KeyEvent event; in TEST_F() local
225 event.initialize(id, 2, AINPUT_SOURCE_GAMEPAD, DISPLAY_ID, HMAC, AKEY_EVENT_ACTION_DOWN, in TEST_F()
229 ASSERT_EQ(id, event.getId()); in TEST_F()
230 ASSERT_EQ(InputEventType::KEY, event.getType()); in TEST_F()
231 ASSERT_EQ(2, event.getDeviceId()); in TEST_F()
232 ASSERT_EQ(AINPUT_SOURCE_GAMEPAD, event.getSource()); in TEST_F()
233 ASSERT_EQ(DISPLAY_ID, event.getDisplayId()); in TEST_F()
234 EXPECT_EQ(HMAC, event.getHmac()); in TEST_F()
235 ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, event.getAction()); in TEST_F()
236 ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, event.getFlags()); in TEST_F()
[all …]
/frameworks/native/services/inputflinger/rust/
Dbounce_keys_filter.rs66 fn notify_key(&mut self, event: &KeyEvent) { in notify_key()
67 if !(self.external_devices.contains(&event.deviceId) && event.source == Source::KEYBOARD) { in notify_key()
68 self.next.notify_key(event); in notify_key()
71 match event.action { in notify_key()
72 KeyEventAction::DOWN => match self.key_event_map.get(&event.deviceId) { in notify_key()
73 None => self.next.notify_key(event), in notify_key()
75 if event.keyCode == last_up_event.keycode in notify_key()
76 && event.eventTime < last_up_event.event_time + self.bounce_key_threshold_ns in notify_key()
79 device_id: event.deviceId, in notify_key()
80 keycode: event.keyCode, in notify_key()
[all …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DTouchExplorer.java236 MotionEvent event = mState.getLastReceivedEvent(); in clear() local
237 if (event != null) { in clear()
238 clear(event, WindowManagerPolicy.FLAG_TRUSTED); in clear()
242 private void clear(MotionEvent event, int policyFlags) { in clear() argument
249 mDispatcher.sendUpForInjectedDownPointers(event, policyFlags); in clear()
266 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
269 "event=" + event + ";rawEvent=" + rawEvent + ";policyFlags=" + policyFlags); in onMotionEvent()
271 if (!event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)) { in onMotionEvent()
272 super.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
276 checkForMalformedEvent(event); in onMotionEvent()
[all …]
DEventDispatcher.java98 MotionEvent event = null; in sendMotionEvent() local
100 event = prototype; in sendMotionEvent()
103 event = prototype.split(pointerIdBits); in sendMotionEvent()
111 downTime = event.getEventTime(); in sendMotionEvent()
117 final PointerProperties[] properties = new PointerProperties[event.getPointerCount()]; in sendMotionEvent()
118 final PointerCoords[] coords = new PointerCoords[event.getPointerCount()]; in sendMotionEvent()
119 for (int i = 0; i < event.getPointerCount(); i++) { in sendMotionEvent()
121 event.getPointerCoords(i, c); in sendMotionEvent()
124 event.getPointerProperties(i, p); in sendMotionEvent()
127 event = MotionEvent.obtain(downTime, event.getEventTime(), event.getAction(), in sendMotionEvent()
[all …]
DGestureMatcher.java94 @State int state, MotionEvent event, MotionEvent rawEvent, int policyFlags) { in setState() argument
98 mListener.onStateChanged(mGestureId, mState, event, rawEvent, policyFlags); in setState()
103 protected final void startGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in startGesture() argument
104 setState(STATE_GESTURE_STARTED, event, rawEvent, policyFlags); in startGesture()
108 protected final void cancelGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in cancelGesture() argument
109 setState(STATE_GESTURE_CANCELED, event, rawEvent, policyFlags); in cancelGesture()
113 protected final void completeGesture(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in completeGesture() argument
114 setState(STATE_GESTURE_COMPLETED, event, rawEvent, policyFlags); in completeGesture()
134 public final int onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
138 switch (event.getActionMasked()) { in onMotionEvent()
[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 …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/util/
DKeyEventHandling.java125 import static java.awt.event.KeyEvent.KEY_LOCATION_RIGHT;
126 import static java.awt.event.KeyEvent.VK_0;
127 import static java.awt.event.KeyEvent.VK_1;
128 import static java.awt.event.KeyEvent.VK_2;
129 import static java.awt.event.KeyEvent.VK_3;
130 import static java.awt.event.KeyEvent.VK_4;
131 import static java.awt.event.KeyEvent.VK_5;
132 import static java.awt.event.KeyEvent.VK_6;
133 import static java.awt.event.KeyEvent.VK_7;
134 import static java.awt.event.KeyEvent.VK_8;
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DIntervalStats.java113 void addToEventStats(List<EventStats> out, int event, long beginTime, long endTime) { in addToEventStats() argument
116 ev.mEventType = event; in addToEventStats()
166 Event event = new Event(); in buildEvent() local
167 event.mPackage = getCachedStringRef(packageName); in buildEvent()
169 event.mClass = getCachedStringRef(className); in buildEvent()
171 return event; in buildEvent()
180 final Event event = new Event(); in buildEvent() local
184 event.mPackage = getCachedStringRef( in buildEvent()
188 event.mPackage = getCachedStringRef(stringPool.get( in buildEvent()
192 event.mClass = getCachedStringRef( in buildEvent()
[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/com/android/internal/midi/
DEventScheduler.java54 public FastEventQueue(SchedulableEvent event) { in FastEventQueue() argument
55 mFirst = event; in FastEventQueue()
73 SchedulableEvent event = mFirst; in remove() local
74 mFirst = event.mNext; in remove()
75 event.mNext = null; in remove()
76 return event; in remove()
82 public void add(SchedulableEvent event) { in add() argument
83 event.mNext = null; in add()
84 mLast.mNext = event; in add()
85 mLast = event; in add()
[all …]
/frameworks/base/core/java/android/app/usage/
DParcelableUsageEventList.java128 final Event event = mList.get(i); in writeToParcel() local
129 writeEventToParcel(event, dest, callFlags); in writeToParcel()
159 final Event event = mList.get(i); in writeToParcel()
160 writeEventToParcel(event, reply, callFlags); in writeToParcel()
209 final Event event = new Event(); in readEventFromParcel() local
210 event.mPackage = in.readString(); in readEventFromParcel()
211 event.mClass = in.readString(); in readEventFromParcel()
212 event.mInstanceId = in.readInt(); in readEventFromParcel()
213 event.mTaskRootPackage = in.readString(); in readEventFromParcel()
214 event.mTaskRootClass = in.readString(); in readEventFromParcel()
[all …]
/frameworks/native/services/inputflinger/tests/
DFakeWindows.cpp31 auto [consumeSeq, event] = receiveEvent(timeout); in consume()
36 return std::move(event); in consume()
42 std::unique_ptr<InputEvent> event; in receiveEvent() local
50 event = std::unique_ptr<InputEvent>(rawEventPtr); in receiveEvent()
66 if (event == nullptr) { in receiveEvent()
69 return std::make_pair(consumeSeq, std::move(event)); in receiveEvent()
86 std::unique_ptr<InputEvent> event = consume(CONSUME_TIMEOUT_EVENT_EXPECTED); in consumeEvent() local
88 ASSERT_NE(nullptr, event) << mName.c_str() << ": consumer should have returned non-NULL event."; in consumeEvent()
89 ASSERT_EQ(expectedEventType, event->getType()) in consumeEvent()
91 << " event, got " << *event; in consumeEvent()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DSecurityEventTest.java61 SecurityEvent event = createEvent(() -> { in testSecurityEventId() local
64 event.setId(20); in testSecurityEventId()
65 assertThat(event.getId()).isEqualTo(20); in testSecurityEventId()
71 SecurityEvent event = createEvent(() -> { in testSecurityEventParceling() local
76 p.writeParcelable(event, 0); in testSecurityEventParceling()
81 assertThat(unparceledEvent.getTag()).isEqualTo(event.getTag()); in testSecurityEventParceling()
82 assertThat(unparceledEvent.getData()).isEqualTo(event.getData()); in testSecurityEventParceling()
83 assertThat(unparceledEvent.getTimeNanos()).isEqualTo(event.getTimeNanos()); in testSecurityEventParceling()
84 assertThat(unparceledEvent.getId()).isEqualTo(event.getId()); in testSecurityEventParceling()
89 SecurityEvent event; in testSecurityEventRedaction() local
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextClassificationSession.java98 public void onSelectionEvent(SelectionEvent event) { in onSelectionEvent() argument
101 if (mEventHelper.sanitizeEvent(event)) { in onSelectionEvent()
102 mDelegate.onSelectionEvent(event); in onSelectionEvent()
113 public void onTextClassifierEvent(TextClassifierEvent event) { in onTextClassifierEvent() argument
116 event.mHiddenTempSessionId = mSessionId; in onTextClassifierEvent()
117 mDelegate.onTextClassifierEvent(event); in onTextClassifierEvent()
192 boolean sanitizeEvent(SelectionEvent event) { in sanitizeEvent() argument
193 updateInvocationMethod(event); in sanitizeEvent()
194 modifyAutoSelectionEventType(event); in sanitizeEvent()
196 if (event.getEventType() != SelectionEvent.EVENT_SELECTION_STARTED in sanitizeEvent()
[all …]
/frameworks/base/core/jni/
Dandroid_view_MotionEvent.cpp82 MotionEvent* event) { in android_view_MotionEvent_setNativePtr() argument
84 reinterpret_cast<jlong>(event)); in android_view_MotionEvent_setNativePtr()
88 const MotionEvent& event) { in android_view_MotionEvent_obtainAsCopy() argument
90 destEvent->copyFrom(&event, true); in android_view_MotionEvent_obtainAsCopy()
95 JNIEnv* env, std::unique_ptr<MotionEvent> event) { in android_view_MotionEvent_obtainFromNative() argument
96 if (event == nullptr) { in android_view_MotionEvent_obtainFromNative()
108 android_view_MotionEvent_setNativePtr(env, eventObj, event.release()); in android_view_MotionEvent_obtainFromNative()
168 static bool validatePointerIndex(JNIEnv* env, jint pointerIndex, const MotionEvent& event) { in validatePointerIndex() argument
169 if (pointerIndex < 0 || size_t(pointerIndex) >= event.getPointerCount()) { in validatePointerIndex()
171 message << "invalid pointerIndex " << pointerIndex << " for " << event; in validatePointerIndex()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DMotionEventTest.java100 final MotionEvent event = MotionEvent.obtain(0 /* downTime */, 0 /* eventTime */, in testCalculatesCursorPositionForTouchscreenEvents() local
102 event.setSource(InputDevice.SOURCE_TOUCHSCREEN); in testCalculatesCursorPositionForTouchscreenEvents()
104 assertTrue(Float.isNaN(event.getXCursorPosition())); in testCalculatesCursorPositionForTouchscreenEvents()
105 assertTrue(Float.isNaN(event.getYCursorPosition())); in testCalculatesCursorPositionForTouchscreenEvents()
110 final MotionEvent event = MotionEvent.obtain(0 /* downTime */, 0 /* eventTime */, in testCalculatesCursorPositionForSimpleMouseEvents() local
112 event.setSource(InputDevice.SOURCE_MOUSE); in testCalculatesCursorPositionForSimpleMouseEvents()
114 assertEquals(30, event.getXCursorPosition(), 0.1); in testCalculatesCursorPositionForSimpleMouseEvents()
115 assertEquals(50, event.getYCursorPosition(), 0.1); in testCalculatesCursorPositionForSimpleMouseEvents()
120 final MotionEvent event = MotionEvent.obtain(0 /* downTime */, 0 /* eventTime */, in testCalculatesCursorPositionForSimpleMouseEventsWithOffset() local
122 event.offsetLocation(10 /* deltaX */, 20 /* deltaY */); in testCalculatesCursorPositionForSimpleMouseEventsWithOffset()
[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 …]

12345678910>>...72