Home
last modified time | relevance | path

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

12345678910>>...52

/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/
DInputEvent_test.cpp182 KeyEvent event; in TEST_F() local
188 event.initialize(id, 2, AINPUT_SOURCE_GAMEPAD, DISPLAY_ID, HMAC, AKEY_EVENT_ACTION_DOWN, in TEST_F()
192 ASSERT_EQ(id, event.getId()); in TEST_F()
193 ASSERT_EQ(AINPUT_EVENT_TYPE_KEY, event.getType()); in TEST_F()
194 ASSERT_EQ(2, event.getDeviceId()); in TEST_F()
195 ASSERT_EQ(AINPUT_SOURCE_GAMEPAD, event.getSource()); in TEST_F()
196 ASSERT_EQ(DISPLAY_ID, event.getDisplayId()); in TEST_F()
197 EXPECT_EQ(HMAC, event.getHmac()); in TEST_F()
198 ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, event.getAction()); in TEST_F()
199 ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, event.getFlags()); in TEST_F()
[all …]
DVerifiedInputEvent_test.cpp24 KeyEvent event; in getKeyEventWithFlags() local
25 event.initialize(InputEvent::nextId(), 2 /*deviceId*/, AINPUT_SOURCE_GAMEPAD, in getKeyEventWithFlags()
29 return event; in getKeyEventWithFlags()
33 MotionEvent event; in getMotionEventWithFlags() local
45 event.initialize(InputEvent::nextId(), 0 /*deviceId*/, AINPUT_SOURCE_MOUSE, ADISPLAY_ID_DEFAULT, 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 …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DTouchExplorer.java226 MotionEvent event = mState.getLastReceivedEvent(); in clear() local
227 if (event != null) { in clear()
228 clear(event, WindowManagerPolicy.FLAG_TRUSTED); in clear()
232 private void clear(MotionEvent event, int policyFlags) { in clear() argument
239 mDispatcher.sendUpForInjectedDownPointers(event, policyFlags); in clear()
256 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
257 if (!event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)) { in onMotionEvent()
258 super.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
262 checkForMalformedEvent(event); in onMotionEvent()
264 Slog.e(LOG_TAG, "Ignoring malformed event: " + event.toString(), e); in onMotionEvent()
[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 …]
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 …]
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 …]
DMultiTap.java64 protected void onDown(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onDown() argument
65 cancelAfterTapTimeout(event, rawEvent, policyFlags); in onDown()
67 mBaseX = event.getX(); in onDown()
68 mBaseY = event.getY(); in onDown()
71 cancelGesture(event, rawEvent, policyFlags); in onDown()
73 mBaseX = event.getX(); in onDown()
74 mBaseY = event.getY(); in onDown()
80 startGesture(event, rawEvent, policyFlags); in onDown()
85 protected void onUp(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onUp() argument
86 cancelAfterDoubleTapTimeout(event, rawEvent, policyFlags); in onUp()
[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 …]
DMidiEventScheduler.java41 MidiEvent event = createScheduledEvent(msg, offset, count, timestamp); in onSend() local
42 if (event != null) { in onSend()
43 add(event); in onSend()
84 MidiEvent event; in createScheduledEvent() local
86 event = new MidiEvent(msg, offset, count, timestamp); in createScheduledEvent()
88 event = (MidiEvent) removeEventfromPool(); in createScheduledEvent()
89 if (event == null) { in createScheduledEvent()
90 event = new MidiEvent(POOL_EVENT_SIZE); in createScheduledEvent()
92 System.arraycopy(msg, offset, event.data, 0, count); in createScheduledEvent()
93 event.count = count; in createScheduledEvent()
[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/services/usage/java/com/android/server/usage/
DIntervalStats.java110 void addToEventStats(List<EventStats> out, int event, long beginTime, long endTime) { in addToEventStats() argument
113 ev.mEventType = event; in addToEventStats()
163 Event event = new Event(); in buildEvent() local
164 event.mPackage = getCachedStringRef(packageName); in buildEvent()
166 event.mClass = getCachedStringRef(className); in buildEvent()
168 return event; in buildEvent()
177 final Event event = new Event(); in buildEvent() local
181 event.mPackage = getCachedStringRef( in buildEvent()
185 event.mPackage = getCachedStringRef(stringPool.get( in buildEvent()
189 event.mClass = getCachedStringRef( in buildEvent()
[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/av/services/mediametrics/
Dstatsd_codec.cpp48 AStatsEvent* event = AStatsEvent_obtain(); in statsd_codec() local
49 AStatsEvent_setAtomId(event, android::util::MEDIA_CODEC_REPORTED); in statsd_codec()
52 AStatsEvent_writeInt64(event, timestamp_nanos); in statsd_codec()
55 AStatsEvent_writeString(event, package_name.c_str()); in statsd_codec()
58 AStatsEvent_writeInt64(event, package_version_code); in statsd_codec()
61 AStatsEvent_writeInt64(event, media_apex_version); in statsd_codec()
73 AStatsEvent_writeString(event, codec.c_str()); in statsd_codec()
79 AStatsEvent_writeString(event, mime.c_str()); in statsd_codec()
85 AStatsEvent_writeString(event, mode.c_str()); in statsd_codec()
91 AStatsEvent_writeInt32(event, encoder); in statsd_codec()
[all …]
/frameworks/base/core/jni/
Dandroid_view_MotionEvent.cpp77 MotionEvent* event) { in android_view_MotionEvent_setNativePtr() argument
79 reinterpret_cast<jlong>(event)); in android_view_MotionEvent_setNativePtr()
82 jobject android_view_MotionEvent_obtainAsCopy(JNIEnv* env, const MotionEvent* event) { in android_view_MotionEvent_obtainAsCopy() argument
98 destEvent->copyFrom(event, true); in android_view_MotionEvent_obtainAsCopy()
348 std::unique_ptr<MotionEvent> event; in android_view_MotionEvent_nativeInitialize() local
350 event = std::unique_ptr<MotionEvent>(reinterpret_cast<MotionEvent*>(nativePtr)); in android_view_MotionEvent_nativeInitialize()
352 event = std::make_unique<MotionEvent>(); in android_view_MotionEvent_nativeInitialize()
377 event->initialize(InputEvent::nextId(), deviceId, source, displayId, INVALID_HMAC, action, 0, in android_view_MotionEvent_nativeInitialize()
385 return reinterpret_cast<jlong>(event.release()); in android_view_MotionEvent_nativeInitialize()
390 MotionEvent* event = reinterpret_cast<MotionEvent*>(nativePtr); in android_view_MotionEvent_nativeDispose() local
[all …]
Dandroid_view_InputEventSender.cpp60 status_t sendKeyEvent(uint32_t seq, const KeyEvent* event);
61 status_t sendMotionEvent(uint32_t seq, const MotionEvent* event);
116 status_t NativeInputEventSender::sendKeyEvent(uint32_t seq, const KeyEvent* event) { in sendKeyEvent() argument
123 mInputPublisher.publishKeyEvent(publishedSeq, event->getId(), event->getDeviceId(), in sendKeyEvent()
124 event->getSource(), event->getDisplayId(), in sendKeyEvent()
125 event->getHmac(), event->getAction(), event->getFlags(), in sendKeyEvent()
126 event->getKeyCode(), event->getScanCode(), in sendKeyEvent()
127 event->getMetaState(), event->getRepeatCount(), in sendKeyEvent()
128 event->getDownTime(), event->getEventTime()); in sendKeyEvent()
138 status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent* event) { in sendMotionEvent() argument
[all …]
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()
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()
/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/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/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()
109 handleMediaKeyEvent(event); in onKeyDown()
[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/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/services/tests/servicestests/src/com/android/server/display/
DBrightnessTrackerTest.java300 BrightnessChangeEvent event = events.get(0); in testBrightnessEvent() local
301 assertEquals(mInjector.currentTimeMillis(), event.timeStamp); in testBrightnessEvent()
302 assertEquals(displayId, event.uniqueDisplayId); in testBrightnessEvent()
303 assertEquals(1, event.luxValues.length); in testBrightnessEvent()
304 assertEquals(1.0f, event.luxValues[0], FLOAT_DELTA); in testBrightnessEvent()
306 event.luxTimestamps[0]); in testBrightnessEvent()
307 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testBrightnessEvent()
308 assertEquals(DEFAULT_INITIAL_BRIGHTNESS, event.lastBrightness, FLOAT_DELTA); in testBrightnessEvent()
311 assertEquals(Float.NaN, event.batteryLevel, 0.0); in testBrightnessEvent()
312 assertFalse(event.nightMode); in testBrightnessEvent()
[all …]

12345678910>>...52