Home
last modified time | relevance | path

Searched refs:callbacks (Results 1 – 25 of 339) sorted by relevance

12345678910>>...14

/frameworks/base/core/java/android/app/
DApplication.java353 Object[] callbacks = collectActivityLifecycleCallbacks(); in dispatchActivityPreCreated() local
354 if (callbacks != null) { in dispatchActivityPreCreated()
355 for (int i = 0; i < callbacks.length; i++) { in dispatchActivityPreCreated()
356 ((ActivityLifecycleCallbacks) callbacks[i]).onActivityPreCreated(activity, in dispatchActivityPreCreated()
365 Object[] callbacks = collectActivityLifecycleCallbacks(); in dispatchActivityCreated() local
366 if (callbacks != null) { in dispatchActivityCreated()
367 for (int i=0; i<callbacks.length; i++) { in dispatchActivityCreated()
368 ((ActivityLifecycleCallbacks)callbacks[i]).onActivityCreated(activity, in dispatchActivityCreated()
377 Object[] callbacks = collectActivityLifecycleCallbacks(); in dispatchActivityPostCreated() local
378 if (callbacks != null) { in dispatchActivityPostCreated()
[all …]
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/util/
DChoreographerCallbacksTest.java58 ChoreographerCallbacks callbacks = new ChoreographerCallbacks(); in testAddAndExecuteInOrder() local
61 callbacks.add((Runnable) () -> order.add(2), null, 200); in testAddAndExecuteInOrder()
62 callbacks.add((FrameCallback) frameTimeNanos -> order.add(1), null, 100); in testAddAndExecuteInOrder()
63 callbacks.execute(200, logger); in testAddAndExecuteInOrder()
71 ChoreographerCallbacks callbacks = new ChoreographerCallbacks(); in testAddAndExecuteOnlyDue() local
74 callbacks.add((Runnable) () -> order.add(2), null, 200); in testAddAndExecuteOnlyDue()
75 callbacks.add((FrameCallback) frameTimeNanos -> order.add(1), null, 100); in testAddAndExecuteOnlyDue()
76 callbacks.execute(100, logger); in testAddAndExecuteOnlyDue()
84 ChoreographerCallbacks callbacks = new ChoreographerCallbacks(); in testRemove() local
88 callbacks.add(runnable, null, 200); in testRemove()
[all …]
/frameworks/base/core/java/android/content/
DComponentCallbacksController.java51 public void registerCallbacks(@NonNull ComponentCallbacks callbacks) { in registerCallbacks() argument
56 mComponentCallbacks.add(callbacks); in registerCallbacks()
65 public void unregisterCallbacks(@NonNull ComponentCallbacks callbacks) { in unregisterCallbacks() argument
70 mComponentCallbacks.remove(callbacks); in unregisterCallbacks()
91 forAllComponentCallbacks(callbacks -> callbacks.onConfigurationChanged(newConfig)); in dispatchConfigurationChanged()
107 forAllComponentCallbacks(callbacks -> { in dispatchTrimMemory()
108 if (callbacks instanceof ComponentCallbacks2) { in dispatchTrimMemory()
109 ((ComponentCallbacks2) callbacks).onTrimMemory(level); in dispatchTrimMemory()
123 for (ComponentCallbacks callbacks : callbacksArray) { in forAllComponentCallbacks()
124 callbacksConsumer.accept(callbacks); in forAllComponentCallbacks()
/frameworks/base/core/tests/coretests/src/android/app/activity/
DRegisterComponentCallbacksTest.java64 final TestComponentCallbacks2 callbacks = new TestComponentCallbacks2(); in testRegisterComponentCallbacks() local
74 activity.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacks()
76 activity.registerComponentCallbacks(callbacks); in testRegisterComponentCallbacks()
79 assertThat(callbacks.mConfiguration).isEqualTo(config); in testRegisterComponentCallbacks()
82 assertThat(callbacks.mLevel).isEqualTo(trimMemoryLevel); in testRegisterComponentCallbacks()
85 assertThat(callbacks.mLowMemoryCalled).isTrue(); in testRegisterComponentCallbacks()
87 activity.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacks()
95 final TestComponentCallbacks2 callbacks = new TestComponentCallbacks2(); in testRegisterComponentCallbacksBeforeT() local
105 activity.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacksBeforeT()
107 activity.registerComponentCallbacks(callbacks); in testRegisterComponentCallbacksBeforeT()
[all …]
/frameworks/base/core/java/android/service/smartspace/
DSmartspaceService.java178 final ArrayList<CallbackWrapper> callbacks = mSessionCallbacks.get(sessionId); in doRegisterSmartspaceUpdates() local
179 if (callbacks == null) { in doRegisterSmartspaceUpdates()
184 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doRegisterSmartspaceUpdates()
186 callbacks.add(new CallbackWrapper(callback, in doRegisterSmartspaceUpdates()
189 () -> removeCallbackWrapper(callbacks, callbackWrapper)))); in doRegisterSmartspaceUpdates()
198 final ArrayList<CallbackWrapper> callbacks = mSessionCallbacks.get(sessionId); in doUnregisterSmartspaceUpdates() local
199 if (callbacks == null) { in doUnregisterSmartspaceUpdates()
204 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doUnregisterSmartspaceUpdates()
205 removeCallbackWrapper(callbacks, wrapper); in doUnregisterSmartspaceUpdates()
213 final ArrayList<CallbackWrapper> callbacks = mSessionCallbacks.get(sessionId); in doRequestPredictionUpdate() local
[all …]
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DCallbackRegistryTest.java71 ArrayList<Integer> callbacks = registry.copyListeners(); in testAddListener() local
72 assertEquals(1, callbacks.size()); in testAddListener()
73 assertEquals(callback, callbacks.get(0)); in testAddListener()
76 callbacks = registry.copyListeners(); in testAddListener()
77 assertEquals(1, callbacks.size()); in testAddListener()
78 assertEquals(callback, callbacks.get(0)); in testAddListener()
82 callbacks = registry.copyListeners(); in testAddListener()
83 assertEquals(2, callbacks.size()); in testAddListener()
84 assertEquals(callback, callbacks.get(0)); in testAddListener()
85 assertEquals(otherListener, callbacks.get(1)); in testAddListener()
[all …]
/frameworks/base/core/java/android/service/appprediction/
DAppPredictionService.java209 final ArrayList<CallbackWrapper> callbacks = mSessionCallbacks.get(sessionId); in doRegisterPredictionUpdates() local
210 if (callbacks == null) { in doRegisterPredictionUpdates()
215 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doRegisterPredictionUpdates()
217 callbacks.add(new CallbackWrapper(callback, in doRegisterPredictionUpdates()
219 mHandler.post(() -> removeCallbackWrapper(callbacks, callbackWrapper)))); in doRegisterPredictionUpdates()
220 if (callbacks.size() == 1) { in doRegisterPredictionUpdates()
234 final ArrayList<CallbackWrapper> callbacks = mSessionCallbacks.get(sessionId); in doUnregisterPredictionUpdates() local
235 if (callbacks == null) { in doUnregisterPredictionUpdates()
240 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doUnregisterPredictionUpdates()
241 removeCallbackWrapper(callbacks, wrapper); in doUnregisterPredictionUpdates()
[all …]
/frameworks/base/media/java/android/service/media/
DIMediaBrowserService.aidl15 void connect(String pkg, in Bundle rootHints, IMediaBrowserServiceCallbacks callbacks); in connect() argument
16 void disconnect(IMediaBrowserServiceCallbacks callbacks); in disconnect() argument
18 void addSubscriptionDeprecated(String uri, IMediaBrowserServiceCallbacks callbacks); in addSubscriptionDeprecated() argument
19 void removeSubscriptionDeprecated(String uri, IMediaBrowserServiceCallbacks callbacks); in removeSubscriptionDeprecated() argument
21 void getMediaItem(String uri, in ResultReceiver cb, IMediaBrowserServiceCallbacks callbacks); in getMediaItem() argument
23 IMediaBrowserServiceCallbacks callbacks); in addSubscription() argument
24 void removeSubscription(String uri, in IBinder token, IMediaBrowserServiceCallbacks callbacks); in removeSubscription() argument
DMediaBrowserService.java128 public final IMediaBrowserServiceCallbacks callbacks; field in MediaBrowserService.ConnectionRecord
138 IMediaBrowserServiceCallbacks callbacks, in ConnectionRecord() argument
145 this.callbacks = callbacks; in ConnectionRecord()
152 () -> serviceState.mConnections.remove(callbacks.asBinder())); in binderDied()
237 final IMediaBrowserServiceCallbacks callbacks) { in connect() argument
251 () -> serviceState.connectOnHandler(pkg, pid, uid, rootHints, callbacks)); in connect()
255 public void disconnect(final IMediaBrowserServiceCallbacks callbacks) { in disconnect() argument
262 () -> serviceState.removeConnectionRecordOnHandler(callbacks)); in disconnect()
266 public void addSubscriptionDeprecated(String id, IMediaBrowserServiceCallbacks callbacks) { in addSubscriptionDeprecated() argument
272 final IMediaBrowserServiceCallbacks callbacks) { in addSubscription() argument
[all …]
/frameworks/base/core/java/android/service/search/
DSearchUiService.java190 final ArrayList<CallbackWrapper> callbacks = mSessionEmptyQueryResultCallbacks.get( in doRegisterEmptyQueryResultUpdateCallback() local
192 if (callbacks == null) { in doRegisterEmptyQueryResultUpdateCallback()
197 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doRegisterEmptyQueryResultUpdateCallback()
199 callbacks.add(new CallbackWrapper(callback, in doRegisterEmptyQueryResultUpdateCallback()
202 removeCallbackWrapper(callbacks, callbackWrapper)))); in doRegisterEmptyQueryResultUpdateCallback()
203 if (callbacks.size() == 1) { in doRegisterEmptyQueryResultUpdateCallback()
219 final ArrayList<CallbackWrapper> callbacks = mSessionEmptyQueryResultCallbacks.get( in doUnregisterEmptyQueryResultUpdateCallback() local
221 if (callbacks == null) { in doUnregisterEmptyQueryResultUpdateCallback()
226 final CallbackWrapper wrapper = findCallbackWrapper(callbacks, callback); in doUnregisterEmptyQueryResultUpdateCallback()
227 removeCallbackWrapper(callbacks, wrapper); in doUnregisterEmptyQueryResultUpdateCallback()
[all …]
/frameworks/libs/native_bridge_support/android_api/libcamera2ndk/proxy/
Dandroid_camera_trampolines.cc248 ACameraCaptureSession_captureCallbacks* callbacks, in DoThunk_ACameraCaptureSession_capture() argument
254 ToHostACameraCaptureSession_captureCallbacks(callbacks, &host_callbacks_holder); in DoThunk_ACameraCaptureSession_capture()
261 ACameraCaptureSession_captureCallbacksV2* callbacks, in DoThunk_ACameraCaptureSession_captureV2() argument
267 ToHostACameraCaptureSession_captureCallbacksV2(callbacks, &host_callbacks_holder); in DoThunk_ACameraCaptureSession_captureV2()
274 ACameraCaptureSession_captureCallbacks* callbacks, in DoThunk_ACameraCaptureSession_setRepeatingRequest() argument
280 ToHostACameraCaptureSession_captureCallbacks(callbacks, &host_callbacks_holder); in DoThunk_ACameraCaptureSession_setRepeatingRequest()
287 ACameraCaptureSession_captureCallbacksV2* callbacks, in DoThunk_ACameraCaptureSession_setRepeatingRequestV2() argument
293 ToHostACameraCaptureSession_captureCallbacksV2(callbacks, &host_callbacks_holder); in DoThunk_ACameraCaptureSession_setRepeatingRequestV2()
300 ACameraCaptureSession_logicalCamera_captureCallbacks* callbacks, in DoThunk_ACameraCaptureSession_logicalCamera_capture() argument
306 ToHostACameraCaptureSession_logicalCamera_captureCallbacks(callbacks, &host_callbacks_holder); in DoThunk_ACameraCaptureSession_logicalCamera_capture()
[all …]
/frameworks/base/core/jni/
Dandroid_app_NativeActivity.cpp121 memset(&callbacks, 0, sizeof(callbacks)); in NativeCode()
129 if (callbacks.onDestroy != NULL) { in ~NativeCode()
130 callbacks.onDestroy(this); in ~NativeCode()
162 ANativeActivityCallbacks callbacks; member
344 code->ANativeActivity::callbacks = &code->callbacks; in loadNativeCode_native()
419 if (code->callbacks.onStart != NULL) { in onStart_native()
420 code->callbacks.onStart(code); in onStart_native()
433 if (code->callbacks.onResume != NULL) { in onResume_native()
434 code->callbacks.onResume(code); in onResume_native()
450 if (code->callbacks.onSaveInstanceState != NULL) { in onSaveInstanceState_native()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/
DContextWrapperTest.java68 final ComponentCallbacks callbacks = new TestComponentCallbacks2(); in testRegisterComponentCallbacksWithoutBaseContextBeforeT() local
71 wrapper.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacksWithoutBaseContextBeforeT()
73 wrapper.registerComponentCallbacks(callbacks); in testRegisterComponentCallbacksWithoutBaseContextBeforeT()
76 assertThat(wrapper.mCallbacksRegisteredToSuper.get(0)).isEqualTo(callbacks); in testRegisterComponentCallbacksWithoutBaseContextBeforeT()
78 wrapper.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacksWithoutBaseContextBeforeT()
90 final ComponentCallbacks callbacks = new TestComponentCallbacks2(); in testRegisterComponentCallbacksWithoutBaseContextAfterT() local
93 wrapper.unregisterComponentCallbacks(callbacks); in testRegisterComponentCallbacksWithoutBaseContextAfterT()
101 wrapper.registerComponentCallbacks(callbacks); in testRegisterComponentCallbacksWithoutBaseContextAfterT()
122 final TestComponentCallbacks2 callbacks = new TestComponentCallbacks2(); in testRegisterComponentCallbacks() local
124 wrapper.registerComponentCallbacks(callbacks); in testRegisterComponentCallbacks()
[all …]
/frameworks/base/native/android/
Dsurface_control_input_receiver.cpp42 AInputReceiverCallbacks* callbacks) in InputReceiver() argument
43 : mCallbacks(callbacks), in InputReceiver()
113 AInputReceiverCallbacks* callbacks) in BatchedInputReceiver() argument
115 callbacks), in BatchedInputReceiver()
157 AInputReceiverCallbacks* callbacks) { in AInputReceiver_createBatchedInputReceiver() argument
169 callbacks)); in AInputReceiver_createBatchedInputReceiver()
175 AInputReceiverCallbacks* callbacks) { in AInputReceiver_createUnbatchedInputReceiver() argument
186 clientInputTransferToken, callbacks)); in AInputReceiver_createUnbatchedInputReceiver()
201 void AInputReceiverCallbacks_setMotionEventCallback(AInputReceiverCallbacks* callbacks, in AInputReceiverCallbacks_setMotionEventCallback() argument
203 callbacks->onMotionEvent = onMotionEvent; in AInputReceiverCallbacks_setMotionEventCallback()
[all …]
/frameworks/libs/binary_translation/native_activity/
Dnative_activity_wrapper.cc41 return ToHostAddr<Guest_ANativeActivityCallbacks>(activity->callbacks); in GetGuestCallbacks()
48 guest_activity->callbacks = ToGuestAddr(guest_callbacks); in AllocGuestNativeActivity()
244 ANativeActivityCallbacks* callbacks = activity->callbacks; in WrapNativeActivityCallbacks() local
245 callbacks->onStart = Wrap_OnStart; in WrapNativeActivityCallbacks()
246 callbacks->onResume = Wrap_OnResume; in WrapNativeActivityCallbacks()
247 callbacks->onSaveInstanceState = Wrap_OnSaveInstanceState; in WrapNativeActivityCallbacks()
248 callbacks->onPause = Wrap_OnPause; in WrapNativeActivityCallbacks()
249 callbacks->onStop = Wrap_OnStop; in WrapNativeActivityCallbacks()
250 callbacks->onDestroy = Wrap_OnDestroy; in WrapNativeActivityCallbacks()
251 callbacks->onWindowFocusChanged = Wrap_OnWindowFocusChanged; in WrapNativeActivityCallbacks()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/
DFakeStatusBarStateController.kt51 @JvmField val callbacks: Set<StatusBarStateController.StateListener> = _callbacks constant in com.android.systemui.statusbar.FakeStatusBarStateController
63 callbacks.forEach { it.onStatePreChange(oldState, newState) } in getState()
67 callbacks.forEach { it.onStateChanged(newState) } in getState()
68 callbacks.forEach { it.onStatePostChange() } in getState()
77 callbacks.forEach { it.onUpcomingStateChanged(upcomingState) } in getCurrentOrUpcomingState()
85 callbacks.forEach { it.onDozingChanged(dozing) } in isDozing()
94 callbacks.forEach { it.onExpandedChanged(expanded) } in isExpanded()
102 callbacks.forEach { it.onPulsingChanged(pulsing) } in isPulsing()
110 callbacks.forEach { it.onDreamingChanged(dreaming) } in isDreaming()
135 callbacks.forEach { it.onDozeAmountChanged(dozeAmount, interpolatedDozeAmount) } in getInterpolatedDozeAmount()
/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/
DDreamOverlayCallbackController.kt28 private val callbacks = mutableSetOf<DreamOverlayCallbackController.Callback>() constant in com.android.systemui.dreams.DreamOverlayCallbackController
34 callbacks.add(callback) in addCallback()
38 callbacks.remove(callback) in removeCallback()
43 callbacks.forEach { it.onWakeUp() } in onWakeUp()
48 callbacks.forEach { it.onStartDream() } in onStartDream()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/gesture/
DGenericGestureDetector.kt47 private val callbacks: MutableMap<String, (MotionEvent) -> Unit> = mutableMapOf() constant in com.android.systemui.statusbar.gesture.GenericGestureDetector
58 val callbacksWasEmpty = callbacks.isEmpty() in addOnGestureDetectedCallback()
59 callbacks[tag] = callback in addOnGestureDetectedCallback()
67 callbacks.remove(tag) in removeOnGestureDetectedCallback()
68 if (callbacks.isEmpty()) { in removeOnGestureDetectedCallback()
81 callbacks.values.forEach { it.invoke(e) } in onInputEvent()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/utils/leaks/
DFakeFlashlightController.java30 private final List<FlashlightListener> callbacks = new ArrayList<>(); field in FakeFlashlightController
45 callbacks.forEach( in onFlashlightAvailabilityChanged()
52 callbacks.forEach(FlashlightListener::onFlashlightError); in onFlashlightError()
69 callbacks.forEach(flashlightListener -> flashlightListener.onFlashlightChanged(newState)); in setFlashlight()
88 callbacks.add(listener); in addCallback()
97 callbacks.remove(listener); in removeCallback()
/frameworks/base/core/java/com/android/internal/view/
DSurfaceCallbackHelper.java46 …c void dispatchSurfaceRedrawNeededAsync(SurfaceHolder holder, SurfaceHolder.Callback callbacks[]) { in dispatchSurfaceRedrawNeededAsync() argument
47 if (callbacks == null || callbacks.length == 0) { in dispatchSurfaceRedrawNeededAsync()
53 mFinishDrawingExpected = callbacks.length; in dispatchSurfaceRedrawNeededAsync()
57 for (SurfaceHolder.Callback c : callbacks) { in dispatchSurfaceRedrawNeededAsync()
/frameworks/native/services/inputflinger/rust/
Dinput_filter_thread.rs222 callbacks: Vec<Box<dyn ThreadCallback + Send + Sync>>, field
231 !&self.0.read().unwrap().callbacks.is_empty() in has_callbacks()
235 let callbacks = &mut self.0.write().unwrap().callbacks; in register_thread_callback() localVariable
236 if callbacks.iter().any(|x| x.name() == callback.name()) { in register_thread_callback()
247 callbacks.push(callback); in register_thread_callback()
251 let callbacks = &mut self.0.write().unwrap().callbacks; in unregister_thread_callback() localVariable
252 if let Some(index) = callbacks.iter().position(|x| x.name() == callback.name()) { in unregister_thread_callback()
253 callbacks.remove(index); in unregister_thread_callback()
267 let callbacks = &self.0.read().unwrap().callbacks; in notify_timeout_expired() localVariable
268 for callback in callbacks.iter() { in notify_timeout_expired()
[all …]
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/data/repository/
DFakeCommandQueue.kt32 private val callbacks = mutableListOf<Callbacks>() constant in com.android.systemui.keyguard.data.repository.FakeCommandQueue
35 callbacks.add(callback) in addCallback()
39 callbacks.remove(callback) in removeCallback()
43 callbacks.forEach { func(it) } in doForEachCallback()
46 fun callbackCount(): Int = callbacks.size in callbackCount()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/policy/
DFakeDeviceProvisionedController.kt7 private val callbacks = mutableSetOf<DeviceProvisionedController.DeviceProvisionedListener>() constant in com.android.systemui.statusbar.policy.FakeDeviceProvisionedController
11 callbacks.add(listener) in addCallback()
15 callbacks.remove(listener) in removeCallback()
35 callbacks.toSet().forEach { it.onUserSwitched() } in setCurrentUser()
44 callbacks.toSet().forEach { it.onUserSetupChanged() } in setUserSetup()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/settings/
DFakeUserTracker.kt40 val callbacks = mutableListOf<UserTracker.Callback>() constant
55 callbacks.add(callback) in addCallback()
59 callbacks.remove(callback) in removeCallback()
79 val copy = callbacks.toList() in onBeforeUserSwitching()
84 val copy = callbacks.toList() in onUserChanging()
89 val copy = callbacks.toList() in onUserChanged()
94 callbacks.forEach { it.onProfilesChanged(_userProfiles) } in onProfileChanged()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
DNotifBindPipeline.java138 final Set<BindCallback> callbacks = bindEntry.callbacks; in onBindRequested() local
139 callbacks.add(callback); in onBindRequested()
140 signal.setOnCancelListener(() -> callbacks.remove(callback)); in onBindRequested()
188 final Set<BindCallback> callbacks = bindEntry.callbacks; in onPipelineComplete() local
190 mLogger.logFinishedPipeline(entry, callbacks.size()); in onPipelineComplete()
196 mScratchCallbacksList.addAll(callbacks); in onPipelineComplete()
197 callbacks.clear(); in onPipelineComplete()
240 public final Set<BindCallback> callbacks = new ArraySet<>(); field in NotifBindPipeline.BindEntry

12345678910>>...14