Home
last modified time | relevance | path

Searched refs:subscriber (Results 1 – 15 of 15) sorted by relevance

/frameworks/native/libs/bufferstreams/rust/src/publishers/
Dtesting.rs24 subscriber: Option<Box<dyn BufferSubscriber>>, field
31 Self { config, subscriber: None, subscription: SharedBufferSubscription::new() } in new()
41 let subscriber = in send_frame() localVariable
42 self.subscriber.as_deref_mut().expect("Tried to send_frame with no subscriber"); in send_frame()
45 subscriber.on_next(frame); in send_frame()
58 let subscriber = in send_complete() localVariable
59 self.subscriber.as_deref_mut().expect("Tried to send_complete with no subscriber"); in send_complete()
60 subscriber.on_complete(); in send_complete()
69 let subscriber = in send_error() localVariable
70 self.subscriber.as_deref_mut().expect("Tried to send_error with no subscriber"); in send_error()
[all …]
Dbuffer_pool_publisher.rs25 subscriber: Option<Box<dyn BufferSubscriber>>, field
36 subscriber: None, in new()
43 if let Some(subscriber) = self.subscriber.as_mut() { in send_next_frame()
48 subscriber.on_next(frame); in send_next_frame()
62 fn subscribe(&mut self, subscriber: impl BufferSubscriber + 'static) { in subscribe()
63 assert!(self.subscriber.is_none()); in subscribe()
65 self.subscriber = Some(Box::new(subscriber)); in subscribe()
66 self.subscriber.as_mut().unwrap().on_subscribe(self.subscription.clone_for_subscriber()); in subscribe()
95 let subscriber = SharedSubscriber::new(TestSubscriber::new(STREAM_CONFIG)); in test_send_next_frame() localVariable
98 buffer_pool_publisher.subscribe(subscriber.clone()); in test_send_next_frame()
[all …]
/frameworks/native/libs/bufferstreams/rust/src/
Dlib.rs62 fn subscribe(&mut self, subscriber: impl BufferSubscriber + 'static); in subscribe()
207 let subscriber = SharedSubscriber::new(TestSubscriber::new(STREAM_CONFIG)); in test_test_implementations_next() localVariable
210 publisher.subscribe(subscriber.clone()); in test_test_implementations_next()
211 assert!(subscriber.map_inner(|s| s.has_subscription())); in test_test_implementations_next()
215 let events = subscriber.map_inner_mut(|s| s.take_events()); in test_test_implementations_next()
218 subscriber.map_inner(|s| s.request(1)); in test_test_implementations_next()
222 let events = subscriber.map_inner_mut(|s| s.take_events()); in test_test_implementations_next()
229 let subscriber = SharedSubscriber::new(TestSubscriber::new(STREAM_CONFIG)); in test_test_implementations_complete() localVariable
232 publisher.subscribe(subscriber.clone()); in test_test_implementations_complete()
233 assert!(subscriber.map_inner(|s| s.has_subscription())); in test_test_implementations_complete()
[all …]
/frameworks/native/libs/bufferstreams/rust/src/subscribers/
Dshared.rs34 subscriber: S, field
40 pub fn new(subscriber: S) -> Self { in new()
41 Self(Arc::new(Mutex::new(SharedSubscriberInner { subscriber, is_subscribed: false }))) in new()
47 f(&inner.subscriber) in map_inner()
53 f(&mut inner.subscriber) in map_inner_mut()
66 inner.subscriber.get_subscriber_stream_config() in get_subscriber_stream_config()
77 inner.subscriber.on_subscribe(subscription); in on_subscribe()
82 inner.subscriber.on_next(frame); in on_next()
87 inner.subscriber.on_error(error); in on_error()
92 inner.subscriber.on_complete(); in on_complete()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/controller/
DServiceWrapperTest.kt55 private lateinit var subscriber: IControlsSubscriber variable in com.android.systemui.controls.controller.ServiceWrapperTest
80 val result = wrapper.load(subscriber) in testLoad_happyPath()
83 verify(service).load(subscriber) in testLoad_happyPath()
89 val result = wrapper.load(subscriber) in testLoad_error()
96 val result = wrapper.loadSuggested(subscriber) in testLoadSuggested_happyPath()
99 verify(service).loadSuggested(subscriber) in testLoadSuggested_happyPath()
105 val result = wrapper.loadSuggested(subscriber) in testLoadSuggested_error()
113 val result = wrapper.subscribe(list, subscriber) in testSubscribe_happyPath()
116 verify(service).subscribe(list, subscriber) in testSubscribe_happyPath()
124 val result = wrapper.subscribe(list, subscriber) in testSubscribe_error()
/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/controller/
DServiceWrapper.kt47 fun load(subscriber: IControlsSubscriber): Boolean { in load()
49 service.load(subscriber) in load()
53 fun loadSuggested(subscriber: IControlsSubscriber): Boolean { in loadSuggested()
55 service.loadSuggested(subscriber) in loadSuggested()
59 fun subscribe(controlIds: List<String>, subscriber: IControlsSubscriber): Boolean { in subscribe()
61 service.subscribe(controlIds, subscriber) in subscribe()
DControlsProviderLifecycleManager.kt237 fun maybeBindAndLoad(subscriber: IControlsSubscriber.Stub) { in maybeBindAndLoad()
241 subscriber.onError(token, "Timeout waiting onLoad") in maybeBindAndLoad()
245 invokeOrQueue(Load(subscriber)) in maybeBindAndLoad()
256 fun maybeBindAndLoadSuggested(subscriber: IControlsSubscriber.Stub) { in maybeBindAndLoadSuggested()
260 subscriber.onError(token, "Timeout waiting onLoadSuggested") in maybeBindAndLoadSuggested()
264 invokeOrQueue(Suggest(subscriber)) in maybeBindAndLoadSuggested()
279 fun maybeBindAndSubscribe(controlIds: List<String>, subscriber: IControlsSubscriber) = in maybeBindAndSubscribe()
280 invokeOrQueue(Subscribe(controlIds, subscriber)) in maybeBindAndSubscribe()
364 inner class Load(val subscriber: IControlsSubscriber.Stub) : ServiceMethod() { in callWrapper() constant in com.android.systemui.controls.controller.Load
369 return wrapper?.load(subscriber) ?: false in callWrapper()
[all …]
/frameworks/base/core/java/android/service/controls/
DIControlsProvider.aidl27 void load(IControlsSubscriber subscriber); in load() argument
29 void loadSuggested(IControlsSubscriber subscriber); in loadSuggested() argument
32 IControlsSubscriber subscriber); in subscribe() argument
DControlsProviderService.java216 public void load(IControlsSubscriber subscriber) { in onBind()
217 mHandler.obtainMessage(RequestHandler.MSG_LOAD, subscriber).sendToTarget(); in onBind()
220 public void loadSuggested(IControlsSubscriber subscriber) { in onBind() argument
221 mHandler.obtainMessage(RequestHandler.MSG_LOAD_SUGGESTED, subscriber) in onBind()
226 IControlsSubscriber subscriber) { in onBind() argument
227 SubscribeMessage msg = new SubscribeMessage(controlIds, subscriber); in onBind()
462 SubscribeMessage(List<String> controlIds, IControlsSubscriber subscriber) {
464 this.mSubscriber = subscriber;
/frameworks/base/packages/EasterEgg/src/com/android/egg/neko/
DNekoControlsService.kt273 var subscriber: Flow.Subscriber<in Control>? variable in com.android.egg.neko.NekoControlsService.UglyPublisher.UglySubscription
276 Log.v(TAG, "cancel subscription: $this for subscriber: $subscriber " + in cancel()
278 subscriber = null in cancel()
287 if (!indefinite) subscriber?.onComplete() in request()
293 Log.v(TAG, "sending update: " + Control_toString(c) + " => " + subscriber) in send()
294 subscriber?.onNext(c) in send()
298 override fun subscribe(subscriber: Flow.Subscriber<in Control>) { in subscribe()
299 Log.v(TAG, "subscribe to publisher: $this by subscriber: $subscriber") in subscribe()
301 subscriber) in subscribe()
303 subscriber.onSubscribe(sub) in subscribe()
/frameworks/av/services/mediaresourcemanager/
DResourceObserverService.cpp302 for (auto &subscriber : observableIt->second) { in notifyObservers() local
303 auto calleeIt = calleeList.find(subscriber.first); in notifyObservers()
305 calleeList.emplace(subscriber.first, CalleeInfo{ in notifyObservers()
306 subscriber.second, {{observableType, res.value}}}); in notifyObservers()
/frameworks/base/core/java/android/net/
DINetworkPolicyManager.aidl92 void factoryReset(String subscriber); in factoryReset() argument
DNetworkPolicyManager.java647 public void factoryReset(String subscriber) { in factoryReset() argument
649 mService.factoryReset(subscriber); in factoryReset()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerService.java6476 public void factoryReset(String subscriber) {
6485 NetworkTemplate templateCarrier = subscriber != null
6486 ? buildTemplateCarrierMetered(subscriber) : null;
6487 NetworkTemplate templateMobile = subscriber != null
6489 .setSubscriberIds(Set.of(subscriber))
/frameworks/proto_logging/stats/
Datoms.proto14331 * This event is intended to be consumed by a Perfetto subscriber for