Home
last modified time | relevance | path

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

12345678910>>...43

/frameworks/base/wifi/java/android/net/wifi/p2p/
DWifiP2pManager.java906 Object listener = getListener(message.arg2); in handleMessage() local
938 if (listener != null) { in handleMessage()
939 ((ActionListener) listener).onFailure(message.arg1); in handleMessage()
966 if (listener != null) { in handleMessage()
967 ((ActionListener) listener).onSuccess(); in handleMessage()
972 if (listener != null) { in handleMessage()
973 ((PeerListListener) listener).onPeersAvailable(peers); in handleMessage()
978 if (listener != null) { in handleMessage()
979 … ((ConnectionInfoListener) listener).onConnectionInfoAvailable(wifiP2pInfo); in handleMessage()
984 if (listener != null) { in handleMessage()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DPinnedStackListenerForwarder.java38 public void addListener(IPinnedStackListener listener) { in addListener() argument
39 mListeners.add(listener); in addListener()
43 public void removeListener(IPinnedStackListener listener) { in removeListener() argument
44 mListeners.remove(listener); in removeListener()
49 for (IPinnedStackListener listener : mListeners) { in onListenerRegistered()
50 listener.onListenerRegistered(controller); in onListenerRegistered()
58 for (IPinnedStackListener listener : mListeners) { in onMovementBoundsChanged()
59 listener.onMovementBoundsChanged( in onMovementBoundsChanged()
67 for (IPinnedStackListener listener : mListeners) { in onImeVisibilityChanged()
68 listener.onImeVisibilityChanged(imeVisible, imeHeight); in onImeVisibilityChanged()
[all …]
/frameworks/base/core/java/android/speech/
DRecognitionService.java97 private void dispatchStartListening(Intent intent, final IRecognitionListener listener, in dispatchStartListening() argument
100 if (DBG) Log.d(TAG, "created new mCurrentCallback, listener = " + listener.asBinder()); in dispatchStartListening()
102 listener.asBinder().linkToDeath(new IBinder.DeathRecipient() { in dispatchStartListening()
105 mHandler.sendMessage(mHandler.obtainMessage(MSG_CANCEL, listener)); in dispatchStartListening()
112 mCurrentCallback = new Callback(listener, callingUid); in dispatchStartListening()
116 listener.onError(SpeechRecognizer.ERROR_RECOGNIZER_BUSY); in dispatchStartListening()
124 private void dispatchStopListening(IRecognitionListener listener) { in dispatchStopListening() argument
127 listener.onError(SpeechRecognizer.ERROR_CLIENT); in dispatchStopListening()
129 } else if (mCurrentCallback.mListener.asBinder() != listener.asBinder()) { in dispatchStopListening()
130 listener.onError(SpeechRecognizer.ERROR_RECOGNIZER_BUSY); in dispatchStopListening()
[all …]
/frameworks/opt/net/ims/src/java/com/android/ims/
DImsCall.java1003 public void setListener(ImsCall.Listener listener) { in setListener() argument
1004 setListener(listener, false); in setListener()
1016 public void setListener(ImsCall.Listener listener, boolean callbackImmediately) { in setListener() argument
1023 mListener = listener; in setListener()
1025 if ((listener == null) || !callbackImmediately) { in setListener()
1037 listener.onCallError(this, lastReasonInfo); in setListener()
1040 listener.onCallHeld(this); in setListener()
1042 listener.onCallStarted(this); in setListener()
1047 listener.onCallProgressing(this); in setListener()
1050 listener.onCallTerminated(this, lastReasonInfo); in setListener()
[all …]
/frameworks/base/telephony/java/android/telephony/mbms/vendor/
DMbmsDownloadServiceBase.java58 public VendorDownloadStatusListener(IDownloadStatusListener listener) { in VendorDownloadStatusListener() argument
59 mListener = listener; in VendorDownloadStatusListener()
78 public VendorDownloadProgressListener(IDownloadProgressListener listener) { in VendorDownloadProgressListener() argument
79 mListener = listener; in VendorDownloadProgressListener()
273 DownloadStatusListener listener) throws RemoteException { in addStatusListener() argument
283 final IDownloadStatusListener listener) throws RemoteException { in addStatusListener() argument
288 if (listener == null) { in addStatusListener()
292 DownloadStatusListener exposedCallback = new VendorDownloadStatusListener(listener) { in addStatusListener()
306 mDownloadStatusListenerBinderMap.remove(listener.asBinder()); in addStatusListener()
307 mDownloadCallbackDeathRecipients.remove(listener.asBinder()); in addStatusListener()
[all …]
/frameworks/native/libs/gui/
DBufferQueue.cpp40 sp<ConsumerListener> listener(mConsumerListener.promote()); in onDisconnect() local
41 if (listener != nullptr) { in onDisconnect()
42 listener->onDisconnect(); in onDisconnect()
48 sp<ConsumerListener> listener(mConsumerListener.promote()); in onFrameAvailable() local
49 if (listener != nullptr) { in onFrameAvailable()
50 listener->onFrameAvailable(item); in onFrameAvailable()
56 sp<ConsumerListener> listener(mConsumerListener.promote()); in onFrameReplaced() local
57 if (listener != nullptr) { in onFrameReplaced()
58 listener->onFrameReplaced(item); in onFrameReplaced()
63 sp<ConsumerListener> listener(mConsumerListener.promote()); in onBuffersReleased() local
[all …]
/frameworks/base/location/java/android/location/
DLocalListenerHelper.java54 public boolean add(@NonNull TListener listener, Handler handler) { in add() argument
55 Preconditions.checkNotNull(listener); in add()
72 if (mListeners.containsKey(listener)) { in add()
75 mListeners.put(listener, handler); in add()
80 public void remove(@NonNull TListener listener) { in remove() argument
81 Preconditions.checkNotNull(listener); in remove()
83 boolean removed = mListeners.containsKey(listener); in remove()
84 mListeners.remove(listener); in remove()
100 void execute(TListener listener) throws RemoteException; in execute() argument
107 private void executeOperation(ListenerOperation<TListener> operation, TListener listener) { in executeOperation() argument
[all …]
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/gesture/
DConsecutiveTapsGestureDetectorTest.java39 @Mock private ConsecutiveTapsGestureDetector.OnConsecutiveTapsListener listener; field in ConsecutiveTapsGestureDetectorTest
52 detector = new ConsecutiveTapsGestureDetector(listener, view); in setUp()
60 InOrder inOrder = inOrder(listener); in onTouchEvent_shouldTriggerCallbackOnFourTaps()
63 inOrder.verify(listener).onConsecutiveTaps(eq(1)); in onTouchEvent_shouldTriggerCallbackOnFourTaps()
66 inOrder.verify(listener).onConsecutiveTaps(eq(2)); in onTouchEvent_shouldTriggerCallbackOnFourTaps()
69 inOrder.verify(listener).onConsecutiveTaps(eq(3)); in onTouchEvent_shouldTriggerCallbackOnFourTaps()
72 inOrder.verify(listener).onConsecutiveTaps(eq(4)); in onTouchEvent_shouldTriggerCallbackOnFourTaps()
77 InOrder inOrder = inOrder(listener); in onTouchEvent_tapOnDifferentLocation_shouldResetCounter()
80 inOrder.verify(listener).onConsecutiveTaps(eq(1)); in onTouchEvent_tapOnDifferentLocation_shouldResetCounter()
83 inOrder.verify(listener).onConsecutiveTaps(eq(2)); in onTouchEvent_tapOnDifferentLocation_shouldResetCounter()
[all …]
/frameworks/native/services/surfaceflinger/
DTransactionCompletedThread.cpp60 for (const auto& [listener, transactionStats] : mCompletedTransactions) { in ~TransactionCompletedThread()
61 IInterface::asBinder(listener)->unlinkToDeath(mDeathRecipient); in ~TransactionCompletedThread()
78 status_t TransactionCompletedThread::addCallback(const sp<ITransactionCompletedListener>& listener, in addCallback() argument
86 if (mCompletedTransactions.count(listener) == 0) { in addCallback()
87 status_t err = IInterface::asBinder(listener)->linkToDeath(mDeathRecipient); in addCallback()
94 auto& transactionStatsDeque = mCompletedTransactions[listener]; in addCallback()
110 status_t err = findTransactionStats(handle->listener, handle->callbackIds, &transactionStats); in registerPendingCallbackHandle()
116 mPendingTransactions[handle->listener][handle->callbackIds]++; in registerPendingCallbackHandle()
129 auto listener = mPendingTransactions.find(handle->listener); in addPresentedCallbackHandles() local
130 if (listener != mPendingTransactions.end()) { in addPresentedCallbackHandles()
[all …]
/frameworks/base/tests/OneMedia/src/com/android/onemedia/playback/
DRenderer.java149 public void registerListener(Listener listener) { in registerListener() argument
150 if (!mListeners.contains(listener)) { in registerListener()
151 mListeners.add(listener); in registerListener()
155 public void unregisterListener(Listener listener) { in unregisterListener() argument
156 mListeners.remove(listener); in unregisterListener()
164 for (Listener listener : mListeners) { in pushOnError()
165 listener.onError(type, extra, extras, error); in pushOnError()
170 for (Listener listener : mListeners) { in pushOnStateChanged()
171 listener.onStateChanged(newState); in pushOnStateChanged()
176 for (Listener listener : mListeners) { in pushOnBufferingUpdate()
[all …]
/frameworks/av/media/codec2/hidl/1.0/utils/
DInputBufferManager.cpp42 const sp<IComponentListener>& listener, in registerFrameData() argument
44 getInstance()._registerFrameData(listener, input); in registerFrameData()
48 const wp<IComponentListener>& listener, in unregisterFrameData() argument
50 getInstance()._unregisterFrameData(listener, input); in unregisterFrameData()
54 const wp<IComponentListener>& listener) { in unregisterFrameData() argument
55 getInstance()._unregisterFrameData(listener); in unregisterFrameData()
64 const sp<IComponentListener>& listener, in _registerFrameData() argument
68 << "listener @ 0x" << std::hex << listener.get() in _registerFrameData()
74 mTrackedBuffersMap[listener][frameIndex]; in _registerFrameData()
83 *bufferIds.emplace(listener, frameIndex, i, input.buffers[i]). in _registerFrameData()
[all …]
/frameworks/base/core/java/android/net/nsd/
DNsdManager.java363 final Object listener; in handleMessage() local
366 listener = mListenerMap.get(key); in handleMessage()
369 if (listener == null) { in handleMessage()
379 ((DiscoveryListener) listener).onDiscoveryStarted(s); in handleMessage()
383 ((DiscoveryListener) listener).onStartDiscoveryFailed(getNsdServiceInfoType(ns), in handleMessage()
387 ((DiscoveryListener) listener).onServiceFound((NsdServiceInfo) message.obj); in handleMessage()
390 ((DiscoveryListener) listener).onServiceLost((NsdServiceInfo) message.obj); in handleMessage()
396 ((DiscoveryListener) listener).onStopDiscoveryFailed(getNsdServiceInfoType(ns), in handleMessage()
401 ((DiscoveryListener) listener).onDiscoveryStopped(getNsdServiceInfoType(ns)); in handleMessage()
405 ((RegistrationListener) listener).onRegistrationFailed(ns, message.arg1); in handleMessage()
[all …]
/frameworks/base/core/java/android/app/
DAlertDialog.java337 public void setButton(int whichButton, CharSequence text, OnClickListener listener) { in setButton() argument
338 mAlert.setButton(whichButton, text, listener, null); in setButton()
378 public void setButton(CharSequence text, final OnClickListener listener) { in setButton() argument
379 setButton(BUTTON_POSITIVE, text, listener); in setButton()
391 public void setButton2(CharSequence text, final OnClickListener listener) { in setButton2() argument
392 setButton(BUTTON_NEGATIVE, text, listener); in setButton2()
404 public void setButton3(CharSequence text, final OnClickListener listener) { in setButton3() argument
405 setButton(BUTTON_NEUTRAL, text, listener); in setButton3()
626 public Builder setPositiveButton(@StringRes int textId, final OnClickListener listener) { in setPositiveButton() argument
628 P.mPositiveButtonListener = listener; in setPositiveButton()
[all …]
/frameworks/base/services/core/java/com/android/server/incident/
DPendingReports.java75 public IIncidentAuthListener listener; field in PendingReports.PendingReportRec
85 IIncidentAuthListener listener) { in PendingReportRec() argument
89 this.listener = listener; in PendingReportRec()
137 final IIncidentAuthListener listener) { in authorizeReport() argument
141 mRequestQueue.enqueue(listener.asBinder(), true, () -> { in authorizeReport()
143 flags, listener); in authorizeReport()
157 public void cancelAuthorization(final IIncidentAuthListener listener) { in cancelAuthorization() argument
158 mRequestQueue.enqueue(listener.asBinder(), false, () -> { in cancelAuthorization()
159 cancelReportImpl(listener); in cancelAuthorization()
201 rec.listener.onReportApproved(); in approveReport()
[all …]
/frameworks/base/core/java/android/hardware/hdmi/
DHdmiSwitchClient.java50 private static IHdmiControlCallback getCallbackWrapper(final OnSelectListener listener) { in getCallbackWrapper() argument
54 listener.onSelect(result); in getCallbackWrapper()
72 public void selectDevice(int logicalAddress, @NonNull OnSelectListener listener) {
73 Preconditions.checkNotNull(listener);
75 mService.deviceSelect(logicalAddress, getCallbackWrapper(listener));
93 public void selectPort(int portId, @NonNull OnSelectListener listener) {
94 Preconditions.checkNotNull(listener);
96 mService.portSelect(portId, getCallbackWrapper(listener));
116 @NonNull OnSelectListener listener) {
117 Preconditions.checkNotNull(listener);
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/location/
DComprehensiveCountryDetectorTest.java152 CountryListenerImpl listener = new CountryListenerImpl();
153 countryDetector.setCountryListener(listener);
156 assertFalse(listener.notified());
173 CountryListenerImpl listener = new CountryListenerImpl();
174 countryDetector.setCountryListener(listener);
179 assertTrue(listener.notified());
180 assertTrue(sameCountry(listener.getCountry(), locationBasedCountry));
196 CountryListenerImpl listener = new CountryListenerImpl();
197 countryDetector.setCountryListener(listener);
200 assertFalse(listener.notified());
[all …]
/frameworks/base/cmds/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()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")), in TEST()
98 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("zzz")), in TEST()
104 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(1, StringToId("yyy")), in TEST()
110 EXPECT_CALL(*(listener.get()), OnConfigUpdated(_, ConfigKeyEq(2, StringToId("zzz")), 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 …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DAsyncSensorManager.java89 protected boolean registerListenerImpl(SensorEventListener listener, in registerListenerImpl() argument
93 if (!mInner.registerListener(listener, sensor, delayUs, maxReportLatencyUs, handler)) { in registerListenerImpl()
94 Log.e(TAG, "Registering " + listener + " for " + sensor + " failed."); in registerListenerImpl()
101 protected boolean flushImpl(SensorEventListener listener) { in flushImpl() argument
102 return mInner.flush(listener); in flushImpl()
133 protected boolean requestTriggerSensorImpl(TriggerEventListener listener, Sensor sensor) { in requestTriggerSensorImpl() argument
135 if (!mInner.requestTriggerSensor(listener, sensor)) { in requestTriggerSensorImpl()
136 Log.e(TAG, "Requesting " + listener + " for " + sensor + " failed."); in requestTriggerSensorImpl()
143 protected boolean cancelTriggerSensorImpl(TriggerEventListener listener, Sensor sensor, in cancelTriggerSensorImpl() argument
148 if (!mInner.cancelTriggerSensor(listener, sensor)) { in cancelTriggerSensorImpl()
[all …]
/frameworks/base/media/java/android/media/session/
DMediaSessionManager.java346 @NonNull OnActiveSessionsChangedListener listener) { in removeOnActiveSessionsChangedListener()
347 if (listener == null) { in removeOnActiveSessionsChangedListener()
351 SessionsChangedWrapper wrapper = mListeners.remove(listener); in removeOnActiveSessionsChangedListener()
375 @NonNull OnSession2TokensChangedListener listener) { in addOnSession2TokensChangedListener()
376 addOnSession2TokensChangedListener(UserHandle.myUserId(), listener, new Handler()); in addOnSession2TokensChangedListener() local
391 @NonNull OnSession2TokensChangedListener listener, @NonNull Handler handler) { in addOnSession2TokensChangedListener()
392 addOnSession2TokensChangedListener(UserHandle.myUserId(), listener, handler); in addOnSession2TokensChangedListener() local
410 @NonNull OnSession2TokensChangedListener listener, @Nullable Handler handler) { in addOnSession2TokensChangedListener() argument
411 if (listener == null) { in addOnSession2TokensChangedListener()
415 if (mSession2TokensListeners.get(listener) != null) { in addOnSession2TokensChangedListener()
[all …]
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/
DTetheringService.java106 IIntResultListener listener) { in tether() argument
107 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in tether()
110 listener.onResult(mTethering.tether(iface)); in tether()
116 IIntResultListener listener) { in untether() argument
117 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in untether()
120 listener.onResult(mTethering.untether(iface)); in untether()
126 IIntResultListener listener) { in setUsbTethering() argument
127 if (checkAndNotifyCommonError(callerPkg, callingAttributionTag, listener)) return; in setUsbTethering()
130 listener.onResult(mTethering.setUsbTethering(enable)); in setUsbTethering()
136 String callingAttributionTag, IIntResultListener listener) { in startTethering() argument
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/params/
DRestoreParams.java36 public final OnTaskFinishedListener listener; field in RestoreParams
47 OnTaskFinishedListener listener) { in createForSinglePackage() argument
57 listener); in createForSinglePackage()
70 OnTaskFinishedListener listener) { in createForRestoreAtInstall() argument
81 listener); in createForRestoreAtInstall()
92 OnTaskFinishedListener listener) { in createForRestoreAll() argument
102 listener); in createForRestoreAll()
115 OnTaskFinishedListener listener) { in createForRestorePackages() argument
125 listener); in createForRestorePackages()
137 OnTaskFinishedListener listener) { in RestoreParams() argument
[all …]
/frameworks/base/core/java/android/view/
DViewTreeObserver.java479 public void addOnWindowAttachListener(OnWindowAttachListener listener) { in addOnWindowAttachListener() argument
487 mOnWindowAttachListeners.add(listener); in addOnWindowAttachListener()
514 public void addOnWindowFocusChangeListener(OnWindowFocusChangeListener listener) { in addOnWindowFocusChangeListener() argument
522 mOnWindowFocusListeners.add(listener); in addOnWindowFocusChangeListener()
549 public void addOnGlobalFocusChangeListener(OnGlobalFocusChangeListener listener) { in addOnGlobalFocusChangeListener() argument
556 mOnGlobalFocusListeners.add(listener); in addOnGlobalFocusChangeListener()
584 public void addOnGlobalLayoutListener(OnGlobalLayoutListener listener) { in addOnGlobalLayoutListener() argument
591 mOnGlobalLayoutListeners.add(listener); in addOnGlobalLayoutListener()
634 public void addOnPreDrawListener(OnPreDrawListener listener) { in addOnPreDrawListener() argument
641 mOnPreDrawListeners.add(listener); in addOnPreDrawListener()
[all …]
/frameworks/base/services/core/java/com/android/server/location/
DGnssStatusListenerHelper.java51 foreach((IGnssStatusListener listener, CallerIdentity callerIdentity) -> { in onStatusChanged() argument
52 listener.onGnssStarted(); in onStatusChanged()
55 foreach((IGnssStatusListener listener, CallerIdentity callerIdentity) -> { in onStatusChanged() argument
56 listener.onGnssStopped(); in onStatusChanged()
62 foreach((IGnssStatusListener listener, CallerIdentity callerIdentity) -> { in onFirstFix() argument
63 listener.onFirstFix(timeToFirstFix); in onFirstFix()
75 foreach((IGnssStatusListener listener, CallerIdentity callerIdentity) -> { in onSvStatusChanged() argument
81 listener.onSvStatusChanged(svCount, prnWithFlags, cn0s, elevations, azimuths, in onSvStatusChanged()
87 foreach((IGnssStatusListener listener, CallerIdentity callerIdentity) -> { in onNmeaReceived() argument
92 listener.onNmeaReceived(timestamp, nmea); in onNmeaReceived()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/utils/leaks/
DFakePluginManager.java32 public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener, in addPluginListener() argument
34 mLeakChecker.addCallback(listener); in addPluginListener()
38 public <T extends Plugin> void addPluginListener(PluginListener<T> listener, Class<?> cls) { in addPluginListener() argument
39 mLeakChecker.addCallback(listener); in addPluginListener()
43 public <T extends Plugin> void addPluginListener(PluginListener<T> listener, Class<?> cls, in addPluginListener() argument
45 mLeakChecker.addCallback(listener); in addPluginListener()
49 public <T extends Plugin> void addPluginListener(String action, PluginListener<T> listener, in addPluginListener() argument
51 mLeakChecker.addCallback(listener); in addPluginListener()
55 public void removePluginListener(PluginListener<?> listener) { in removePluginListener() argument
56 mLeakChecker.removeCallback(listener); in removePluginListener()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSensorPrivacyControllerImpl.java63 public void addCallback(OnSensorPrivacyChangedListener listener) { in addCallback() argument
65 mListeners.add(listener); in addCallback()
66 notifyListenerLocked(listener); in addCallback()
73 public void removeCallback(OnSensorPrivacyChangedListener listener) { in removeCallback() argument
75 mListeners.remove(listener); in removeCallback()
85 for (OnSensorPrivacyChangedListener listener : mListeners) { in onSensorPrivacyChanged()
86 notifyListenerLocked(listener); in onSensorPrivacyChanged()
91 private void notifyListenerLocked(OnSensorPrivacyChangedListener listener) { in notifyListenerLocked() argument
92 listener.onSensorPrivacyChanged(mSensorPrivacyEnabled); in notifyListenerLocked()

12345678910>>...43