Home
last modified time | relevance | path

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

1234

/frameworks/base/services/core/java/com/android/server/wm/
DPointerEventDispatcher.java32 private final ArrayList<PointerEventListener> mListeners = new ArrayList<>(); field in PointerEventDispatcher
47 synchronized (mListeners) { in onInputEvent()
49 mListenersArray = new PointerEventListener[mListeners.size()]; in onInputEvent()
50 mListeners.toArray(mListenersArray); in onInputEvent()
68 synchronized (mListeners) { in registerInputEventListener()
69 if (mListeners.contains(listener)) { in registerInputEventListener()
73 mListeners.add(listener); in registerInputEventListener()
83 synchronized (mListeners) { in unregisterInputEventListener()
84 if (!mListeners.contains(listener)) { in unregisterInputEventListener()
88 mListeners.remove(listener); in unregisterInputEventListener()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DDataSaverControllerImpl.java29 private final ArrayList<Listener> mListeners = new ArrayList<>(); field in DataSaverControllerImpl
37 synchronized (mListeners) { in handleRestrictBackgroundChanged()
38 for (int i = 0; i < mListeners.size(); i++) { in handleRestrictBackgroundChanged()
39 mListeners.get(i).onDataSaverChanged(isDataSaving); in handleRestrictBackgroundChanged()
45 synchronized (mListeners) { in addCallback()
46 mListeners.add(listener); in addCallback()
47 if (mListeners.size() == 1) { in addCallback()
55 synchronized (mListeners) { in removeCallback()
56 mListeners.remove(listener); in removeCallback()
57 if (mListeners.size() == 0) { in removeCallback()
DDeviceProvisionedControllerImpl.java44 private final ArrayList<DeviceProvisionedListener> mListeners = new ArrayList<>(); field in DeviceProvisionedControllerImpl
92 mListeners.add(listener); in addCallback()
93 if (mListeners.size() == 1) { in addCallback()
102 mListeners.remove(listener); in removeCallback()
103 if (mListeners.size() == 0) { in removeCallback()
132 for (int i = mListeners.size() - 1; i >= 0; --i) { in notifyUserChanged()
133 mListeners.get(i).onUserSwitched(); in notifyUserChanged()
138 for (int i = mListeners.size() - 1; i >= 0; --i) { in notifySetupChanged()
139 mListeners.get(i).onUserSetupChanged(); in notifySetupChanged()
144 for (int i = mListeners.size() - 1; i >= 0; --i) { in notifyProvisionedChanged()
[all …]
DSensorPrivacyControllerImpl.java35 private final List<OnSensorPrivacyChangedListener> mListeners; field in SensorPrivacyControllerImpl
48 mListeners = new ArrayList<>(1); in SensorPrivacyControllerImpl()
65 mListeners.add(listener); in addCallback()
75 mListeners.remove(listener); in removeCallback()
85 for (OnSensorPrivacyChangedListener listener : mListeners) { in onSensorPrivacyChanged()
DFlashlightControllerImpl.java63 private final ArrayList<WeakReference<FlashlightListener>> mListeners = new ArrayList<>(1); field in FlashlightControllerImpl
127 synchronized (mListeners) { in addCallback()
132 mListeners.add(new WeakReference<>(l)); in addCallback()
139 synchronized (mListeners) { in removeCallback()
179 synchronized (mListeners) { in dispatchListeners()
180 final int N = mListeners.size(); in dispatchListeners()
183 FlashlightListener l = mListeners.get(i).get(); in dispatchListeners()
203 for (int i = mListeners.size() - 1; i >= 0; i--) { in cleanUpListenersLocked()
204 FlashlightListener found = mListeners.get(i).get(); in cleanUpListenersLocked()
206 mListeners.remove(i); in cleanUpListenersLocked()
/frameworks/base/core/java/android/animation/
DAnimator.java39 ArrayList<AnimatorListener> mListeners = null; field in Animator
263 if (mListeners == null) { in addListener()
264 mListeners = new ArrayList<AnimatorListener>(); in addListener()
266 mListeners.add(listener); in addListener()
276 if (mListeners == null) { in removeListener()
279 mListeners.remove(listener); in removeListener()
280 if (mListeners.size() == 0) { in removeListener()
281 mListeners = null; in removeListener()
292 return mListeners; in getListeners()
330 if (mListeners != null) { in removeAllListeners()
[all …]
/frameworks/base/location/java/android/location/
DLocalListenerHelper.java38 private final HashMap<TListener, Handler> mListeners = new HashMap<>(); field in LocalListenerHelper
56 synchronized (mListeners) { in add()
59 if (mListeners.isEmpty()) { in add()
72 if (mListeners.containsKey(listener)) { in add()
75 mListeners.put(listener, handler); in add()
82 synchronized (mListeners) { in remove()
83 boolean removed = mListeners.containsKey(listener); in remove()
84 mListeners.remove(listener); in remove()
85 boolean isLastRemoved = removed && mListeners.isEmpty(); in remove()
118 synchronized (mListeners) { in foreach()
[all …]
DCountryDetector.java84 private final HashMap<CountryListener, ListenerTransport> mListeners; field in CountryDetector
95 mListeners = new HashMap<CountryListener, ListenerTransport>(); in CountryDetector()
125 synchronized (mListeners) { in addCountryListener()
126 if (!mListeners.containsKey(listener)) { in addCountryListener()
130 mListeners.put(listener, transport); in addCountryListener()
143 synchronized (mListeners) { in removeCountryListener()
144 ListenerTransport transport = mListeners.get(listener); in removeCountryListener()
147 mListeners.remove(listener); in removeCountryListener()
/frameworks/base/core/java/com/android/internal/util/
DProgressReporter.java60 private final RemoteCallbackList<IProgressListener> mListeners = new RemoteCallbackList<>(); field in ProgressReporter
91 mListeners.register(listener); in addListener()
204 mListeners.kill(); in finish()
209 for (int i = mListeners.beginBroadcast() - 1; i >= 0; i--) { in notifyStarted()
211 mListeners.getBroadcastItem(i).onStarted(id, extras); in notifyStarted()
215 mListeners.finishBroadcast(); in notifyStarted()
219 for (int i = mListeners.beginBroadcast() - 1; i >= 0; i--) { in notifyProgress()
221 mListeners.getBroadcastItem(i).onProgress(id, progress, extras); in notifyProgress()
225 mListeners.finishBroadcast(); in notifyProgress()
229 for (int i = mListeners.beginBroadcast() - 1; i >= 0; i--) { in notifyFinished()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/
DPinnedStackListenerForwarder.java35 private List<IPinnedStackListener> mListeners = new ArrayList<>(); field in PinnedStackListenerForwarder
39 mListeners.add(listener); in addListener()
44 mListeners.remove(listener); in removeListener()
49 for (IPinnedStackListener listener : mListeners) { in onListenerRegistered()
58 for (IPinnedStackListener listener : mListeners) { in onMovementBoundsChanged()
67 for (IPinnedStackListener listener : mListeners) { in onImeVisibilityChanged()
75 for (IPinnedStackListener listener : mListeners) { in onShelfVisibilityChanged()
82 for (IPinnedStackListener listener : mListeners) { in onMinimizedStateChanged()
89 for (IPinnedStackListener listener : mListeners) { in onActionsChanged()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DStatusBarStateControllerImpl.java71 private final ArrayList<RankedListener> mListeners = new ArrayList<>(); field in StatusBarStateControllerImpl
145 synchronized (mListeners) { in setState()
146 for (RankedListener rl : new ArrayList<>(mListeners)) { in setState()
151 for (RankedListener rl : new ArrayList<>(mListeners)) { in setState()
155 for (RankedListener rl : new ArrayList<>(mListeners)) { in setState()
186 synchronized (mListeners) { in setIsDozing()
187 for (RankedListener rl : new ArrayList<>(mListeners)) { in setIsDozing()
228 synchronized (mListeners) { in setDozeAmountInternal()
229 for (RankedListener rl : new ArrayList<>(mListeners)) { in setDozeAmountInternal()
257 synchronized (mListeners) { in addCallback()
[all …]
/frameworks/base/tests/OneMedia/src/com/android/onemedia/playback/
DRenderer.java73 protected List<Listener> mListeners = new ArrayList<Listener>(); field in Renderer
150 if (!mListeners.contains(listener)) { in registerListener()
151 mListeners.add(listener); in registerListener()
156 mListeners.remove(listener); in unregisterListener()
164 for (Listener listener : mListeners) { in pushOnError()
170 for (Listener listener : mListeners) { in pushOnStateChanged()
176 for (Listener listener : mListeners) { in pushOnBufferingUpdate()
182 for (Listener listener : mListeners) { in pushOnFocusLost()
188 for (Listener listener : mListeners) { in pushOnNextStarted()
/frameworks/base/packages/CarSystemUI/src/com/android/systemui/car/
DSUWProgressController.java37 private final ArrayList<SUWProgressListener> mListeners = new ArrayList<>(); field in SUWProgressController
72 mListeners.add(listener); in addCallback()
73 if (mListeners.size() == 1) { in addCallback()
83 mListeners.remove(listener); in removeCallback()
84 if (mListeners.size() == 0) { in removeCallback()
103 if (mListeners.size() == 0) { in onUserSwitched()
114 for (int i = mListeners.size() - 1; i >= 0; --i) { in notifyUserSetupInProgressChanged()
115 mListeners.get(i).onUserSetupInProgressChanged(); in notifyUserSetupInProgressChanged()
DCarServiceProvider.java31 private final List<CarServiceLifecycleListener> mListeners = new ArrayList<>(); field in CarServiceProvider
40 synchronized (mListeners) { in CarServiceProvider()
41 for (CarServiceLifecycleListener listener : mListeners) { in CarServiceProvider()
57 mListeners.add(listener); in addListener()
/frameworks/base/services/core/java/com/android/server/twilight/
DTwilightService.java59 private final ArrayMap<TwilightListener, Handler> mListeners = new ArrayMap<>(); field in TwilightService
86 synchronized (mListeners) { in onStart()
87 final boolean wasEmpty = mListeners.isEmpty(); in onStart()
88 mListeners.put(listener, handler); in onStart()
90 if (wasEmpty && !mListeners.isEmpty()) { in onStart()
98 synchronized (mListeners) { in onStart()
99 final boolean wasEmpty = mListeners.isEmpty(); in onStart()
100 mListeners.remove(listener); in onStart()
102 if (!wasEmpty && mListeners.isEmpty()) { in onStart()
110 synchronized (mListeners) { in onStart()
[all …]
/frameworks/base/core/java/android/hardware/
DSensorPrivacyManager.java67 private final ArrayMap<OnSensorPrivacyChangedListener, ISensorPrivacyListener> mListeners; field in SensorPrivacyManager
75 mListeners = new ArrayMap<>(); in SensorPrivacyManager()
118 synchronized (mListeners) { in addSensorPrivacyListener()
119 ISensorPrivacyListener iListener = mListeners.get(listener); in addSensorPrivacyListener()
127 mListeners.put(listener, iListener); in addSensorPrivacyListener()
146 synchronized (mListeners) { in removeSensorPrivacyListener()
147 ISensorPrivacyListener iListener = mListeners.get(listener); in removeSensorPrivacyListener()
149 mListeners.remove(iListener); in removeSensorPrivacyListener()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DConnection.java218 public Set<Listener> mListeners = new CopyOnWriteArraySet<>(); field in Connection
848 mListeners = c.mListeners; in migrateFrom()
871 mListeners.add(listener); in addListener()
880 mListeners.remove(listener); in removeListener()
995 for (Listener l : mListeners) { in setVideoState()
1010 for (Listener l : mListeners) { in setConnectionCapabilities()
1027 for (Listener l : mListeners) { in setCallRadioTech()
1048 for (Listener l : mListeners) { in setAudioQuality()
1076 for (Listener l : mListeners) { in setConnectionExtras()
1163 for (Listener l : mListeners) { in setCallSubstate()
[all …]
/frameworks/base/telecomm/java/android/telecom/
DConference.java81 private final Set<Listener> mListeners = new CopyOnWriteArraySet<>(); field in Conference
402 for (Listener l : mListeners) { in setDisconnected()
424 for (Listener l : mListeners) { in setConnectionCapabilities()
440 for (Listener l : mListeners) { in setConnectionProperties()
458 for (Listener l : mListeners) { in addConnection()
476 for (Listener l : mListeners) { in removeConnection()
509 for (Listener l : mListeners) { in setRingbackRequested()
527 for (Listener l : mListeners) { in setVideoState()
540 for (Listener l : mListeners) { in setVideoProvider()
546 for (Listener l : mListeners) { in fireOnConferenceableConnectionsChanged()
[all …]
/frameworks/base/packages/PrintRecommendationService/src/com/android/printservice/recommendation/util/
DDiscoveryListenerMultiplexer.java121 private final @NonNull ArrayList<NsdManager.DiscoveryListener> mListeners; field in DiscoveryListenerMultiplexer.MultiListener
129 mListeners = listeners; in MultiListener()
156 synchronized (mListeners) { in onServiceFound()
157 int numListeners = mListeners.size(); in onServiceFound()
159 NsdManager.DiscoveryListener listener = mListeners.get(i); in onServiceFound()
168 synchronized (mListeners) { in onServiceLost()
169 int numListeners = mListeners.size(); in onServiceLost()
171 NsdManager.DiscoveryListener listener = mListeners.get(i); in onServiceLost()
/frameworks/base/services/core/java/com/android/server/pm/
DLauncherAppsService.java125 private final PackageCallbackList<IOnAppsChangedListener> mListeners field in LauncherAppsService.LauncherAppsImpl
189 synchronized (mListeners) { in addOnAppsChangedListener()
193 if (mListeners.getRegisteredCallbackCount() == 0) { in addOnAppsChangedListener()
199 mListeners.unregister(listener); in addOnAppsChangedListener()
200 mListeners.register(listener, new BroadcastCookie(UserHandle.of(getCallingUserId()), in addOnAppsChangedListener()
211 synchronized (mListeners) { in removeOnAppsChangedListener()
215 mListeners.unregister(listener); in removeOnAppsChangedListener()
216 if (mListeners.getRegisteredCallbackCount() == 0) { in removeOnAppsChangedListener()
278 synchronized (mListeners) { in checkCallbackCount()
280 Log.d(TAG, "Callback count = " + mListeners.getRegisteredCallbackCount()); in checkCallbackCount()
[all …]
/frameworks/base/core/java/android/view/accessibility/
DCaptioningManager.java51 private final ArrayList<CaptioningChangeListener> mListeners = new ArrayList<>(); field in CaptioningManager
146 synchronized (mListeners) { in addCaptioningChangeListener()
147 if (mListeners.isEmpty()) { in addCaptioningChangeListener()
160 mListeners.add(listener); in addCaptioningChangeListener()
175 synchronized (mListeners) { in removeCaptioningChangeListener()
176 mListeners.remove(listener); in removeCaptioningChangeListener()
178 if (mListeners.isEmpty()) { in removeCaptioningChangeListener()
186 synchronized (mListeners) { in notifyEnabledChanged()
187 for (CaptioningChangeListener listener : mListeners) { in notifyEnabledChanged()
195 synchronized (mListeners) { in notifyUserStyleChanged()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DMediaNotificationView.java47 private ArrayList<VisibilityChangeListener> mListeners; field in MediaNotificationView
178 if (mListeners != null) { in onVisibilityAggregated()
179 for (int i = 0; i < mListeners.size(); i++) { in onVisibilityAggregated()
180 mListeners.get(i).onAggregatedVisibilityChanged(isVisible); in onVisibilityAggregated()
191 if (mListeners == null) { in addVisibilityListener()
192 mListeners = new ArrayList<>(); in addVisibilityListener()
194 if (!mListeners.contains(listener)) { in addVisibilityListener()
195 mListeners.add(listener); in addVisibilityListener()
205 if (mListeners != null) { in removeVisibilityListener()
206 mListeners.remove(listener); in removeVisibilityListener()
/frameworks/base/core/java/android/accessibilityservice/
DAccessibilityService.java835 private ArrayMap<OnMagnificationChangedListener, Handler> mListeners; field in AccessibilityService.MagnificationController
849 if (mListeners != null && !mListeners.isEmpty()) { in onServiceConnectedLocked()
878 if (mListeners == null) { in addListener()
879 mListeners = new ArrayMap<>(); in addListener()
882 final boolean shouldEnableCallback = mListeners.isEmpty(); in addListener()
883 mListeners.put(listener, handler); in addListener()
900 if (mListeners == null) { in removeListener()
905 final int keyIndex = mListeners.indexOfKey(listener); in removeListener()
908 mListeners.removeAt(keyIndex); in removeListener()
911 if (hasKey && mListeners.isEmpty()) { in removeListener()
[all …]
/frameworks/base/services/core/java/com/android/server/slice/
DPinnedSliceState.java52 private final ArrayMap<IBinder, ListenerInfo> mListeners = new ArrayMap<>(); field in PinnedSliceState
124 mListeners.put(token, new ListenerInfo(token, pkg, true, in pin()
138 mListeners.remove(token); in unpin()
145 return !mListeners.isEmpty(); in isListening()
152 return !mPinnedPkgs.isEmpty() || !mListeners.isEmpty(); in hasPinOrListener()
174 for (int i = mListeners.size() - 1; i >= 0; i--) { in handleRecheckListeners()
175 ListenerInfo l = mListeners.valueAt(i); in handleRecheckListeners()
177 mListeners.removeAt(i); in handleRecheckListeners()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DProximitySensor.java57 private List<ProximitySensorListener> mListeners = new ArrayList<>(); field in ProximitySensor
140 mListeners.add(listener); in register()
141 if (mListeners.size() == 1) { in register()
157 mListeners.remove(listener); in unregister()
158 if (mListeners.size() == 0) { in unregister()
174 mListeners.forEach(proximitySensorListener -> in onSensorEvent()

1234