Home
last modified time | relevance | path

Searched refs:listeners (Results 1 – 25 of 175) sorted by relevance

1234567

/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DConfigurationControllerImpl.kt34 private val listeners: MutableList<ConfigurationListener> = ArrayList() constant
63 val listeners = synchronized(this.listeners) { in notifyThemeChanged() constant
64 ArrayList(this.listeners) in notifyThemeChanged()
67 listeners.filterForEach({ this.listeners.contains(it) }) { in notifyThemeChanged()
74 val listeners = synchronized(this.listeners) { in onConfigurationChanged() constant
75 ArrayList(this.listeners) in onConfigurationChanged()
77 listeners.filterForEach({ this.listeners.contains(it) }) { in onConfigurationChanged()
86 listeners.filterForEach({ this.listeners.contains(it) }) { in onConfigurationChanged()
96 listeners.filterForEach({ this.listeners.contains(it) }) { in onConfigurationChanged()
108 listeners.filterForEach({ this.listeners.contains(it) }) { in onConfigurationChanged()
[all …]
DStatusBarLocationPublisher.kt34 private val listeners = mutableSetOf<WeakReference<StatusBarMarginUpdatedListener>>() in <lambda>() constant in com.android.systemui.statusbar.phone.StatusBarLocationPublisher
42 listeners.add(WeakReference(listener)) in <lambda>()
47 for (l in listeners) { in <lambda>()
54 listeners.remove(toRemove) in <lambda>()
68 listenerList = listeners.toList() in <lambda>()
73 listeners.remove(wrapper) in <lambda>()
/frameworks/base/core/java/android/view/
DViewTreeObserver.java1065 final CopyOnWriteArrayList<OnWindowAttachListener> listeners in dispatchOnWindowAttachedChange() local
1067 if (listeners != null && listeners.size() > 0) { in dispatchOnWindowAttachedChange()
1068 for (OnWindowAttachListener listener : listeners) { in dispatchOnWindowAttachedChange()
1083 final CopyOnWriteArrayList<OnWindowFocusChangeListener> listeners in dispatchOnWindowFocusChange() local
1085 if (listeners != null && listeners.size() > 0) { in dispatchOnWindowFocusChange()
1086 for (OnWindowFocusChangeListener listener : listeners) { in dispatchOnWindowFocusChange()
1100 final CopyOnWriteArrayList<OnWindowVisibilityChangeListener> listeners = in dispatchOnWindowVisibilityChange() local
1102 if (listeners != null && listeners.size() > 0) { in dispatchOnWindowVisibilityChange()
1103 for (OnWindowVisibilityChangeListener listener : listeners) { in dispatchOnWindowVisibilityChange()
1118 final CopyOnWriteArrayList<OnGlobalFocusChangeListener> listeners = mOnGlobalFocusListeners; in dispatchOnGlobalFocusChange() local
[all …]
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/
DDisplayInsetsController.java73 CopyOnWriteArrayList<OnInsetsChangedListener> listeners = mListeners.get(displayId); in addInsetsChangedListener() local
74 if (listeners == null) { in addInsetsChangedListener()
75 listeners = new CopyOnWriteArrayList<>(); in addInsetsChangedListener()
76 mListeners.put(displayId, listeners); in addInsetsChangedListener()
78 if (!listeners.contains(listener)) { in addInsetsChangedListener()
79 listeners.add(listener); in addInsetsChangedListener()
87 CopyOnWriteArrayList<OnInsetsChangedListener> listeners = mListeners.get(displayId); in removeInsetsChangedListener() local
88 if (listeners == null) { in removeInsetsChangedListener()
91 listeners.remove(listener); in removeInsetsChangedListener()
140 CopyOnWriteArrayList<OnInsetsChangedListener> listeners = mListeners.get(mDisplayId); in insetsChanged() local
[all …]
/frameworks/base/media/java/android/media/
DCallbackUtil.java66 @NonNull T listener, @Nullable ArrayList<ListenerInfo<T>> listeners) { in getListenerInfo() argument
67 if (listeners == null) { in getListenerInfo()
70 for (ListenerInfo<T> info : listeners) { in getListenerInfo()
86 @Nullable ArrayList<ListenerInfo<T>> listeners) { in hasListener() argument
87 return getListenerInfo(listener, listeners) != null; in hasListener()
98 @Nullable ArrayList<ListenerInfo<T>> listeners) { in removeListener() argument
99 final ListenerInfo<T> infoToRemove = getListenerInfo(listener, listeners); in removeListener()
101 listeners.remove(infoToRemove); in removeListener()
129 @Nullable ArrayList<ListenerInfo<T>> listeners, in addListener() argument
136 if (hasListener(listener, listeners)) { in addListener()
[all …]
DAudioPortEventHandler.java74 ArrayList<AudioManager.OnAudioPortUpdateListener> listeners; in init()
77 listeners = new ArrayList<AudioManager.OnAudioPortUpdateListener>(); in init()
79 listeners.add((AudioManager.OnAudioPortUpdateListener)msg.obj); in init()
82 listeners = (ArrayList<AudioManager.OnAudioPortUpdateListener>) in init()
94 if (listeners.isEmpty()) { in init()
117 for (int i = 0; i < listeners.size(); i++) { in init()
118 listeners.get(i).onAudioPortListUpdate(portList); in init()
127 for (int i = 0; i < listeners.size(); i++) { in init()
128 listeners.get(i).onAudioPatchListUpdate(patchList); in init()
133 for (int i = 0; i < listeners.size(); i++) { in init()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/unfold/
DFakeUnfoldTransitionProvider.kt7 private val listeners = mutableListOf<TransitionProgressListener>() constant
10 listeners.clear() in destroy()
14 listeners.add(listener) in addCallback()
18 listeners.remove(listener) in removeCallback()
22 listeners.forEach { it.onTransitionStarted() } in onTransitionStarted()
26 listeners.forEach { it.onTransitionFinished() } in onTransitionFinished()
30 listeners.forEach { it.onTransitionFinishing() } in onTransitionFinishing()
34 listeners.forEach { it.onTransitionProgress(progress) } in onTransitionProgress()
/frameworks/base/packages/SystemUI/src/com/android/systemui/
DBootCompleteCacheImpl.kt48 private val listeners = mutableListOf<WeakReference<BootCompleteCache.BootCompleteListener>>() constant
64 synchronized(listeners) { in isBootComplete()
65 listeners.forEach { in isBootComplete()
68 listeners.clear() in isBootComplete()
83 synchronized(listeners) { in addListener()
85 listeners.add(WeakReference(listener)) in addListener()
98 synchronized(listeners) { in removeListener()
99 listeners.removeIf { it.get() == null || it.get() === listener } in removeListener()
109 synchronized(listeners) { in dump()
110 listeners.forEach { in dump()
/frameworks/base/services/core/java/com/android/server/wm/
DWallpaperVisibilityListeners.java37 RemoteCallbackList<IWallpaperVisibilityListener> listeners = in registerWallpaperVisibilityListener() local
39 if (listeners == null) { in registerWallpaperVisibilityListener()
40 listeners = new RemoteCallbackList<>(); in registerWallpaperVisibilityListener()
41 mDisplayListeners.append(displayId, listeners); in registerWallpaperVisibilityListener()
43 listeners.register(listener); in registerWallpaperVisibilityListener()
48 RemoteCallbackList<IWallpaperVisibilityListener> listeners = in unregisterWallpaperVisibilityListener() local
50 if (listeners == null) { in unregisterWallpaperVisibilityListener()
53 listeners.unregister(listener); in unregisterWallpaperVisibilityListener()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/unfold/util/
DTestFoldStateProvider.kt26 private val listeners: MutableList<FoldUpdatesListener> = arrayListOf() constant in com.android.systemui.unfold.util.TestFoldStateProvider
28 get() = listeners.isNotEmpty()
34 listeners.clear() in stop()
43 listeners += listener in addCallback()
47 listeners -= listener in removeCallback()
54 listeners.forEach { it.onFoldUpdate(update) } in sendFoldUpdate()
58 listeners.forEach { it.onHingeAngleUpdate(angle) } in sendHingeAngleUpdate()
62 listeners.forEach { it.onUnfoldedScreenAvailable() } in sendUnfoldedScreenAvailable()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DNamedListenerSet.kt37 private val listeners = CopyOnWriteArrayList<NamedListener>() constant
40 get() = listeners.size
42 override fun isEmpty() = listeners.isEmpty() in isEmpty()
45 listeners.iterator().forEach { yield(it.listener) } in isEmpty()
49 listeners.count { it.listener in elements } == elements.size in containsAll()
51 override fun contains(element: E) = listeners.firstOrNull { it.listener == element } != null in <lambda>()
53 override fun addIfAbsent(element: E): Boolean = listeners.addIfAbsent(NamedListener(element)) in addIfAbsent()
55 override fun remove(element: E): Boolean = listeners.removeIf { it.listener == element } in addIfAbsent()
96 fun namedIterator(): Iterator<NamedListener> = listeners.iterator()
DCopyOnLoopListenerSet.kt29 private constructor(private val listeners: ArrayList<E>) : constant in com.android.systemui.util.CopyOnLoopListenerSet
30 Collection<E> by listeners, IListenerSet<E> {
36 override fun iterator(): Iterator<E> = listeners.toArray().iterator() as Iterator<E> in iterator()
39 if (element in listeners) { in iterator()
42 listeners.add(element)
45 override fun remove(element: E): Boolean = listeners.remove(element)
/frameworks/base/packages/SystemUI/src/com/android/systemui/telephony/
DTelephonyCallback.java57 List<ActiveDataSubscriptionIdListener> listeners; in onActiveDataSubscriptionIdChanged() local
59 listeners = new ArrayList<>(mActiveDataSubscriptionIdListeners); in onActiveDataSubscriptionIdChanged()
61 listeners.forEach(listener -> listener.onActiveDataSubscriptionIdChanged(subId)); in onActiveDataSubscriptionIdChanged()
74 List<CallStateListener> listeners; in onCallStateChanged() local
76 listeners = new ArrayList<>(mCallStateListeners); in onCallStateChanged()
78 listeners.forEach(listener -> listener.onCallStateChanged(state)); in onCallStateChanged()
91 List<ServiceStateListener> listeners; in onServiceStateChanged() local
93 listeners = new ArrayList<>(mServiceStateListeners); in onServiceStateChanged()
95 listeners.forEach(listener -> listener.onServiceStateChanged(serviceState)); in onServiceStateChanged()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/
DRootTaskDisplayAreaOrganizer.java91 ArrayList<RootTaskDisplayAreaListener> listeners = mListeners.get(displayId); in registerListener() local
92 if (listeners == null) { in registerListener()
93 listeners = new ArrayList<>(); in registerListener()
94 mListeners.put(displayId, listeners); in registerListener()
97 listeners.add(listener); in registerListener()
107 final List<RootTaskDisplayAreaListener> listeners = mListeners.valueAt(i); in unregisterListener() local
108 if (listeners == null) continue; in unregisterListener()
109 listeners.remove(listener); in unregisterListener()
161 ArrayList<RootTaskDisplayAreaListener> listeners = mListeners.get(displayId); in onDisplayAreaAppeared() local
162 if (listeners != null) { in onDisplayAreaAppeared()
[all …]
/frameworks/base/packages/SystemUI/unfold/src/com/android/systemui/unfold/util/
DScopedUnfoldTransitionProgressProvider.kt43 private val listeners = CopyOnWriteArrayList<TransitionProgressListener>() constant
109 listeners.forEach { it.onTransitionStarted() } in reportLastProgressIfNeeded()
111 listeners.forEach { it.onTransitionProgress(lastTransitionProgress) } in reportLastProgressIfNeeded()
115 listeners.forEach { it.onTransitionFinished() } in reportLastProgressIfNeeded()
121 listeners += listener in addCallback()
125 listeners -= listener in removeCallback()
138 listeners.forEach { it.onTransitionStarted() } in onTransitionStarted()
147 listeners.forEach { it.onTransitionProgress(progress) } in onTransitionProgress()
157 listeners.forEach { it.onTransitionFinishing() } in onTransitionFinishing()
166 listeners.forEach { it.onTransitionFinished() } in onTransitionFinished()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/
DNotifPipelineChoreographer.kt67 private val listeners = ListenerSet<Runnable>() constant in com.android.systemui.statusbar.notification.collection.NotifPipelineChoreographerImpl
75 listeners.forEach { it.run() } in <lambda>()
97 listeners.addIfAbsent(onEvalListener) in addOnEvalListener()
101 listeners.remove(onEvalListener) in removeOnEvalListener()
108 listeners.forEach { it.run() } in onTimeout()
116 val listeners = ListenerSet<Runnable>() constant in com.android.systemui.statusbar.notification.collection.FakeNotifPipelineChoreographer
121 listeners.forEach { it.run() } in runIfScheduled()
134 listeners.addIfAbsent(onEvalListener) in addOnEvalListener()
138 listeners.remove(onEvalListener) in removeOnEvalListener()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/
DFakeConfigurationController.kt13 private var listeners = mutableListOf<ConfigurationController.ConfigurationListener>() variable in com.android.systemui.statusbar.policy.FakeConfigurationController
17 listeners += listener in addCallback()
21 listeners -= listener in removeCallback()
25 listeners.forEach { it.onConfigChanged(newConfiguration) } in onConfigurationChanged()
29 listeners.forEach { it.onThemeChanged() } in notifyThemeChanged()
33 listeners.forEach { it.onDensityOrFontScaleChanged() } in notifyDensityOrFontScaleChanged()
42 listeners.forEach { it.onLayoutDirectionChanged(isRtl) } in notifyLayoutDirectionChanged()
/frameworks/base/packages/SystemUI/src/com/android/systemui/smartspace/preconditions/
DLockscreenPrecondition.kt31 private var listeners = mutableSetOf<SmartspacePrecondition.Listener>() variable
68 synchronized(listeners) { in updateDeviceReadiness()
69 listeners.forEach { it.onCriteriaChanged() } in updateDeviceReadiness()
74 synchronized(listeners) { in addListener()
75 listeners += listener in addListener()
82 synchronized(listeners) { in removeListener()
83 listeners -= listener in removeListener()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DLifecycleScreenStatusProvider.kt33 private val listeners: MutableList<ScreenListener> = CopyOnWriteArrayList() constant
36 listeners.remove(listener) in removeCallback()
40 listeners.add(listener) in addCallback()
45 listeners.forEach(ScreenListener::onScreenTurnedOn) in onScreenTurnedOn()
51 listeners.forEach(ScreenListener::onScreenTurningOff) in onScreenTurningOff()
57 listeners.forEach(ScreenListener::onScreenTurningOn) in onScreenTurningOn()
/frameworks/base/packages/SystemUI/unfold/src/com/android/systemui/unfold/progress/
DRemoteUnfoldTransitionReceiver.kt42 private val listeners: MutableSet<TransitionProgressListener> = mutableSetOf() constant
74 listeners += listener in addCallback()
78 listeners -= listener in removeCallback()
82 listeners.clear() in destroy()
88 listeners.forEach { it.onTransitionStarted() } in onTransitionStarted()
93 listeners.forEach { it.onTransitionProgress(progress) } in onTransitionProgress()
98 listeners.forEach { it.onTransitionFinished() } in onTransitionFinished()
DFixedTimingTransitionProgressProvider.kt43 listeners.forEach { it.onTransitionProgress(value) } in <lambda>()
47 private val listeners: MutableList<TransitionProgressListener> = mutableListOf() constant in com.android.systemui.unfold.progress.FixedTimingTransitionProgressProvider
71 listeners.add(listener) in addCallback()
75 listeners.remove(listener) in removeCallback()
92 listeners.forEach { it.onTransitionStarted() } in get()
93 listeners.forEach { it.onTransitionFinishing() } in get()
97 listeners.forEach { it.onTransitionFinished() } in get()
/frameworks/base/graphics/java/android/graphics/animation/
DRenderNodeAnimator.java215 final ArrayList<AnimatorListener> listeners = cloneListeners(); in notifyStartListeners() local
216 final int numListeners = listeners == null ? 0 : listeners.size(); in notifyStartListeners()
218 listeners.get(i).onAnimationStart(this); in notifyStartListeners()
230 final ArrayList<AnimatorListener> listeners = cloneListeners(); in cancel() local
231 final int numListeners = listeners == null ? 0 : listeners.size(); in cancel()
233 listeners.get(i).onAnimationCancel(this); in cancel()
367 final ArrayList<AnimatorListener> listeners = cloneListeners(); in onFinished() local
368 final int numListeners = listeners == null ? 0 : listeners.size(); in onFinished()
370 listeners.get(i).onAnimationEnd(this); in onFinished()
388 ArrayList<AnimatorListener> listeners = getListeners(); in cloneListeners() local
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/provider/
DLaunchFullScreenIntentProvider.kt33 private val listeners = ListenerSet<Listener>() constant
40 listeners.addIfAbsent(listener) in registerListener()
45 listeners.remove(listener) in removeListener()
53 if (listeners.isEmpty()) { in launchFullScreenIntent()
58 for (listener in listeners) { in launchFullScreenIntent()
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/flags/
DFlagManager.kt62 private val listeners: MutableSet<PerFlagListener> = mutableSetOf() in <lambda>() constant in com.android.systemui.flags.FlagManager
127 synchronized(listeners) { in <lambda>()
128 val registerNeeded = listeners.isEmpty() in <lambda>()
129 listeners.add(PerFlagListener(flag.name, listener)) in <lambda>()
137 synchronized(listeners) { in <lambda>()
138 if (listeners.isEmpty()) { in <lambda>()
141 listeners.removeIf { it.listener == listener } in <lambda>()
142 if (listeners.isEmpty()) { in <lambda>()
173 val filteredListeners: List<FlagListenable.Listener> = synchronized(listeners) { in <lambda>()
174 listeners.mapNotNull { if (it.name == name) it.listener else null } in <lambda>()
/frameworks/base/services/core/java/com/android/server/power/stats/
DPowerStatsUidResolver.java103 List<Listener> listeners = mListeners; in noteIsolatedUidAdded() local
104 for (int i = listeners.size() - 1; i >= 0; i--) { in noteIsolatedUidAdded()
105 listeners.get(i).onIsolatedUidAdded(isolatedUid, parentUid); in noteIsolatedUidAdded()
125 List<Listener> listeners = mListeners; in noteIsolatedUidRemoved() local
126 for (int i = listeners.size() - 1; i >= 0; i--) { in noteIsolatedUidRemoved()
127 listeners.get(i).onBeforeIsolatedUidRemoved(isolatedUid, parentUid); in noteIsolatedUidRemoved()
177 List<Listener> listeners = mListeners; in releaseIsolatedUid() local
178 for (int i = listeners.size() - 1; i >= 0; i--) { in releaseIsolatedUid()
179 listeners.get(i).onAfterIsolatedUidRemoved(isolatedUid, parentUid); in releaseIsolatedUid()

1234567