Home
last modified time | relevance | path

Searched refs:handler (Results 1 – 25 of 400) sorted by relevance

12345678910>>...16

/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/scanner/
DWifiScanningServiceTest.java229 private BidirectionalAsyncChannel connectChannel(Handler handler) { in connectChannel() argument
232 handler); in connectChannel() local
238 private static Message verifyHandleMessageAndGetMessage(InOrder order, Handler handler) { in verifyHandleMessageAndGetMessage() argument
240 order.verify(handler).handleMessage(messageCaptor.capture()); in verifyHandleMessageAndGetMessage()
269 private static Message verifyHandleMessageAndGetMessage(InOrder order, Handler handler, in verifyHandleMessageAndGetMessage() argument
273 order.verify(handler).handleMessage(argThat(messageMatcher)); in verifyHandleMessageAndGetMessage()
277 private static void verifyScanResultsReceived(InOrder order, Handler handler, int listenerId, in verifyScanResultsReceived() argument
279 Message scanResultMessage = verifyHandleMessageAndGetMessage(order, handler, in verifyScanResultsReceived()
292 private static void verifySingleScanCompletedReceived(InOrder order, Handler handler, in verifySingleScanCompletedReceived() argument
294 Message completedMessage = verifyHandleMessageAndGetMessage(order, handler, in verifySingleScanCompletedReceived()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/power/
DSilentModeHandlerUnitTest.java67 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testSilentModeHwStateMonitoring() local
70 handler.init(); in testSilentModeHwStateMonitoring()
74 assertSilentMode(handler, /* expectedMode= */ true); in testSilentModeHwStateMonitoring()
78 assertSilentMode(handler, /* expectedMode= */ false); in testSilentModeHwStateMonitoring()
83 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testRebootForForcedSilentMode() local
86 handler.init(); in testRebootForForcedSilentMode()
88 assertWithMessage("Silent mode").that(handler.isSilentMode()).isTrue(); in testRebootForForcedSilentMode()
92 assertWithMessage("Silent mode in forced mode").that(handler.isSilentMode()).isTrue(); in testRebootForForcedSilentMode()
97 SilentModeHandler handler = new SilentModeHandler(mCarPowerManagementService, in testRebootForForcedNonSilentMode() local
100 handler.init(); in testRebootForForcedNonSilentMode()
[all …]
/packages/services/Car/cpp/powerpolicy/server/tests/
DSilentModeHandlerTest.cpp49 bool waitForSilentMode(SilentModeHandler* handler, bool expectedSilentMode) { in waitForSilentMode() argument
52 if (handler->isSilentMode() == expectedSilentMode) { in waitForSilentMode()
69 explicit SilentModeHandlerPeer(SilentModeHandler* handler) : mHandler(handler) {} in SilentModeHandlerPeer() argument
128 SilentModeHandler handler(carPowerPolicyServer.get()); in TEST_F() local
129 internal::SilentModeHandlerPeer handlerPeer(&handler); in TEST_F()
135 ASSERT_TRUE(waitForSilentMode(&handler, /*expectedSilentMode=*/true)) in TEST_F()
140 ASSERT_TRUE(waitForSilentMode(&handler, /*expectedSilentMode=*/false)) in TEST_F()
145 SilentModeHandler handler(carPowerPolicyServer.get()); in TEST_F() local
146 internal::SilentModeHandlerPeer handlerPeer(&handler); in TEST_F()
150 ASSERT_TRUE(handler.isSilentMode()) in TEST_F()
[all …]
DPowerComponentHandlerTest.cpp56 PowerComponentHandlerTest() { handler.init(); } in PowerComponentHandlerTest()
58 PowerComponentHandler handler; member in android::frameworks::automotive::powerpolicy::PowerComponentHandlerTest
62 CarPowerPolicyPtr policy = handler.getAccumulatedPolicy(); in TEST_F()
75 handler.applyPowerPolicy(policy); in TEST_F()
77 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::WIFI)); in TEST_F()
78 ASSERT_TRUE(*handler.getPowerComponentState(PowerComponent::NFC)); in TEST_F()
79 ASSERT_FALSE(*handler.getPowerComponentState(PowerComponent::AUDIO)); in TEST_F()
80 ASSERT_FALSE(*handler.getPowerComponentState(PowerComponent::DISPLAY)); in TEST_F()
108 handler.applyPowerPolicy(policy); in TEST_F()
111 ASSERT_NO_FATAL_FAILURE(assertEqual(expectedPolicy, handler.getAccumulatedPolicy())); in TEST_F()
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dreader.h393 ParseResult Parse(InputStream& is, Handler& handler) { in Parse() argument
395 return IterativeParse<parseFlags>(is, handler); in Parse()
408 ParseValue<parseFlags>(is, handler); in Parse()
432 ParseResult Parse(InputStream& is, Handler& handler) { in Parse() argument
433 return Parse<kParseDefaultFlags>(is, handler); in Parse()
467 void ParseObject(InputStream& is, Handler& handler) { in ParseObject() argument
471 if (!handler.StartObject()) in ParseObject()
478 if (!handler.EndObject(0)) // empty object in ParseObject()
487 ParseString<parseFlags>(is, handler, true); in ParseObject()
497 ParseValue<parseFlags>(is, handler); in ParseObject()
[all …]
/packages/modules/adb/fdevent/
Dfdevent_test.cpp55 FdHandler* handler = reinterpret_cast<FdHandler*>(userdata); in FdEventCallback() local
58 ASSERT_EQ(fd, handler->read_fd_); in FdEventCallback()
61 handler->queue_.push(c); in FdEventCallback()
62 fdevent_add(handler->write_fde_, FDE_WRITE); in FdEventCallback()
65 ASSERT_EQ(fd, handler->write_fd_); in FdEventCallback()
66 ASSERT_FALSE(handler->queue_.empty()); in FdEventCallback()
67 char c = handler->queue_.front(); in FdEventCallback()
68 handler->queue_.pop(); in FdEventCallback()
70 if (handler->queue_.empty()) { in FdEventCallback()
71 fdevent_del(handler->write_fde_, FDE_WRITE); in FdEventCallback()
[all …]
/packages/apps/Test/connectivity/sl4n/rapidjson/test/unittest/
Dreadertest.cpp1066 BaseReaderHandler<> handler; \
1068 reader.Parse<kParseIterativeFlag>(json, handler); \
1164 IterativeParsingReaderHandler<> handler; in TEST() local
1166 ParseResult r = reader.Parse<kParseIterativeFlag>(is, handler); in TEST()
1172 handler.LOG_STARTARRAY, in TEST()
1173 handler.LOG_INT, in TEST()
1174 handler.LOG_STARTOBJECT, in TEST()
1175 handler.LOG_KEY, in TEST()
1176 handler.LOG_STARTARRAY, in TEST()
1177 handler.LOG_INT, in TEST()
[all …]
/packages/services/Car/vehicle-hal-support-lib/test/com/android/car/vehiclehal/test/
DMockedVehicleHal.java69 VehicleHalPropertyHandler handler) { in addProperty() argument
70 mPropertyHandlerMap.put(config.prop, handler); in addProperty()
103 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(value.prop); in injectEvent() local
104 if (handler != null) { in injectEvent()
105 handler.onPropertySet(value); in injectEvent()
158 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(requestedPropValue.prop); in get() local
159 if (handler == null) { in get()
162 cb.onValues(StatusCode.OK, handler.onPropertyGet(requestedPropValue)); in get()
168 VehicleHalPropertyHandler handler = mPropertyHandlerMap.get(propValue.prop); in set() local
169 if (handler == null) { in set()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DConsumers.java38 public static <A> void consumeAsync(Handler handler, in consumeAsync() argument
40 if (handler == null) { in consumeAsync()
43 handler.post(new Runnable() { in consumeAsync()
51 public static <A extends QuietlyCloseable> void consumeCloseableAsync(Handler handler, in consumeCloseableAsync() argument
53 if (handler == null) { in consumeCloseableAsync()
56 handler.post(new Runnable() { in consumeCloseableAsync()
65 final Handler handler, final Consumer<A> consumer) { in createAsyncConsumer() argument
68 consumeAsync(handler, consumer, value); in createAsyncConsumer()
75 final Handler handler, final Consumer<A> consumer) {
78 consumeCloseableAsync(handler, consumer, value);
/packages/services/Car/car-lib/src/android/car/
DCarBugreportManager.java117 Handler handler) { in CarBugreportManagerCallbackWrapper() argument
119 mWeakHandler = new WeakReference<>(handler); in CarBugreportManagerCallbackWrapper()
125 Handler handler = mWeakHandler.get(); in onProgress() local
126 if (handler != null && callback != null) { in onProgress()
127 handler.post(() -> callback.onProgress(progress)); in onProgress()
134 Handler handler = mWeakHandler.get(); in onError() local
135 if (handler != null && callback != null) { in onError()
136 handler.post(() -> callback.onError(errorCode)); in onError()
143 Handler handler = mWeakHandler.get(); in onFinished() local
144 if (handler != null && callback != null) { in onFinished()
[all …]
/packages/services/Car/cpp/watchdog/server/src/
DLooperWrapper.cpp43 void LooperWrapper::sendMessage(const sp<MessageHandler>& handler, const Message& message) { in sendMessage() argument
48 return mLooper->sendMessage(handler, message); in sendMessage()
51 void LooperWrapper::sendMessageAtTime(nsecs_t uptime, const sp<MessageHandler>& handler, in sendMessageAtTime() argument
57 return mLooper->sendMessageAtTime(uptime, handler, message); in sendMessageAtTime()
60 void LooperWrapper::removeMessages(const sp<MessageHandler>& handler) { in removeMessages() argument
65 return mLooper->removeMessages(handler); in removeMessages()
68 void LooperWrapper::removeMessages(const android::sp<MessageHandler>& handler, int what) { in removeMessages() argument
73 return mLooper->removeMessages(handler, what); in removeMessages()
/packages/modules/Connectivity/tests/unit/java/android/net/
DConnectivityManagerTest.java224 Handler handler = new Handler(Looper.getMainLooper()); in testCallbackRelease() local
230 manager.requestNetwork(request, callback, handler); in testCallbackRelease()
253 Handler handler = new Handler(Looper.getMainLooper()); in testCallbackRecycling() local
259 manager.requestNetwork(req1, callback, handler); in testCallbackRecycling()
277 manager.requestNetwork(req2, callback, handler); in testCallbackRecycling()
302 Handler handler = new Handler(Looper.getMainLooper()); in noDoubleCallbackRegistration() local
303 manager.requestNetwork(request, callback, handler); in noDoubleCallbackRegistration()
322 Handler handler = mock(Handler.class); in testArgumentValidation() local
332 mustFail(() -> manager.requestBackgroundNetwork(null, callback, handler)); in testArgumentValidation()
333 mustFail(() -> manager.requestBackgroundNetwork(request, null, handler)); in testArgumentValidation()
[all …]
/packages/services/Car/cpp/watchdog/server/tests/
DLooperStub.cpp72 void LooperStub::sendMessage(const android::sp<MessageHandler>& handler, const Message& message) { in sendMessage() argument
73 sendMessageAtTime(now(), handler, message); in sendMessage()
76 void LooperStub::sendMessageAtTime(nsecs_t uptime, const android::sp<MessageHandler>& handler, in sendMessageAtTime() argument
79 mHandler = handler; in sendMessageAtTime()
88 void LooperStub::removeMessages(const android::sp<MessageHandler>& handler) { in removeMessages() argument
91 mLooper->removeMessages(handler); in removeMessages()
94 void LooperStub::removeMessages(const android::sp<MessageHandler>& handler, int what) { in removeMessages() argument
105 mLooper->removeMessages(handler, what); in removeMessages()
/packages/services/Car/tests/GarageModeTestApp/src/com/google/android/car/garagemode/testapp/
DDishService.java89 DishWasherTask(Handler handler, JobParameters jobParameters, int dishNum) { in DishWasherTask() argument
90 mHandler = new WeakReference<Handler>(handler); in DishWasherTask()
111 final Handler handler = mHandler.get(); in onPostExecute() local
112 if (handler == null) { in onPostExecute()
116 Message msg = handler.obtainMessage(MSG_RUN_JOB, mMyDishNum + 1, 0, mJobParameter); in onPostExecute()
117 handler.sendMessageDelayed(msg, DELAY_MS); in onPostExecute()
119 Message msg = handler.obtainMessage(MSG_FINISHED, 0, 0, mJobParameter); in onPostExecute()
120 handler.sendMessage(msg); in onPostExecute()
/packages/apps/Camera2/src/com/android/camera/one/v2/camera2proxy/
DAndroidCameraCaptureSessionProxy.java96 public int capture(CaptureRequest request, CaptureCallback listener, Handler handler) in capture() argument
99 return mSession.capture(request, new AndroidCaptureCallback(listener), handler); in capture()
106 … public int captureBurst(List<CaptureRequest> requests, CaptureCallback listener, Handler handler) in captureBurst() argument
109 return mSession.captureBurst(requests, new AndroidCaptureCallback(listener), handler); in captureBurst()
127 Handler handler) throws CameraAccessException, CameraCaptureSessionClosedException { in setRepeatingBurst() argument
129 … return mSession.setRepeatingBurst(requests, new AndroidCaptureCallback(listener), handler); in setRepeatingBurst()
136 … public int setRepeatingRequest(CaptureRequest request, CaptureCallback listener, Handler handler) in setRepeatingRequest() argument
140 handler); in setRepeatingRequest()
/packages/apps/Dialer/java/com/android/incallui/legacyblocking/
DBlockedNumberContentObserver.java44 @NonNull private final Handler handler; field in BlockedNumberContentObserver
65 @NonNull Context context, @NonNull Handler handler, String number, long timeAddedMillis) { in BlockedNumberContentObserver() argument
66 super(handler); in BlockedNumberContentObserver()
68 this.handler = Objects.requireNonNull(handler); in BlockedNumberContentObserver()
100 handler.postDelayed(timeoutRunnable, TIMEOUT_MS); in register()
108 handler.removeCallbacks(timeoutRunnable); in unregister()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DHalDeviceManager.java119 public HalDeviceManager(Clock clock, WifiInjector wifiInjector, Handler handler) { in HalDeviceManager() argument
122 mEventHandler = handler; in HalDeviceManager()
163 @Nullable Handler handler) { in registerStatusListener() argument
165 if (!mManagerStatusListeners.add(new ManagerStatusListenerProxy(listener, handler))) { in registerStatusListener()
268 @Nullable InterfaceDestroyedListener destroyedListener, @Nullable Handler handler, in createStaIface() argument
271 destroyedListener, handler, requestorWs); in createStaIface()
289 @Nullable InterfaceDestroyedListener destroyedListener, @Nullable Handler handler, in createStaIface() argument
292 destroyedListener, handler, requestorWs); in createStaIface()
300 @Nullable InterfaceDestroyedListener destroyedListener, @Nullable Handler handler, in createApIface() argument
304 handler, requestorWs); in createApIface()
[all …]
DWifiMonitor.java150 public synchronized void registerHandler(String iface, int what, Handler handler) { in registerHandler() argument
161 ifaceWhatHandlers.add(handler); in registerHandler()
170 public synchronized void deregisterHandler(String iface, int what, Handler handler) { in deregisterHandler() argument
179 ifaceWhatHandlers.remove(handler); in deregisterHandler()
256 for (Handler handler : ifaceWhatHandlers) { in sendMessage()
257 if (handler != null) { in sendMessage()
258 sendMessage(iface, handler, Message.obtain(message)); in sendMessage()
276 for (Handler handler : ifaceWhatHandlers) { in sendMessage()
277 if (handler != null) { in sendMessage()
278 sendMessage(iface, handler, Message.obtain(message)); in sendMessage()
[all …]
DWifiThreadRunner.java52 public WifiThreadRunner(Handler handler) { in WifiThreadRunner() argument
53 mHandler = handler; in WifiThreadRunner()
225 private boolean runWithScissors(@NonNull Handler handler, @NonNull Runnable r, in runWithScissors() argument
234 if (Looper.myLooper() == handler.getLooper()) { in runWithScissors()
245 return br.postAndWait(handler, timeout); in runWithScissors()
268 public boolean postAndWait(Handler handler, long timeout) { in postAndWait() argument
269 if (!handler.post(this)) { in postAndWait()
/packages/apps/Dialer/java/com/android/dialer/util/
DSettingsUtil.java46 Context context, Handler handler, int type, String key, int msg) { in updateRingtoneName() argument
72 getRingtoneName(context, handler, ringtoneUri, msg, defaultRingtone); in updateRingtoneName()
75 public static void getRingtoneName(Context context, Handler handler, Uri ringtoneUri, int msg) { in getRingtoneName() argument
76 getRingtoneName(context, handler, ringtoneUri, msg, false); in getRingtoneName()
80 Context context, Handler handler, Uri ringtoneUri, int msg, boolean defaultRingtone) { in getRingtoneName() argument
102 handler.sendMessage(handler.obtainMessage(msg, summary)); in getRingtoneName()
/packages/services/Car/cpp/evs/manager/1.1/stats/
DLooperWrapper.cpp47 void LooperWrapper::sendMessage(const sp<MessageHandler>& handler, in sendMessage() argument
54 return mLooper->sendMessage(handler, message); in sendMessage()
58 const sp<MessageHandler>& handler, in sendMessageAtTime() argument
65 return mLooper->sendMessageAtTime(uptime, handler, message); in sendMessageAtTime()
68 void LooperWrapper::removeMessages(const sp<MessageHandler>& handler) { in removeMessages() argument
74 return mLooper->removeMessages(handler); in removeMessages()
/packages/modules/Wifi/service/java/com/android/server/wifi/scanner/
DWifiScanningServiceImpl.java578 void addRequest(ClientInfo ci, int handler, WorkSource reqworkSource, T settings) { in addRequest() argument
579 add(new RequestInfo<T>(ci, handler, reqworkSource, settings)); in addRequest()
859 int handler = msg.arg2; in handleScanStartMessage() local
862 logCallback("singleScanInvalidRequest", ci, handler, "null params"); in handleScanStartMessage()
877 logCallback("singleScanInvalidRequest", ci, handler, in handleScanStartMessage()
883 if (validateScanRequest(ci, handler, scanSettings)) { in handleScanStartMessage()
893 logScanRequest("addSingleScanRequest", ci, handler, workSource, in handleScanStartMessage()
908 mActiveScans.addRequest(ci, handler, workSource, scanSettings); in handleScanStartMessage()
910 mPendingScans.addRequest(ci, handler, workSource, scanSettings); in handleScanStartMessage()
916 mPendingScans.addRequest(ci, handler, workSource, scanSettings); in handleScanStartMessage()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/p2p/
DWifiP2pMonitor.java93 public synchronized void registerHandler(String iface, int what, Handler handler) { in registerHandler() argument
104 ifaceWhatHandlers.add(handler); in registerHandler()
183 for (Handler handler : ifaceWhatHandlers) { in sendMessage()
184 if (handler != null) { in sendMessage()
185 sendMessage(handler, Message.obtain(message)); in sendMessage()
201 for (Handler handler : ifaceWhatHandlers) { in sendMessage()
202 if (handler != null) { in sendMessage()
203 sendMessage(handler, Message.obtain(message)); in sendMessage()
213 private void sendMessage(Handler handler, Message message) { in sendMessage() argument
214 message.setTarget(handler); in sendMessage()
/packages/modules/NetworkStack/apishim/31/com/android/networkstack/apishim/api31/
DConnectivityManagerShimImpl.java63 @NonNull NetworkCallback networkCallback, @NonNull Handler handler) { in requestBackgroundNetwork() argument
64 mCm.requestBackgroundNetwork(request, networkCallback, handler); in requestBackgroundNetwork()
72 @NonNull NetworkCallback networkCallback, @NonNull Handler handler) { in registerSystemDefaultNetworkCallback() argument
73 mCm.registerSystemDefaultNetworkCallback(networkCallback, handler); in registerSystemDefaultNetworkCallback()
81 int uid, @NonNull NetworkCallback networkCallback, @NonNull Handler handler) { in registerDefaultNetworkCallbackForUid() argument
82 mCm.registerDefaultNetworkCallbackForUid(uid, networkCallback, handler); in registerDefaultNetworkCallbackForUid()
/packages/apps/Test/connectivity/sl4n/rapidjson/doc/
Dsax.md11 …stream, it analyze the characters according to the syntax of JSON, and publish events to a handler.
27 While a `Reader` parses this JSON, it publishes the following events to the handler sequentially:
87 MyHandler handler;
90 reader.Parse(ss, handler);
94 Note that, RapidJSON uses template to statically bind the `Reader` type and the handler type, inste…
98 …le showed, user needs to implement a handler, which consumes the events (function calls) from `Rea…
124 …n happens, `strlen(str) < length`. The last `copy` indicates whether the handler needs to make a c…
126 …berCount)`. Note that the `memberCount` parameter is just an aid for the handler, user may not nee…
128 …all `EndArray(SizeType elementCount)`, the parameter `elementCount` is just an aid for the handler.
130 Every handler functions returns a `bool`. Normally it should returns `true`. If the handler encount…
[all …]

12345678910>>...16