Home
last modified time | relevance | path

Searched refs:consumer (Results 1 – 25 of 72) sorted by relevance

123

/frameworks/support/room/integration-tests/testapp/src/androidTest/java/android/arch/persistence/room/integration/testapp/test/
DRxJava2Test.java189 TestSubscriber<User> consumer = new TestSubscriber<>(); in observeOnce() local
190 Disposable disposable = mUserDao.flowableUserById(3).subscribeWith(consumer); in observeOnce()
192 consumer.assertValue(user); in observeOnce()
201 TestSubscriber<User> consumer = new TestSubscriber<>(); in observeChangeAndDispose() local
203 .subscribeWith(consumer); in observeChangeAndDispose()
205 assertThat(consumer.values().get(0), is(user)); in observeChangeAndDispose()
209 User next = consumer.values().get(1); in observeChangeAndDispose()
215 assertThat(consumer.valueCount(), is(2)); in observeChangeAndDispose()
221 TestSubscriber<User> consumer = new TestSubscriber<>(); in observeEmpty() local
223 .subscribeWith(consumer); in observeEmpty()
[all …]
/frameworks/support/room/rxjava2/src/test/java/android/arch/persistence/room/
DRxRoomTest.java103 CountingConsumer consumer = new CountingConsumer(); in basicNotify() local
104 Disposable disposable = flowable.subscribe(consumer); in basicNotify()
107 assertThat(consumer.mCount, CoreMatchers.is(1)); in basicNotify()
109 assertThat(consumer.mCount, CoreMatchers.is(2)); in basicNotify()
111 assertThat(consumer.mCount, CoreMatchers.is(3)); in basicNotify()
114 assertThat(consumer.mCount, CoreMatchers.is(3)); in basicNotify()
129 final CountingConsumer consumer = new CountingConsumer(); in internalCallable() local
130 flowable.subscribe(consumer); in internalCallable()
134 assertThat(consumer.mCount, CoreMatchers.is(0)); in internalCallable()
139 assertThat(consumer.mCount, CoreMatchers.is(1)); in internalCallable()
[all …]
/frameworks/av/services/camera/libcameraservice/gui/
DRingBufferConsumer.h63 RingBufferConsumer(const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage,
120 PinnedBufferItem(wp<RingBufferConsumer> consumer, in PinnedBufferItem()
122 mConsumer(consumer), in PinnedBufferItem()
127 sp<RingBufferConsumer> consumer = mConsumer.promote(); in ~PinnedBufferItem() local
128 if (consumer != NULL) { in ~PinnedBufferItem()
129 consumer->unpinBuffer(mBufferItem); in ~PinnedBufferItem()
/frameworks/native/opengl/tests/EGLTest/
DEGL_test.cpp140 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
141 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
142 consumer->consumerConnect(new DummyConsumer, false); in TEST_F()
259 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
260 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
261 consumer->consumerConnect(new DummyConsumer, false); in TEST_F()
345 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
346 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
347 consumer->consumerConnect(new DummyConsumer, false); in TEST_F()
424 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
[all …]
/frameworks/native/services/vr/bufferhubd/
Dproducer_channel.cpp134 for (auto consumer : consumer_channels_) in ~ProducerChannel() local
135 consumer->OnProducerClosed(); in ~ProducerChannel()
141 for (const ConsumerChannel* consumer : consumer_channels_) { in GetBufferInfo() local
142 signaled_mask |= consumer->signaled() ? consumer->consumer_state_bit() : 0; in GetBufferInfo()
243 auto consumer = in CreateConsumer() local
246 const auto channel_status = service()->SetChannel(channel_id, consumer); in CreateConsumer()
258 if (consumer->OnProducerPosted()) in CreateConsumer()
316 for (auto consumer : consumer_channels_) { in OnProducerPost() local
317 if (consumer->OnProducerPosted()) in OnProducerPost()
/frameworks/base/services/core/java/com/android/server/wm/
DInputMonitor.java131 private void addInputConsumer(String name, InputConsumerImpl consumer) { in addInputConsumer() argument
132 mInputConsumers.put(name, consumer); in addInputConsumer()
144 private boolean disposeInputConsumer(InputConsumerImpl consumer) { in disposeInputConsumer() argument
145 if (consumer != null) { in disposeInputConsumer()
146 consumer.disposeChannelsLw(); in disposeInputConsumer()
169 final EventReceiverInputConsumer consumer = new EventReceiverInputConsumer(mService, in createInputConsumer() local
171 addInputConsumer(name, consumer); in createInputConsumer()
172 return consumer; in createInputConsumer()
180 final InputConsumerImpl consumer = new InputConsumerImpl(mService, name, inputChannel); in createInputConsumer() local
183 consumer.mWindowHandle.hasWallpaper = true; in createInputConsumer()
[all …]
/frameworks/native/libs/gui/
DBufferQueue.cpp96 sp<IGraphicBufferConsumer> consumer(new BufferQueueConsumer(core)); in createBufferQueue() local
97 LOG_ALWAYS_FATAL_IF(consumer == NULL, in createBufferQueue()
101 *outConsumer = consumer; in createBufferQueue()
DBufferItemConsumer.cpp36 const sp<IGraphicBufferConsumer>& consumer, uint64_t consumerUsage, in BufferItemConsumer() argument
38 ConsumerBase(consumer, controlledByApp) in BufferItemConsumer()
/frameworks/base/libs/hwui/tests/common/
DTestContext.cpp93 sp<IGraphicBufferConsumer> consumer; in createOffscreenSurface() local
94 BufferQueue::createBufferQueue(&producer, &consumer); in createOffscreenSurface()
97 mConsumer = new BufferItemConsumer(consumer, GRALLOC_USAGE_HW_COMPOSER, 4); in createOffscreenSurface()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/
DLifecycle.java37 public void dispatch(Consumer<T> consumer) { in dispatch() argument
39 consumer.accept(mObservers.get(i)); in dispatch()
/frameworks/native/libs/gui/tests/
DSurface_test.cpp118 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
119 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
120 sp<CpuConsumer> cpuConsumer = new CpuConsumer(consumer, 1); in TEST_F()
179 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
180 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
181 sp<BufferItemConsumer> c = new BufferItemConsumer(consumer, in TEST_F()
197 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
198 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F()
199 sp<CpuConsumer> cpuConsumer = new CpuConsumer(consumer, 1); in TEST_F()
218 sp<IGraphicBufferConsumer> consumer; in TEST_F() local
[all …]
DMultiTextureConsumer_test.cpp38 sp<IGraphicBufferConsumer> consumer; in SetUp() local
39 BufferQueue::createBufferQueue(&producer, &consumer); in SetUp()
40 mGlConsumer = new GLConsumer(consumer, TEX_ID, in SetUp()
/frameworks/base/core/java/android/view/
DSurfaceControl.java52 private static native void nativeScreenshot(IBinder displayToken, Surface consumer, in nativeScreenshot() argument
814 public static void screenshot(IBinder display, Surface consumer, in screenshot() argument
817 screenshot(display, consumer, new Rect(), width, height, minLayer, maxLayer, in screenshot()
831 public static void screenshot(IBinder display, Surface consumer, in screenshot() argument
833 screenshot(display, consumer, new Rect(), width, height, 0, 0, true, false); in screenshot()
842 public static void screenshot(IBinder display, Surface consumer) { in screenshot() argument
843 screenshot(display, consumer, new Rect(), 0, 0, 0, 0, true, false); in screenshot()
919 private static void screenshot(IBinder display, Surface consumer, Rect sourceCrop, in screenshot() argument
925 if (consumer == null) { in screenshot()
928 nativeScreenshot(display, consumer, sourceCrop, width, height, in screenshot()
/frameworks/base/packages/SystemUI/src/com/android/systemui/settings/
DCurrentUserTracker.java118 for (Consumer<Integer> consumer : callbacks) { in notifyUserSwitched()
120 if (mCallbacks.contains(consumer)) { in notifyUserSwitched()
121 consumer.accept(newUserId); in notifyUserSwitched()
/frameworks/native/services/surfaceflinger/tests/hwc2/
DHwc2TestBuffer.cpp50 BufferListener(sp<IGraphicBufferConsumer> consumer, in BufferListener() argument
52 : mConsumer(consumer), in BufferListener()
80 sp<IGraphicBufferConsumer> consumer; in initialize() local
81 BufferQueue::createBufferQueue(&producer, &consumer); in initialize()
83 consumer->setDefaultBufferSize(bufferArea.width, bufferArea.height); in initialize()
84 consumer->setDefaultBufferFormat(format); in initialize()
86 mBufferItemConsumer = new BufferItemConsumer(consumer, 0); in initialize()
88 mListener = new BufferListener(consumer, callback, callbackArgs); in initialize()
/frameworks/base/core/jni/android/graphics/
DSurfaceTexture.cpp262 sp<IGraphicBufferConsumer> consumer; in SurfaceTexture_init() local
263 BufferQueue::createBufferQueue(&producer, &consumer); in SurfaceTexture_init()
266 consumer->setMaxBufferCount(1); in SurfaceTexture_init()
271 surfaceTexture = new GLConsumer(consumer, GL_TEXTURE_EXTERNAL_OES, in SurfaceTexture_init()
274 surfaceTexture = new GLConsumer(consumer, texName, in SurfaceTexture_init()
289 consumer->setConsumerIsProtected(isProtectedContext()); in SurfaceTexture_init()
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkScoreServiceTest.java564 NetworkScoreService.FilteringCacheUpdatingConsumer consumer = in testCacheUpdatingConsumer_nullFilter() local
569 consumer.accept(mNetworkScoreCache, null /*cookie*/); in testCacheUpdatingConsumer_nullFilter()
579 consumer = new NetworkScoreService.FilteringCacheUpdatingConsumer(mContext, in testCacheUpdatingConsumer_noneFilter() local
583 consumer.accept(mNetworkScoreCache, NetworkScoreManager.CACHE_FILTER_NONE); in testCacheUpdatingConsumer_noneFilter()
593 consumer = new NetworkScoreService.FilteringCacheUpdatingConsumer(mContext, in testCacheUpdatingConsumer_unknownFilter() local
597 consumer.accept(mNetworkScoreCache, -1 /*cookie*/); in testCacheUpdatingConsumer_unknownFilter()
607 consumer = new NetworkScoreService.FilteringCacheUpdatingConsumer(mContext, in testCacheUpdatingConsumer_nonIntFilter() local
611 consumer.accept(mNetworkScoreCache, "not an int" /*cookie*/); in testCacheUpdatingConsumer_nonIntFilter()
620 consumer = new NetworkScoreService.FilteringCacheUpdatingConsumer(mContext, in testCacheUpdatingConsumer_emptyScoreList() local
624 consumer.accept(mNetworkScoreCache, NetworkScoreManager.CACHE_FILTER_NONE); in testCacheUpdatingConsumer_emptyScoreList()
[all …]
/frameworks/rs/
DrsGrallocConsumer.cpp73 GrallocConsumer* consumer = (GrallocConsumer *) obj; in onFrameAvailable() local
74 for (uint32_t i = 0; i < consumer->mNumAlloc; i++) { in onFrameAvailable()
75 if (consumer->mAlloc[i] != nullptr) { in onFrameAvailable()
76 intptr_t ip = (intptr_t)(consumer->mAlloc[i]); in onFrameAvailable()
77 consumer->mCtx->sendMessageToClient(&ip, in onFrameAvailable()
/frameworks/av/services/camera/libcameraservice/device3/
DCamera3StreamSplitter.cpp42 uint64_t consumerUsage, size_t halMaxBuffers, sp<Surface>* consumer) { in connect() argument
44 if (consumer == nullptr) { in connect()
92 *consumer = new Surface(mProducer); in connect()
93 if (*consumer == nullptr) { in connect()
425 sp<IGraphicBufferConsumer> consumer(mConsumer); in decrementBufRefCountLocked() local
427 if (consumer != nullptr) { in decrementBufRefCountLocked()
428 res = consumer->releaseBuffer(consumerSlot, /* frameNumber */ 0, in decrementBufRefCountLocked()
DCamera3OutputStream.h82 Camera3OutputStream(int id, sp<Surface> consumer,
93 Camera3OutputStream(int id, sp<Surface> consumer,
260 virtual status_t queueBufferToConsumer(sp<ANativeWindow>& consumer,
DCamera3SharedOutputStream.cpp143 status_t Camera3SharedOutputStream::queueBufferToConsumer(sp<ANativeWindow>& consumer, in queueBufferToConsumer() argument
145 status_t res = consumer->queueBuffer(consumer.get(), buffer, anwReleaseFence); in queueBufferToConsumer()
/frameworks/native/services/surfaceflinger/
DSurfaceFlingerConsumer.h41 SurfaceFlingerConsumer(const sp<IGraphicBufferConsumer>& consumer, in SurfaceFlingerConsumer() argument
43 : GLConsumer(consumer, tex, GLConsumer::TEXTURE_EXTERNAL, false, false), in SurfaceFlingerConsumer()
/frameworks/av/cmds/screenrecord/
DFrameOutput.cpp71 sp<IGraphicBufferConsumer> consumer; in createInputSurface() local
72 BufferQueue::createBufferQueue(&producer, &consumer); in createInputSurface()
73 mGlConsumer = new GLConsumer(consumer, mExtTextureName, in createInputSurface()
/frameworks/base/services/backup/java/com/android/server/backup/
DDataChangedJournal.java72 public void forEach(Consumer consumer) throws IOException { in forEach() argument
80 consumer.accept(packageName); in forEach()
/frameworks/native/libs/gui/include/gui/
DBufferQueueConsumer.h165 virtual status_t consumerConnect(const sp<IConsumerListener>& consumer, in consumerConnect() argument
167 return connect(consumer, controlledByApp); in consumerConnect()

123