Home
last modified time | relevance | path

Searched refs:listener (Results 1 – 25 of 1280) sorted by relevance

12345678910>>...52

/packages/modules/Wifi/framework/java/android/net/wifi/p2p/
DWifiP2pManager.java927 Object listener = getListener(message.arg2); in handleMessage() local
959 if (listener != null) { in handleMessage()
960 ((ActionListener) listener).onFailure(message.arg1); in handleMessage()
987 if (listener != null) { in handleMessage()
988 ((ActionListener) listener).onSuccess(); in handleMessage()
993 if (listener != null) { in handleMessage()
994 ((PeerListListener) listener).onPeersAvailable(peers); in handleMessage()
999 if (listener != null) { in handleMessage()
1000 … ((ConnectionInfoListener) listener).onConnectionInfoAvailable(wifiP2pInfo); in handleMessage()
1005 if (listener != null) { in handleMessage()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/
DMainFragmentTest.java67 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateConnectivity_NoNetwork() local
68 mMainFragment.mConnectivityListener = listener; in testUpdateConnectivity_NoNetwork()
70 doReturn(false).when(listener).isEthernetAvailable(); in testUpdateConnectivity_NoNetwork()
71 doReturn(false).when(listener).isCellConnected(); in testUpdateConnectivity_NoNetwork()
72 doReturn(false).when(listener).isEthernetConnected(); in testUpdateConnectivity_NoNetwork()
73 doReturn(false).when(listener).isWifiEnabledOrEnabling(); in testUpdateConnectivity_NoNetwork()
84 final ConnectivityListener listener = mock(ConnectivityListener.class); in testUpdateConnectivity_hasEthernet() local
85 mMainFragment.mConnectivityListener = listener; in testUpdateConnectivity_hasEthernet()
87 doReturn(true).when(listener).isEthernetAvailable(); in testUpdateConnectivity_hasEthernet()
88 doReturn(false).when(listener).isCellConnected(); in testUpdateConnectivity_hasEthernet()
[all …]
/packages/modules/NetworkStack/src/com/android/server/connectivity/ipmemorystore/
DIpMemoryStoreService.java169 @Nullable final IOnStatusListener listener) { in storeNetworkAttributes() argument
179 if (null != listener) listener.onComplete(makeStatus(code)); in storeNetworkAttributes()
200 @Nullable final IOnStatusListener listener) { in storeBlob() argument
206 if (null != listener) listener.onComplete(makeStatus(code)); in storeBlob()
267 @Nullable final IOnL2KeyResponseListener listener) { in findL2Key() argument
268 if (null == listener) return; in findL2Key()
272 listener.onL2KeyResponse(makeStatus(ERROR_ILLEGAL_ARGUMENT), null); in findL2Key()
276 listener.onL2KeyResponse(makeStatus(ERROR_ILLEGAL_ARGUMENT), null); in findL2Key()
281 listener.onL2KeyResponse(makeStatus(SUCCESS), key); in findL2Key()
299 @Nullable final IOnSameL3NetworkResponseListener listener) { in isSameNetwork() argument
[all …]
/packages/modules/NetworkStack/common/networkstackclient/src/android/net/
DIpMemoryStoreClient.java89 @Nullable final OnStatusListener listener) { in storeNetworkAttributes() argument
93 OnStatusListener.toAIDL(listener)))); in storeNetworkAttributes()
95 if (null == listener) return; in storeNetworkAttributes()
97 () -> listener.onComplete(new Status(Status.ERROR_UNKNOWN))); in storeNetworkAttributes()
114 @Nullable final OnStatusListener listener) { in storeBlob() argument
118 OnStatusListener.toAIDL(listener)))); in storeBlob()
120 if (null == listener) return; in storeBlob()
122 () -> listener.onComplete(new Status(Status.ERROR_UNKNOWN))); in storeBlob()
141 @NonNull final OnL2KeyResponseListener listener) { in findL2Key() argument
145 OnL2KeyResponseListener.toAIDL(listener)))); in findL2Key()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/testapi/
DBlockingUserLifecycleListenerTest.java67 BlockingUserLifecycleListener listener = BlockingUserLifecycleListener.forAnyEvent() in testForAnyEvent_invalidMethods() local
70 assertThrows(IllegalStateException.class, () -> listener.waitForEvents()); in testForAnyEvent_invalidMethods()
71 assertThrows(IllegalStateException.class, () -> listener.getAllReceivedEvents()); in testForAnyEvent_invalidMethods()
76 BlockingUserLifecycleListener listener = BlockingUserLifecycleListener.forAnyEvent() in testForAnyEvent_timesout() local
79 assertThrows(IllegalStateException.class, () -> listener.waitForAnyEvent()); in testForAnyEvent_timesout()
84 BlockingUserLifecycleListener listener = BlockingUserLifecycleListener.forAnyEvent() in testForAnyEvent_ok() local
86 sendAsyncEvents(listener, 10, USER_LIFECYCLE_EVENT_TYPE_UNLOCKED); in testForAnyEvent_ok()
88 UserLifecycleEvent event = listener.waitForAnyEvent(); in testForAnyEvent_ok()
94 BlockingUserLifecycleListener listener = BlockingUserLifecycleListener.forSpecificEvents() in testForSpecificEvents_invalidMethods() local
97 assertThrows(IllegalStateException.class, () -> listener.waitForAnyEvent()); in testForSpecificEvents_invalidMethods()
[all …]
/packages/apps/Camera2/src/com/android/camera/session/
DCaptureSessionManagerImpl.java74 for (SessionListener listener : mTaskListeners) { in notifyTaskQueued()
75 listener.onSessionQueued(uri); in notifyTaskQueued()
92 for (SessionListener listener : mTaskListeners) { in notifyTaskDone()
93 listener.onSessionDone(uri); in notifyTaskDone()
112 for (SessionListener listener : mTaskListeners) { in notifyTaskFailed()
113 listener.onSessionFailed(uri, failureMessageId, removeFromFilmstrip); in notifyTaskFailed()
127 for (SessionListener listener : mTaskListeners) { in notifyTaskCanceled()
128 listener.onSessionCanceled(uri); in notifyTaskCanceled()
146 for (SessionListener listener : mTaskListeners) { in notifyTaskProgress()
147 listener.onSessionProgress(uri, progressPercent); in notifyTaskProgress()
[all …]
/packages/modules/DnsResolver/
DResolverEventReporter.cpp46 int ResolverEventReporter::addListener(const std::shared_ptr<INetdEventListener>& listener) { in addListener() argument
47 return addListenerImpl(listener); in addListener()
51 const std::shared_ptr<IDnsResolverUnsolicitedEventListener>& listener) { in addUnsolEventListener() argument
52 return addUnsolEventListenerImpl(listener); in addUnsolEventListener()
68 std::shared_ptr<INetdEventListener> listener = INetdEventListener::fromBinder(binder); in addDefaultListener() local
70 if (listener == nullptr) return; in addDefaultListener()
72 if (!addListenerImplLocked(listener)) added = true; in addDefaultListener()
108 int ResolverEventReporter::addListenerImpl(const std::shared_ptr<INetdEventListener>& listener) { in addListenerImpl() argument
110 return addListenerImplLocked(listener); in addListenerImpl()
114 const std::shared_ptr<INetdEventListener>& listener) { in addListenerImplLocked() argument
[all …]
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/
DAlertDialogBuilder.java265 final DialogInterface.OnClickListener listener) { in setPositiveButton() argument
266 mBuilder.setPositiveButton(textId, listener); in setPositiveButton()
279 final DialogInterface.OnClickListener listener) { in setPositiveButton() argument
280 mBuilder.setPositiveButton(text, listener); in setPositiveButton()
293 final DialogInterface.OnClickListener listener) { in setNegativeButton() argument
294 mBuilder.setNegativeButton(textId, listener); in setNegativeButton()
307 final DialogInterface.OnClickListener listener) { in setNegativeButton() argument
308 mBuilder.setNegativeButton(text, listener); in setNegativeButton()
321 final DialogInterface.OnClickListener listener) { in setNeutralButton() argument
322 mBuilder.setNeutralButton(textId, listener); in setNeutralButton()
[all …]
/packages/modules/adb/
Dadb_listeners.cpp96 alistener* listener = reinterpret_cast<alistener*>(_l); in listener_event_func() local
106 s->transport = listener->transport; in listener_event_func()
107 connect_to_remote(s, listener->connect_to); in listener_event_func()
181 auto pred = [](const std::unique_ptr<alistener>& listener) { in close_smartsockets() argument
182 return listener->local_name == "*smartsocket*"; in close_smartsockets()
216 auto listener = std::make_unique<alistener>(local_name, connect_to); in install_listener() local
219 listener->fd = socket_spec_listen(listener->local_name, error, &resolved); in install_listener()
220 if (listener->fd < 0) { in install_listener()
226 listener->local_name = android::base::StringPrintf("tcp:%d", resolved); in install_listener()
232 close_on_exec(listener->fd); in install_listener()
[all …]
/packages/apps/Dialer/java/com/android/dialer/blocking/
DFilteredNumberAsyncQueryHandler.java91 void hasBlockedNumbers(final OnHasBlockedNumbersListener listener) { in hasBlockedNumbers() argument
93 listener.onHasBlockedNumbers(false); in hasBlockedNumbers()
101 listener.onHasBlockedNumbers(cursor != null && cursor.getCount() > 0); in hasBlockedNumbers()
119 final OnCheckBlockedListener listener, @Nullable final String number, String countryIso) { in isBlockedNumber() argument
121 listener.onCheckComplete(INVALID_ID); in isBlockedNumber()
125 listener.onCheckComplete(null); in isBlockedNumber()
130 if (listener == null) { in isBlockedNumber()
136 listener.onCheckComplete(cachedId); in isBlockedNumber()
144 listener.onCheckComplete(INVALID_ID); in isBlockedNumber()
151 listener.onCheckComplete(INVALID_ID); in isBlockedNumber()
[all …]
/packages/modules/Wifi/service/java/com/android/server/wifi/
DClientModeImplMonitor.java37 public void registerListener(@NonNull ClientModeImplListener listener) { in registerListener() argument
38 mListeners.add(listener); in registerListener()
42 public void unregisterListener(@NonNull ClientModeImplListener listener) { in unregisterListener() argument
43 mListeners.remove(listener); in unregisterListener()
48 for (ClientModeImplListener listener : mListeners) { in onL2Connected()
49 listener.onL2Connected(clientModeManager); in onL2Connected()
56 for (ClientModeImplListener listener : mListeners) { in onL3Connected()
57 listener.onL3Connected(clientModeManager); in onL3Connected()
63 for (ClientModeImplListener listener : mListeners) { in onInternetValidated()
64 listener.onInternetValidated(clientModeManager); in onInternetValidated()
[all …]
/packages/modules/Wifi/framework/java/android/net/wifi/
DWifiScanner.java1090 @NonNull ScanListener listener) { in registerScanListener() argument
1092 Objects.requireNonNull(listener, "listener cannot be null"); in registerScanListener()
1093 int key = addListener(listener, executor); in registerScanListener()
1105 public void registerScanListener(@NonNull ScanListener listener) { in registerScanListener() argument
1106 registerScanListener(new SynchronousExecutor(), listener); in registerScanListener()
1114 public void unregisterScanListener(@NonNull ScanListener listener) { in unregisterScanListener() argument
1115 Objects.requireNonNull(listener, "listener cannot be null"); in unregisterScanListener()
1116 int key = removeListener(listener); in unregisterScanListener()
1130 public void startBackgroundScan(ScanSettings settings, ScanListener listener) { in startBackgroundScan() argument
1131 startBackgroundScan(settings, listener, null); in startBackgroundScan()
[all …]
/packages/modules/Connectivity/Tethering/src/com/android/networkstack/tethering/
DTetheringService.java107 IIntResultListener listener) { in tether() argument
108 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in tether()
110 mTethering.tether(iface, IpServer.STATE_TETHERED, listener); in tether()
115 IIntResultListener listener) { in untether() argument
116 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in untether()
118 mTethering.untether(iface, listener); in untether()
123 IIntResultListener listener) { in setUsbTethering() argument
124 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in setUsbTethering()
126 mTethering.setUsbTethering(enable, listener); in setUsbTethering()
131 String callingAttributionTag, IIntResultListener listener) { in startTethering() argument
[all …]
/packages/services/Car/tools/emulator/
Ddriving_info_generator.py110 def _generateFrame(self, listener): argument
114listener.handle(c.VEHICLEPROPERTY_PERF_VEHICLE_SPEED, 0, self.speedInMps, "PERF_VEHICLE_SPEED")
115 listener.handle(c.VEHICLEPROPERTY_ENGINE_RPM, 0, self.rpm, "ENGINE_RPM")
116 listener.handle(c.VEHICLEPROPERTY_PERF_ODOMETER, 0, self.odometerInKm, "PERF_ODOMETER")
117 listener.handle(c.VEHICLEPROPERTY_CURRENT_GEAR, 0, self.currentGear, "CURRENT_GEAR")
118 listener.handle(c.VEHICLEPROPERTY_OBD2_LIVE_FRAME, 0,
137 def _generateFromGpxFrame(self, gpxFrame, listener): argument
164 self._generateFrame(listener)
180 def _generateInReverseMode(self, duration, listener): argument
182 listener.handle(c.VEHICLEPROPERTY_GEAR_SELECTION, 0, c.VEHICLEGEAR_GEAR_REVERSE,
[all …]
Duser_action_generator.py124 def _adjustContinuousProperty(self, prop, begin, end, listener): argument
140 listener.handle(prop, area, value, propDesc[prop])
143 def _setProperty(self, prop, value, listener): argument
149 listener.handle(prop, area, value, propDesc[prop])
164 def generate(self, listener): argument
170 listener.handle(c.VEHICLEPROPERTY_HVAC_POWER_ON, c.VEHICLEAREASEAT_ROW_1_LEFT,
172 listener.handle(c.VEHICLEPROPERTY_HVAC_POWER_ON, c.VEHICLEAREASEAT_ROW_1_RIGHT,
178 self._setProperty(c.VEHICLEPROPERTY_HVAC_AC_ON, 1, listener)
182 c.VEHICLEHVACFANDIRECTION_FACE, listener)
186 MAX_TEMPERATURE_C, MIN_TEMPERATURE_C, listener)
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarDrivingRestrictionsTest.java92 DrivingStateListener listener = new DrivingStateListener(); in testDrivingStateChange() local
93 mCarDrivingStateManager.registerListener(listener); in testDrivingStateChange()
94 mCarUxRManager.registerListener(listener); in testDrivingStateChange()
96 listener.reset(); in testDrivingStateChange()
104 drivingEvent = listener.waitForDrivingStateChange(); in testDrivingStateChange()
117 listener.reset(); in testDrivingStateChange()
124 drivingEvent = listener.waitForDrivingStateChange(); in testDrivingStateChange()
129 listener.reset(); in testDrivingStateChange()
136 drivingEvent = listener.waitForDrivingStateChange(); in testDrivingStateChange()
139 restrictions = listener.waitForUxRestrictionsChange(); in testDrivingStateChange()
[all …]
DCarDiagnosticManagerTest.java292 Listener listener = new Listener(); in testLiveFrameEvent() local
294 listener, in testLiveFrameEvent()
298 listener.reset(); in testLiveFrameEvent()
304 assertTrue(listener.waitForEvent(time)); in testLiveFrameEvent()
306 CarDiagnosticEvent liveFrame = listener.getLastEvent(); in testLiveFrameEvent()
316 Listener listener = new Listener(); in testMissingSensorRead() local
318 listener, in testMissingSensorRead()
323 assertTrue(listener.waitForEvent()); in testMissingSensorRead()
325 CarDiagnosticEvent liveFrame = listener.getLastEvent(); in testMissingSensorRead()
350 Listener listener = new Listener(); in testFuelSystemStatus() local
[all …]
DCarSensorManagerTest.java151 SensorListener listener = new SensorListener(); in testEvents() local
152 mCarSensorManager.registerListener(listener, in testEvents()
161 listener.waitForSensorChange(); in testEvents()
162 listener.reset(); in testEvents()
170 assertTrue(listener.waitForSensorChange(51L)); in testEvents()
173 assertEquals(listener.getLastEvent().sensorType, in testEvents()
177 data = listener.getLastEvent().getParkingBrakeData(data); in testEvents()
188 listener.reset(); in testEvents()
195 assertTrue(listener.waitForSensorChange(1001)); in testEvents()
198 assertEquals(listener.getLastEvent().sensorType, in testEvents()
[all …]
/packages/apps/Settings/src/com/android/settings/network/telephony/
DBaseDialogFragment.java48 @Nullable Fragment listener, in setListener() argument
52 checkValidity(activity, listener, callbackInterfaceClass); in setListener()
54 if (listener != null && listener.getParentFragment() != null) { in setListener()
58 if (listener != null) { in setListener()
59 arguments.putString(ARG_LISTENER_TAG, listener.getTag()); in setListener()
70 Object listener; in getListener() local
73 listener = getActivity(); in getListener()
75 listener = getActivity().getFragmentManager().findFragmentByTag(listenerTag); in getListener()
77 if (callbackInterfaceClass.isInstance(listener)) { in getListener()
78 return (T) listener; in getListener()
[all …]
/packages/apps/Car/libs/car-ui-lib/car-ui-lib/src/main/java/com/android/car/ui/toolbar/
DToolbarControllerAdapterV1.java105 for (OnBackListener listener : mDeprecatedBackListeners) { in ToolbarControllerAdapterV1()
106 handled |= listener.onBack(); in ToolbarControllerAdapterV1()
108 for (Supplier<Boolean> listener : mBackListeners) { in ToolbarControllerAdapterV1()
109 handled |= listener.get(); in ToolbarControllerAdapterV1()
117 for (OnSearchListener listener : mDeprecatedSearchListeners) { in ToolbarControllerAdapterV1()
118 listener.onSearch(query); in ToolbarControllerAdapterV1()
120 for (Consumer<String> listener : mSearchListeners) { in ToolbarControllerAdapterV1()
121 listener.accept(query); in ToolbarControllerAdapterV1()
125 for (OnSearchCompletedListener listener : mDeprecatedSearchCompletedListeners) { in ToolbarControllerAdapterV1()
126 listener.onSearchCompleted(); in ToolbarControllerAdapterV1()
[all …]
/packages/apps/Dialer/java/com/android/dialer/database/
DCallLogQueryHandler.java68 private final WeakReference<Listener> listener; field in CallLogQueryHandler
72 public CallLogQueryHandler(Context context, ContentResolver contentResolver, Listener listener) { in CallLogQueryHandler() argument
73 this(context, contentResolver, listener, -1); in CallLogQueryHandler()
77 Context context, ContentResolver contentResolver, Listener listener, int limit) { in CallLogQueryHandler() argument
80 this.listener = new WeakReference<>(listener); in CallLogQueryHandler()
290 final Listener listener = this.listener.get(); in updateAdapterData() local
291 return listener != null && listener.onCallsFetched(cursor); in updateAdapterData()
307 final Listener listener = this.listener.get(); in updateVoicemailStatus() local
308 if (listener != null) { in updateVoicemailStatus()
309 listener.onVoicemailStatusFetched(statusCursor); in updateVoicemailStatus()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DMonitoredActivity.java50 public void addLifeCycleListener(LifeCycleListener listener) { in addLifeCycleListener() argument
51 if (mListeners.contains(listener)) return; in addLifeCycleListener()
52 mListeners.add(listener); in addLifeCycleListener()
55 public void removeLifeCycleListener(LifeCycleListener listener) { in removeLifeCycleListener() argument
56 mListeners.remove(listener); in removeLifeCycleListener()
62 for (LifeCycleListener listener : mListeners) { in onCreate()
63 listener.onActivityCreated(this); in onCreate()
70 for (LifeCycleListener listener : mListeners) { in onDestroy()
71 listener.onActivityDestroyed(this); in onDestroy()
78 for (LifeCycleListener listener : mListeners) { in onStart()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/ui/
DMenuExecutor.java101 ProgressListener listener = (ProgressListener) message.obj; in MenuExecutor()
102 listener.onProgressStart(); in MenuExecutor()
109 ProgressListener listener = (ProgressListener) message.obj; in MenuExecutor()
110 listener.onProgressComplete(message.arg1); in MenuExecutor()
118 ProgressListener listener = (ProgressListener) message.obj; in MenuExecutor()
119 listener.onProgressUpdate(message.arg1); in MenuExecutor()
155 private void onProgressUpdate(int index, ProgressListener listener) { in onProgressUpdate() argument
157 mHandler.obtainMessage(MSG_TASK_UPDATE, index, 0, listener)); in onProgressUpdate()
160 private void onProgressStart(ProgressListener listener) { in onProgressStart() argument
161 mHandler.sendMessage(mHandler.obtainMessage(MSG_TASK_START, listener)); in onProgressStart()
[all …]
/packages/modules/StatsD/statsd/tests/
DConfigManager_test.cpp72 sp<MockListener> listener = new StrictMock<MockListener>(); in TEST() local
75 manager->AddListener(listener); in TEST()
92 EXPECT_CALL(*(listener.get()), in TEST()
98 EXPECT_CALL(*(listener.get()), in TEST()
104 EXPECT_CALL(*(listener.get()), in TEST()
110 EXPECT_CALL(*(listener.get()), in TEST()
116 EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(1, StringToId("yyy")))) in TEST()
121 EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(2, StringToId("zzz")))) in TEST()
126 EXPECT_CALL(*(listener.get()), OnConfigRemoved(ConfigKeyEq(1, StringToId("zzz")))) in TEST()
139 sp<MockListener> listener = new StrictMock<MockListener>(); in TEST() local
[all …]
/packages/apps/TV/src/com/android/tv/dvr/
DBaseDvrDataManager.java66 public void addDvrScheduleLoadFinishedListener(OnDvrScheduleLoadFinishedListener listener) { in addDvrScheduleLoadFinishedListener() argument
67 mOnDvrScheduleLoadFinishedListeners.add(listener); in addDvrScheduleLoadFinishedListener()
71 public void removeDvrScheduleLoadFinishedListener(OnDvrScheduleLoadFinishedListener listener) { in removeDvrScheduleLoadFinishedListener() argument
72 mOnDvrScheduleLoadFinishedListeners.remove(listener); in removeDvrScheduleLoadFinishedListener()
77 OnRecordedProgramLoadFinishedListener listener) { in addRecordedProgramLoadFinishedListener() argument
78 mOnRecordedProgramLoadFinishedListeners.add(listener); in addRecordedProgramLoadFinishedListener()
83 OnRecordedProgramLoadFinishedListener listener) { in removeRecordedProgramLoadFinishedListener() argument
84 mOnRecordedProgramLoadFinishedListeners.remove(listener); in removeRecordedProgramLoadFinishedListener()
88 public final void addScheduledRecordingListener(ScheduledRecordingListener listener) { in addScheduledRecordingListener() argument
89 mScheduledRecordingListeners.add(listener); in addScheduledRecordingListener()
[all …]

12345678910>>...52