Home
last modified time | relevance | path

Searched refs:mListeners (Results 1 – 25 of 110) sorted by relevance

12345

/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/
DCarSystemBarRestartTracker.java31 public final List<Listener> mListeners = new ArrayList<>(); field in CarSystemBarRestartTracker
39 synchronized (mListeners) { in addListener()
40 mListeners.add(listener); in addListener()
46 synchronized (mListeners) { in removeListener()
47 mListeners.remove(listener); in removeListener()
52 synchronized (mListeners) { in notifyPendingRestart()
53 for (Listener listener : mListeners) { in notifyPendingRestart()
60 synchronized (mListeners) { in notifyRestartComplete()
61 for (Listener listener : mListeners) { in notifyRestartComplete()
/packages/modules/Wifi/service/java/com/android/server/wifi/
DClientModeImplMonitor.java34 private final Set<ClientModeImplListener> mListeners = new ArraySet<>(); field in ClientModeImplMonitor
38 mListeners.add(listener); in registerListener()
43 mListeners.remove(listener); in unregisterListener()
48 for (ClientModeImplListener listener : mListeners) { in onL2Connected()
56 for (ClientModeImplListener listener : mListeners) { in onL3Connected()
63 for (ClientModeImplListener listener : mListeners) { in onInternetValidated()
70 for (ClientModeImplListener listener : mListeners) { in onConnectionStart()
77 for (ClientModeImplListener listener : mListeners) { in onConnectionEnd()
84 for (ClientModeImplListener listener : mListeners) { in onCaptivePortalDetected()
/packages/apps/WallpaperPicker2/src/com/android/wallpaper/module/
DDefaultNetworkStatusNotifier.java43 private List<Listener> mListeners; field in DefaultNetworkStatusNotifier
51 mListeners = new ArrayList<>(); in DefaultNetworkStatusNotifier()
72 for (int i = 0; i < mListeners.size(); i++) { in registerListener()
73 mListeners.get(i).onNetworkChanged(networkStatus); in registerListener()
80 if (!mListeners.contains(listener)) { in registerListener()
81 mListeners.add(listener); in registerListener()
88 if (!mListeners.contains(listener)) { in registerListener()
89 mListeners.add(listener); in registerListener()
95 mListeners.remove(listener); in unregisterListener()
97 if (!mListeners.isEmpty() || mReceiver == null) { in unregisterListener()
DWallpaperChangedNotifier.java28 private List<Listener> mListeners; field in WallpaperChangedNotifier
35 mListeners = new ArrayList<>(); in WallpaperChangedNotifier()
51 for (int i = 0; i < mListeners.size(); i++) { in notifyWallpaperChanged()
52 mListeners.get(i).onWallpaperChanged(); in notifyWallpaperChanged()
60 if (!mListeners.contains(listener)) { in registerListener()
61 mListeners.add(listener); in registerListener()
69 mListeners.remove(listener); in unregisterListener()
/packages/apps/Camera2/src/com/android/camera/app/
DMemoryManagerImpl.java45 private final LinkedList<MemoryListener> mListeners = new LinkedList<MemoryListener>(); field in MemoryManagerImpl
90 synchronized (mListeners) { in addListener()
91 if (!mListeners.contains(listener)) { in addListener()
92 mListeners.add(listener); in addListener()
101 synchronized (mListeners) { in removeListener()
102 if (mListeners.contains(listener)) { in removeListener()
103 mListeners.remove(listener); in removeListener()
163 synchronized (mListeners) { in notifyLowMemory()
164 for (MemoryListener listener : mListeners) { in notifyLowMemory()
171 synchronized (mListeners) { in notifyCaptureStateUpdate()
[all …]
/packages/apps/Gallery/src/com/android/camera/
DMonitoredActivity.java26 private final ArrayList<LifeCycleListener> mListeners = field in MonitoredActivity
51 if (mListeners.contains(listener)) return; in addLifeCycleListener()
52 mListeners.add(listener); in addLifeCycleListener()
56 mListeners.remove(listener); in removeLifeCycleListener()
62 for (LifeCycleListener listener : mListeners) { in onCreate()
70 for (LifeCycleListener listener : mListeners) { in onDestroy()
78 for (LifeCycleListener listener : mListeners) { in onStart()
86 for (LifeCycleListener listener : mListeners) { in onStop()
/packages/modules/Uwb/service/java/com/android/server/uwb/correction/pose/
DPoseSourceBase.java39 private final List<PoseEventListener> mListeners; field in PoseSourceBase
44 mListeners = new ArrayList<>(); in PoseSourceBase()
66 if (mListeners.size() > 0) { in close()
67 mListeners.clear(); in close()
83 mListeners.add(listener); in registerListener()
84 if (mListeners.size() == 1) { in registerListener()
100 boolean removed = mListeners.remove(listener); in unregisterListener()
101 if (removed && mListeners.size() == 0) { in unregisterListener()
122 listeners = new ArrayList<>(this.mListeners); in publish()
/packages/apps/Settings/src/com/android/settings/network/telephony/
DTelephonyDisplayInfoListener.java39 private Map<Integer, PhoneStateListener> mListeners; field in TelephonyDisplayInfoListener
58 mListeners = new HashMap<>(); in TelephonyDisplayInfoListener()
71 for (int subId : mListeners.keySet()) { in resume()
78 for (int subId : mListeners.keySet()) { in pause()
86 Set<Integer> currentIds = new ArraySet<>(mListeners.keySet()); in updateSubscriptionIds()
89 mListeners.remove(idToRemove); in updateSubscriptionIds()
101 mListeners.put(idToAdd, listener); in updateSubscriptionIds()
108 mgr.listen(mListeners.get(subId), PhoneStateListener.LISTEN_DISPLAY_INFO_CHANGED); in startListening()
113 mgr.listen(mListeners.get(subId), PhoneStateListener.LISTEN_NONE); in stopListening()
/packages/apps/Settings/src/com/android/settings/datausage/
DDataSaverBackend.java44 private final ArrayList<Listener> mListeners = new ArrayList<>(); field in DataSaverBackend
59 mListeners.add(listener); in addListener()
60 if (mListeners.size() == 1) { in addListener()
67 mListeners.remove(listener); in remListener()
68 if (mListeners.size() == 0) { in remListener()
144 for (int i = 0; i < mListeners.size(); i++) { in handleRestrictBackgroundChanged()
145 mListeners.get(i).onDataSaverChanged(isDataSaving); in handleRestrictBackgroundChanged()
150 for (int i = 0; i < mListeners.size(); i++) { in handleAllowlistChanged()
151 mListeners.get(i).onAllowlistStatusChanged(uid, isAllowlisted); in handleAllowlistChanged()
156 for (int i = 0; i < mListeners.size(); i++) { in handleDenylistChanged()
[all …]
/packages/apps/Camera2/src/com/android/camera/one/v2/core/
DResponseListenerBroadcaster.java32 private final ImmutableList<ResponseListener> mListeners; field in ResponseListenerBroadcaster
35 mListeners = ImmutableList.copyOf(listeners); in ResponseListenerBroadcaster()
39 mListeners = ImmutableList.copyOf(listeners); in ResponseListenerBroadcaster()
44 for (ResponseListener listener : mListeners) { in onStarted()
51 for (ResponseListener listener : mListeners) { in onProgressed()
58 for (ResponseListener listener : mListeners) { in onCompleted()
65 for (ResponseListener listener : mListeners) { in onFailed()
DTagDispatchCaptureSession.java46 private final Map<Object, ResponseListener> mListeners; field in TagDispatchCaptureSession.CaptureCallback
53 mListeners = new HashMap<>(listeners); in CaptureCallback()
60 mListeners.get(tag).onStarted(timestamp); in onCaptureStarted()
67 mListeners.get(tag).onProgressed(partialResult); in onCaptureProgressed()
74 mListeners.get(tag).onCompleted(result); in onCaptureCompleted()
81 mListeners.get(tag).onFailed(failure); in onCaptureFailed()
86 for (ResponseListener listener : mListeners.values()) { in onCaptureSequenceAborted()
94 for (ResponseListener listener : mListeners.values()) { in onCaptureSequenceCompleted()
/packages/apps/Car/SystemUI/src/com/android/systemui/wm/
DMDSystemBarsController.java61 private Set<Listener> mListeners; field in MDSystemBarsController
95 mListeners = null; in addListener()
99 if (mListeners != null) { in addListener()
100 mListeners.add(listener); in addListener()
104 mListeners = new HashSet<>(); in addListener()
105 mListeners.add(listener); in addListener()
147 if (mListeners == null) { in insetsChanged()
153 for (Listener l : mListeners) { in insetsChanged()
190 if (mListeners == null) { in removeListener()
193 return mListeners.remove(listener); in removeListener()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/
DCarServiceProvider.java46 private final List<CarServiceOnConnectedListener> mListeners = new ArrayList<>(); field in CarServiceProvider
63 synchronized (mListeners) { in CarServiceProvider()
67 for (CarServiceOnConnectedListener listener : mListeners) { in CarServiceProvider()
92 synchronized (mListeners) { in addListener()
93 mListeners.add(listener); in addListener()
103 synchronized (mListeners) { in removeListener()
104 mListeners.remove(listener); in removeListener()
/packages/apps/Camera2/src/com/android/camera/
DShutterButton.java71 for (OnShutterButtonListener listener : mListeners) { in onLongPress()
77 private List<OnShutterButtonListener> mListeners field in ShutterButton
91 if (!mListeners.contains(listener)) { in addOnShutterButtonListener()
92 mListeners.add(listener); in addOnShutterButtonListener()
100 if (mListeners.contains(listener)) { in removeOnShutterButtonListener()
101 mListeners.remove(listener); in removeOnShutterButtonListener()
178 for (OnShutterButtonListener listener : mListeners) { in callShutterButtonFocus()
187 for (OnShutterButtonListener listener : mListeners) { in performClick()
/packages/services/BuiltInPrintService/src/com/android/bips/p2p/
DP2pConnectionProcedure.java53 private final List<P2pConnectionListener> mListeners = new CopyOnWriteArrayList<>(); field in P2pConnectionProcedure
71 mListeners.add(listener); in P2pConnectionProcedure()
95 return mListeners.contains(listener); in hasListener()
102 mListeners.add(listener); in addListener()
106 mListeners.remove(listener); in removeListener()
110 return mListeners.size(); in getListenerCount()
116 mListeners.clear(); in close()
143 for (P2pConnectionListener listener : mListeners) { in onReceive()
155 for (P2pConnectionListener listener : mListeners) { in onReceive()
161 for (P2pConnectionListener listener : mListeners) { in onReceive()
[all …]
/packages/services/Car/service/src/com/android/car/
DOccupantAwarenessService.java104 private final ChangeCallbackList mListeners = new ChangeCallbackList(this); field in OccupantAwarenessService
128 mListeners.kill(); in release()
142 mListeners.getRegisteredCallbackCount())); in dump()
304 mListeners.register(listener); in registerEventListener()
307 if (mListeners.getRegisteredCallbackCount() == 1) { in registerEventListener()
329 mListeners.unregister(listener); in unregisterEventListener()
339 int idx = mListeners.beginBroadcast(); in processStatusEvent()
341 IOccupantAwarenessEventCallback listener = mListeners.getBroadcastItem(idx); in processStatusEvent()
349 mListeners.finishBroadcast(); in processStatusEvent()
355 int idx = mListeners.beginBroadcast(); in processDetectionEvent()
[all …]
/packages/apps/Car/SystemUI/src/com/android/systemui/car/systembar/element/
DCarSystemBarElementStatusBarDisableController.java42 private final List<DataItem> mListeners = new ArrayList<>(); field in CarSystemBarElementStatusBarDisableController
73 boolean wasEmpty = mListeners.isEmpty(); in addListener()
76 synchronized (mListeners) { in addListener()
77 mListeners.add(item); in addListener()
88 synchronized (mListeners) { in removeListener()
89 mListeners.removeIf(item -> item.sameOrEmpty(listener)); in removeListener()
90 if (mListeners.isEmpty()) { in removeListener()
111 synchronized (mListeners) { in refreshSystemBarDisabledStates()
112 List<DataItem> changedList = mListeners.stream().filter( in refreshSystemBarDisabledStates()
/packages/apps/TV/src/com/android/tv/dvr/
DDvrWatchedPositionManager.java41 private final Map<Long, Set<WatchedPositionChangedListener>> mListeners = new HashMap<>(); field in DvrWatchedPositionManager
96 Set<WatchedPositionChangedListener> listenerSet = mListeners.get(recordedProgramId); in addListener()
99 mListeners.put(recordedProgramId, listenerSet); in addListener()
106 for (long recordedProgramId : new ArrayList<>(mListeners.keySet())) { in removeListener()
113 Set<WatchedPositionChangedListener> listenerSet = mListeners.get(recordedProgramId); in removeListener()
119 mListeners.remove(recordedProgramId); in removeListener()
124 Set<WatchedPositionChangedListener> listenerSet = mListeners.get(recordedProgramId); in notifyWatchedPositionChanged()
/packages/services/BuiltInPrintService/src/com/android/bips/discovery/
DDiscovery.java47 private final List<Listener> mListeners = new CopyOnWriteArrayList<>(); field in Discovery
62 mListeners.add(listener); in start()
66 if (!mListeners.contains(listener)) { in start()
82 mListeners.remove(listener); in stop()
83 if (mListeners.isEmpty()) { in stop()
152 for (Listener listener : mListeners) { in printerFound()
165 for (Listener listener : mListeners) { in printerLost()
/packages/services/Telephony/src/com/android/services/telephony/
DTelephonyConferenceBase.java70 private final Set<TelephonyConferenceListener> mListeners = Collections.newSetFromMap( field in TelephonyConferenceBase
78 mListeners.add(listener); in addTelephonyConferenceListener()
86 mListeners.remove(listener); in removeTelephonyConferenceListener()
239 for (TelephonyConferenceListener listener : mListeners) { in notifyConferenceMembershipChanged()
249 mListeners.forEach(l -> l.onConferenceCapacityChanged()); in notifyConferenceCapacityChanged()
256 for (TelephonyConferenceListener listener : mListeners) { in notifyDestroyed()
263 for (TelephonyConferenceListener listener : mListeners) { in notifyStateChanged()
/packages/services/Telecomm/testapps/carmodedialer/src/com/android/server/telecom/carmodedialer/
DCarModeCallList.java105 private Set<Listener> mListeners = new ArraySet<Listener>(); field in CarModeCallList
118 mListeners.add(listener); in addListener()
123 return mListeners.remove(listener); in removeListener()
139 for (Listener l : mListeners) { in addCall()
153 for (Listener l : mListeners) { in removeCall()
236 for (Listener l : mListeners) { in onRttStatusChanged()
240 for (Listener l : mListeners) { in onRttStatusChanged()
248 for (Listener l : mListeners) { in onRttInitiationFailure()
256 for (Listener l : mListeners) { in onRttRequest()
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/
DTestCallList.java105 private Set<Listener> mListeners = new ArraySet<Listener>(); field in TestCallList
118 mListeners.add(listener); in addListener()
123 return mListeners.remove(listener); in removeListener()
139 for (Listener l : mListeners) { in addCall()
153 for (Listener l : mListeners) { in removeCall()
236 for (Listener l : mListeners) { in onRttStatusChanged()
240 for (Listener l : mListeners) { in onRttStatusChanged()
248 for (Listener l : mListeners) { in onRttInitiationFailure()
256 for (Listener l : mListeners) { in onRttRequest()
/packages/apps/Gallery2/src/com/android/gallery3d/ingest/adapter/
DCheckBroker.java30 private Collection<OnCheckedChangedListener> mListeners = field in CheckBroker
46 for (OnCheckedChangedListener l : mListeners) { in onCheckedChange()
53 for (OnCheckedChangedListener l : mListeners) { in onBulkCheckedChange()
61 mListeners.add(l); in registerOnCheckedChangeListener()
65 mListeners.remove(l); in unregisterOnCheckedChangeListener()
/packages/apps/Camera2/src/com/android/camera/async/
DConcurrentState.java51 private final Set<ExecutorListenerPair> mListeners; field in ConcurrentState
58 mListeners = new CopyOnWriteArraySet<>(); in ConcurrentState()
68 for (ExecutorListenerPair pair : mListeners) { in update()
78 mListeners.add(pair); in addCallback()
82 mListeners.remove(pair); in addCallback()
/packages/modules/DnsResolver/
DResolverEventReporter.cpp80 auto found = std::find_if(mListeners.begin(), mListeners.end(), in handleBinderDied()
83 if (found != mListeners.end()) mListeners.erase(found); in handleBinderDied()
99 return mListeners; in getListenersImpl()
120 for (const auto& it : mListeners) { in addListenerImplLocked()
154 mListeners.insert(listener); in addListenerImplLocked()

12345