Home
last modified time | relevance | path

Searched refs:event (Results 1 – 25 of 1284) 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.cpp176 KeyEvent event; in TEST_F() local
181 event.initialize(2, AINPUT_SOURCE_GAMEPAD, DISPLAY_ID, AKEY_EVENT_ACTION_DOWN, in TEST_F()
185 ASSERT_EQ(AINPUT_EVENT_TYPE_KEY, event.getType()); in TEST_F()
186 ASSERT_EQ(2, event.getDeviceId()); in TEST_F()
187 ASSERT_EQ(static_cast<int>(AINPUT_SOURCE_GAMEPAD), event.getSource()); in TEST_F()
188 ASSERT_EQ(DISPLAY_ID, event.getDisplayId()); in TEST_F()
189 ASSERT_EQ(AKEY_EVENT_ACTION_DOWN, event.getAction()); in TEST_F()
190 ASSERT_EQ(AKEY_EVENT_FLAG_FROM_SYSTEM, event.getFlags()); in TEST_F()
191 ASSERT_EQ(AKEYCODE_BUTTON_X, event.getKeyCode()); in TEST_F()
192 ASSERT_EQ(121, event.getScanCode()); in TEST_F()
[all …]
/frameworks/base/cmds/statsd/tests/external/
Dpuller_util_test.cpp51 for (const auto& event : events) { in extractIntoVector() local
53 vec.push_back(event->GetInt(1, &err)); in extractIntoVector()
54 vec.push_back(event->GetInt(2, &err)); in extractIntoVector()
55 vec.push_back(event->GetInt(3, &err)); in extractIntoVector()
62 shared_ptr<LogEvent> event = make_shared<LogEvent>(uidAtomTagId, timestamp); in TEST() local
64 event->write(isolatedUid); in TEST()
65 event->write(hostNonAdditiveData); in TEST()
66 event->write(isolatedAdditiveData); in TEST()
67 event->init(); in TEST()
68 inputData.push_back(event); in TEST()
[all …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DTouchExplorer.java229 MotionEvent event = mReceivedPointerTracker.getLastReceivedEvent(); in clear() local
230 if (event != null) { in clear()
235 private void clear(MotionEvent event, int policyFlags) { in clear() argument
244 sendUpForInjectedDownPointers(event, policyFlags); in clear()
248 sendUpForInjectedDownPointers(event, policyFlags); in clear()
276 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
277 if (!event.isFromSource(InputDevice.SOURCE_TOUCHSCREEN)) { in onMotionEvent()
278 super.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
283 Slog.d(LOG_TAG, "Received event: " + event + ", policyFlags=0x" in onMotionEvent()
290 if (mGestureDetector.onMotionEvent(event, rawEvent, policyFlags)) { in onMotionEvent()
[all …]
DAccessibilityInputFilter.java177 public void onInputEvent(InputEvent event, int policyFlags) { in onInputEvent() argument
179 Slog.d(TAG, "Received event: " + event + ", policyFlags=0x" in onInputEvent()
184 if (DEBUG) Slog.d(TAG, "No mEventHandler for event " + event); in onInputEvent()
185 super.onInputEvent(event, policyFlags); in onInputEvent()
189 EventStreamState state = getEventStreamState(event); in onInputEvent()
191 super.onInputEvent(event, policyFlags); in onInputEvent()
195 int eventSource = event.getSource(); in onInputEvent()
199 super.onInputEvent(event, policyFlags); in onInputEvent()
203 if (state.updateInputSource(event.getSource())) { in onInputEvent()
208 super.onInputEvent(event, policyFlags); in onInputEvent()
[all …]
DMagnificationGestureHandler.java204 public void onMotionEvent(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEvent() argument
206 storeEventInto(mDebugInputEventHistory, event); in onMotionEvent()
208 onMotionEventInternal(event, rawEvent, policyFlags); in onMotionEvent()
214 onMotionEventInternal(event, rawEvent, policyFlags); in onMotionEvent()
218 private void onMotionEventInternal(MotionEvent event, MotionEvent rawEvent, int policyFlags) { in onMotionEventInternal() argument
219 if (DEBUG_ALL) Slog.i(LOG_TAG, "onMotionEvent(" + event + ")"); in onMotionEventInternal()
222 || !event.isFromSource(SOURCE_TOUCHSCREEN)) { in onMotionEventInternal()
223 dispatchTransformedEvent(event, rawEvent, policyFlags); in onMotionEventInternal()
227 handleEventWith(mCurrentState, event, rawEvent, policyFlags); in onMotionEventInternal()
231 MotionEvent event, MotionEvent rawEvent, int policyFlags) { in handleEventWith() argument
[all …]
/frameworks/base/core/java/android/view/textclassifier/
DTextClassificationSession.java73 public void onSelectionEvent(SelectionEvent event) { in onSelectionEvent() argument
75 if (mEventHelper.sanitizeEvent(event)) { in onSelectionEvent()
76 mDelegate.onSelectionEvent(event); in onSelectionEvent()
85 public void onTextClassifierEvent(TextClassifierEvent event) { in onTextClassifierEvent() argument
87 event.mHiddenTempSessionId = mSessionId; in onTextClassifierEvent()
88 mDelegate.onTextClassifierEvent(event); in onTextClassifierEvent()
143 boolean sanitizeEvent(SelectionEvent event) { in sanitizeEvent() argument
144 updateInvocationMethod(event); in sanitizeEvent()
145 modifyAutoSelectionEventType(event); in sanitizeEvent()
147 if (event.getEventType() != SelectionEvent.EVENT_SELECTION_STARTED in sanitizeEvent()
[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.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/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 MotionEvent* event; in android_view_MotionEvent_nativeInitialize() local
350 event = reinterpret_cast<MotionEvent*>(nativePtr); in android_view_MotionEvent_nativeInitialize()
352 event = new MotionEvent(); in android_view_MotionEvent_nativeInitialize()
375 event->initialize(deviceId, source, displayId, action, 0, flags, edgeFlags, metaState, in android_view_MotionEvent_nativeInitialize()
380 return reinterpret_cast<jlong>(event); in android_view_MotionEvent_nativeInitialize()
384 delete event; in android_view_MotionEvent_nativeInitialize()
[all …]
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 event->getDeviceId(), event->getSource(), event->getDisplayId(), event->getAction(), in sendKeyEvent()
118 event->getFlags(), event->getKeyCode(), event->getScanCode(), event->getMetaState(), in sendKeyEvent()
119 event->getRepeatCount(), event->getDownTime(), event->getEventTime()); in sendKeyEvent()
129 status_t NativeInputEventSender::sendMotionEvent(uint32_t seq, const MotionEvent* event) { in sendMotionEvent() argument
135 for (size_t i = 0; i <= event->getHistorySize(); i++) { in sendMotionEvent()
138 event->getDeviceId(), event->getSource(), event->getDisplayId(), in sendMotionEvent()
139 event->getAction(), event->getActionButton(), event->getFlags(), in sendMotionEvent()
[all …]
/frameworks/base/cmds/statsd/tests/
DLogEntryMatcher_test.cpp49 LogEvent event(TAG_ID, 0); in TEST() local
50 EXPECT_TRUE(event.write(11)); in TEST()
51 event.init(); in TEST()
54 EXPECT_TRUE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
58 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
78 LogEvent event(TAG_ID, 0); in TEST() local
79 event.write(attribution_nodes); in TEST()
80 event.write("some value"); in TEST()
82 event.init(); in TEST()
102 EXPECT_FALSE(matchesSimple(uidMap, *simpleMatcher, event)); in TEST()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/
DWifiAwareNativeCallback.java352 public void eventClusterEvent(NanClusterEventInd event) { in eventClusterEvent() argument
354 Log.v(TAG, "eventClusterEvent: eventType=" + event.eventType + ", addr=" in eventClusterEvent()
355 + String.valueOf(HexEncoding.encode(event.addr))); in eventClusterEvent()
359 if (event.eventType == NanClusterEventType.DISCOVERY_MAC_ADDRESS_CHANGED) { in eventClusterEvent()
360 mWifiAwareStateManager.onInterfaceAddressChangeNotification(event.addr); in eventClusterEvent()
361 } else if (event.eventType == NanClusterEventType.STARTED_CLUSTER) { in eventClusterEvent()
363 WifiAwareClientState.CLUSTER_CHANGE_EVENT_STARTED, event.addr); in eventClusterEvent()
364 } else if (event.eventType == NanClusterEventType.JOINED_CLUSTER) { in eventClusterEvent()
366 WifiAwareClientState.CLUSTER_CHANGE_EVENT_JOINED, event.addr); in eventClusterEvent()
368 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/cmds/statsd/tests/e2e/
DAnomaly_count_e2e_test.cpp96 auto event = CreateAcquireWakelockEvent(attributions1, "wl1", bucketStartTimeNs + 2); in TEST() local
97 processor->OnLogEvent(event.get()); in TEST()
100 event = CreateAcquireWakelockEvent(attributions4, "wl2", bucketStartTimeNs + 2); in TEST()
101 processor->OnLogEvent(event.get()); in TEST()
104 event = CreateAcquireWakelockEvent(attributions2, "wl1", bucketStartTimeNs + 3); in TEST()
105 processor->OnLogEvent(event.get()); in TEST()
108 event = CreateAcquireWakelockEvent(attributions5, "wl2", bucketStartTimeNs + 3); in TEST()
109 processor->OnLogEvent(event.get()); in TEST()
112 event = CreateAcquireWakelockEvent(attributions3, "wl1", bucketStartTimeNs + 4); in TEST()
113 processor->OnLogEvent(event.get()); in TEST()
[all …]
/frameworks/base/cmds/statsd/src/external/
DGpuStatsPuller.cpp58 std::shared_ptr<LogEvent> event = make_shared<LogEvent>( in pullGpuStatsGlobalInfo() local
60 if (!event->write(info.driverPackageName)) return false; in pullGpuStatsGlobalInfo()
61 if (!event->write(info.driverVersionName)) return false; in pullGpuStatsGlobalInfo()
62 if (!event->write((int64_t)info.driverVersionCode)) return false; in pullGpuStatsGlobalInfo()
63 if (!event->write(info.driverBuildTime)) return false; in pullGpuStatsGlobalInfo()
64 if (!event->write((int64_t)info.glLoadingCount)) return false; in pullGpuStatsGlobalInfo()
65 if (!event->write((int64_t)info.glLoadingFailureCount)) return false; in pullGpuStatsGlobalInfo()
66 if (!event->write((int64_t)info.vkLoadingCount)) return false; in pullGpuStatsGlobalInfo()
67 if (!event->write((int64_t)info.vkLoadingFailureCount)) return false; in pullGpuStatsGlobalInfo()
68 if (!event->write(info.vulkanVersion)) return false; in pullGpuStatsGlobalInfo()
[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/core/java/com/android/internal/policy/
DPhoneFallbackEventHandler.java65 public void preDispatchKeyEvent(KeyEvent event) { in preDispatchKeyEvent() argument
66 getAudioManager().preDispatchKeyEvent(event, AudioManager.USE_DEFAULT_STREAM_TYPE); in preDispatchKeyEvent()
69 public boolean dispatchKeyEvent(KeyEvent event) { in dispatchKeyEvent() argument
71 final int action = event.getAction(); in dispatchKeyEvent()
72 final int keyCode = event.getKeyCode(); in dispatchKeyEvent()
75 return onKeyDown(keyCode, event); in dispatchKeyEvent()
77 return onKeyUp(keyCode, event); in dispatchKeyEvent()
82 boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
93 handleVolumeKeyEvent(event); in onKeyDown()
115 handleMediaKeyEvent(event); in onKeyDown()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DBrightnessTrackerTest.java258 BrightnessChangeEvent event = events.get(0); in testBrightnessEvent() local
259 assertEquals(mInjector.currentTimeMillis(), event.timeStamp); in testBrightnessEvent()
260 assertEquals(1, event.luxValues.length); in testBrightnessEvent()
261 assertEquals(1.0f, event.luxValues[0], FLOAT_DELTA); in testBrightnessEvent()
263 event.luxTimestamps[0]); in testBrightnessEvent()
264 assertEquals(brightness, event.brightness, FLOAT_DELTA); in testBrightnessEvent()
265 assertEquals(DEFAULT_INITIAL_BRIGHTNESS, event.lastBrightness, FLOAT_DELTA); in testBrightnessEvent()
268 assertEquals(Float.NaN, event.batteryLevel, 0.0); in testBrightnessEvent()
269 assertFalse(event.nightMode); in testBrightnessEvent()
270 assertEquals(mDefaultNightModeColorTemperature, event.colorTemperature); in testBrightnessEvent()
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DIntervalStats.java100 void addToEventStats(List<EventStats> out, int event, long beginTime, long endTime) { in addToEventStats() argument
103 ev.mEventType = event; in addToEventStats()
153 Event event = new Event(); in buildEvent() local
154 event.mPackage = getCachedStringRef(packageName); in buildEvent()
156 event.mClass = getCachedStringRef(className); in buildEvent()
158 return event; in buildEvent()
167 final Event event = new Event(); in buildEvent() local
171 event.mPackage = getCachedStringRef( in buildEvent()
175 event.mPackage = getCachedStringRef(stringPool.get( in buildEvent()
179 event.mClass = getCachedStringRef( in buildEvent()
[all …]
DUserUsageStatsService.java165 void reportEvent(Event event) { in reportEvent() argument
167 Slog.d(TAG, mLogPrefix + "Got usage event for " + event.mPackage in reportEvent()
168 + "[" + event.mTimeStamp + "]: " in reportEvent()
169 + eventToString(event.mEventType)); in reportEvent()
172 if (event.mTimeStamp >= mDailyExpiryDate.getTimeInMillis()) { in reportEvent()
174 rolloverStats(event.mTimeStamp); in reportEvent()
179 final Configuration newFullConfig = event.mConfiguration; in reportEvent()
180 if (event.mEventType == Event.CONFIGURATION_CHANGE in reportEvent()
183 event.mConfiguration = Configuration.generateDelta( in reportEvent()
187 if (event.mEventType != Event.SYSTEM_INTERACTION in reportEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DDoubleTapHelper.java64 public boolean onTouchEvent(MotionEvent event) { in onTouchEvent() argument
65 return onTouchEvent(event, Integer.MAX_VALUE); in onTouchEvent()
68 public boolean onTouchEvent(MotionEvent event, int maxTouchableHeight) { in onTouchEvent() argument
69 int action = event.getActionMasked(); in onTouchEvent()
72 mDownX = event.getX(); in onTouchEvent()
73 mDownY = event.getY(); in onTouchEvent()
80 if (!isWithinTouchSlop(event)) { in onTouchEvent()
86 if (isWithinTouchSlop(event)) { in onTouchEvent()
93 mActivationX = event.getX(); in onTouchEvent()
94 mActivationY = event.getY(); in onTouchEvent()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/classifier/
DClassifierData.java41 public boolean update(MotionEvent event) { in update() argument
45 if (event.getActionMasked() == MotionEvent.ACTION_MOVE in update()
47 && event.getEventTimeNano() - mCurrentStrokes.valueAt(0).getLastEventTimeNano() in update()
53 int action = event.getActionMasked(); in update()
58 for (int i = 0; i < event.getPointerCount(); i++) { in update()
59 int id = event.getPointerId(i); in update()
61 mCurrentStrokes.put(id, new Stroke(event.getEventTimeNano(), mDpi)); in update()
63 mCurrentStrokes.get(id).addPoint(event.getX(i), event.getY(i), in update()
64 event.getEventTimeNano()); in update()
67 || (action == MotionEvent.ACTION_POINTER_UP && i == event.getActionIndex())) { in update()
[all …]

12345678910>>...52