/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/listeners/ |
D | ListenerMultiplexerTest.java | 58 void onRegistrationAdded(Consumer<TestListenerRegistration> consumer, in onRegistrationAdded() argument 61 void onRegistrationReplaced(Consumer<TestListenerRegistration> consumer, in onRegistrationReplaced() argument 64 void onRegistrationRemoved(Consumer<TestListenerRegistration> consumer, in onRegistrationRemoved() argument 85 Consumer<TestListenerRegistration> consumer = mock(Consumer.class); in testAdd() local 87 mMultiplexer.addListener(0, consumer); in testAdd() 89 mInOrder.verify(mCallbacks).onRegistrationAdded(eq(consumer), in testAdd() 95 mMultiplexer.addListener(1, consumer); in testAdd() 96 mInOrder.verify(mCallbacks).onRegistrationRemoved(eq(consumer), in testAdd() 98 mInOrder.verify(mCallbacks).onRegistrationReplaced(eq(consumer), in testAdd() 104 verify(consumer).accept(any(TestListenerRegistration.class)); in testAdd() [all …]
|
/frameworks/base/services/tests/mockingservicestests/src/android/service/dreams/ |
D | DreamOverlayConnectionHandlerTest.java | 90 final Consumer<IDreamOverlayClient> consumer = Mockito.mock(Consumer.class); in consumerShouldRunImmediatelyWhenClientAvailable() local 91 mDreamOverlayConnectionHandler.addConsumer(consumer); in consumerShouldRunImmediatelyWhenClientAvailable() 93 verify(consumer).accept(mOverlayClient); in consumerShouldRunImmediatelyWhenClientAvailable() 101 final Consumer<IDreamOverlayClient> consumer = Mockito.mock(Consumer.class); in consumerShouldRunAfterClientAvailable() local 102 mDreamOverlayConnectionHandler.addConsumer(consumer); in consumerShouldRunAfterClientAvailable() 105 verify(consumer, never()).accept(mOverlayClient); in consumerShouldRunAfterClientAvailable() 109 verify(consumer).accept(mOverlayClient); in consumerShouldRunAfterClientAvailable() 117 final Consumer<IDreamOverlayClient> consumer = Mockito.mock(Consumer.class); in consumerShouldNeverRunIfClientConnectsAndDisconnects() local 118 mDreamOverlayConnectionHandler.addConsumer(consumer); in consumerShouldNeverRunIfClientConnectsAndDisconnects() 121 verify(consumer, never()).accept(mOverlayClient); in consumerShouldNeverRunIfClientConnectsAndDisconnects() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | AmbientDisplayPowerCalculatorTest.java | 69 BatteryConsumer consumer = mStatsRule.getDeviceBatteryConsumer(); in testMeasuredEnergyBasedModel() local 70 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel() 73 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel() 75 assertThat(consumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel() 129 BatteryConsumer consumer = mStatsRule.getDeviceBatteryConsumer(); in testMeasuredEnergyBasedModel_multiDisplay() local 130 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel_multiDisplay() 134 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel_multiDisplay() 136 assertThat(consumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testMeasuredEnergyBasedModel_multiDisplay() 154 BatteryConsumer consumer = mStatsRule.getDeviceBatteryConsumer(); in testPowerProfileBasedModel() local 155 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY)) in testPowerProfileBasedModel() [all …]
|
D | GnssPowerCalculatorTest.java | 58 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel() local 59 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_GNSS)) in testTimerBasedModel() 61 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_GNSS)) in testTimerBasedModel() 63 assertThat(consumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_GNSS)) in testTimerBasedModel() 97 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testMeasuredEnergyBasedModel() local 98 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_GNSS)) in testMeasuredEnergyBasedModel() 100 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_GNSS)) in testMeasuredEnergyBasedModel() 102 assertThat(consumer.getPowerModel(BatteryConsumer.POWER_COMPONENT_GNSS)) in testMeasuredEnergyBasedModel()
|
D | MemoryPowerCalculatorTest.java | 55 BatteryConsumer consumer = mStatsRule.getDeviceBatteryConsumer(); in testTimerBasedModel() local 56 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_MEMORY)) in testTimerBasedModel() 58 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_MEMORY)) in testTimerBasedModel()
|
D | FlashlightPowerCalculatorTest.java | 54 UidBatteryConsumer consumer = mStatsRule.getUidBatteryConsumer(APP_UID); in testTimerBasedModel() local 55 assertThat(consumer.getUsageDurationMillis(BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)) in testTimerBasedModel() 57 assertThat(consumer.getConsumedPower(BatteryConsumer.POWER_COMPONENT_FLASHLIGHT)) in testTimerBasedModel()
|
/frameworks/base/core/java/android/service/dreams/ |
D | DreamOverlayConnectionHandler.java | 124 public void addConsumer(Consumer<IDreamOverlayClient> consumer) { in addConsumer() argument 125 final Message msg = mHandler.obtainMessage(MSG_ADD_CONSUMER, consumer); in addConsumer() 134 public void removeConsumer(Consumer<IDreamOverlayClient> consumer) { in removeConsumer() argument 135 final Message msg = mHandler.obtainMessage(MSG_REMOVE_CONSUMER, consumer); in removeConsumer() 138 mHandler.removeMessages(MSG_ADD_CONSUMER, consumer); in removeConsumer() 161 for (Consumer<IDreamOverlayClient> consumer : mConsumers) { in onOverlayClientReady() 162 consumer.accept(mClient); in onOverlayClientReady() 166 private void onAddConsumer(Consumer<IDreamOverlayClient> consumer) { in onAddConsumer() argument 168 consumer.accept(mClient); in onAddConsumer() 170 mConsumers.add(consumer); in onAddConsumer() [all …]
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | MeasuredEnergySnapshot.java | 170 final EnergyConsumer consumer = mEnergyConsumers.get(consumerId, null); in updateAndGetDelta() local 171 if (consumer == null) { in updateAndGetDelta() 175 final int type = consumer.type; in updateAndGetDelta() 176 final int ordinal = consumer.ordinal; in updateAndGetDelta() 186 updateAndGetDeltaForTypeOther(consumer, newAttributions, avgVoltageMV); in updateAndGetDelta() 198 Slog.e(TAG, "Bad data! EnergyConsumer " + consumer.name in updateAndGetDelta() 247 Slog.w(TAG, "Ignoring consumer " + consumer.name + " of unknown type " + type); in updateAndGetDelta() 327 final EnergyConsumer consumer = mEnergyConsumers.valueAt(i); in dump() local 329 consumer.id, consumer.ordinal, consumer.type, consumer.name)); in dump() 353 final EnergyConsumer consumer = mEnergyConsumers.valueAt(idx); in getOtherOrdinalNames() local [all …]
|
/frameworks/base/services/core/java/com/android/server/wallpaper/ |
D | LocalColorRepository.java | 52 public void addAreas(ILocalWallpaperColorConsumer consumer, List<RectF> areas, int displayId) { in addAreas() argument 53 IBinder binder = consumer.asBinder(); in addAreas() 58 consumer.asBinder().linkToDeath(() -> in addAreas() 59 mLocalColorAreas.remove(consumer.asBinder()), 0); in addAreas() 76 mCallbacks.register(consumer); in addAreas() 86 public List<RectF> removeAreas(ILocalWallpaperColorConsumer consumer, List<RectF> areas, in removeAreas() argument 88 IBinder binder = consumer.asBinder(); in removeAreas() 94 mCallbacks.unregister(consumer); in removeAreas() 105 mCallbacks.unregister(consumer); in removeAreas() 108 mCallbacks.unregister(consumer); in removeAreas()
|
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/extensions/layout/ |
D | WindowLayoutComponentImpl.java | 103 java.util.function.Consumer<List<CommonFoldingFeature>> consumer) { in addFoldingStateChangedCallback() argument 105 mFoldingFeatureProducer.addDataChangedCallback(consumer); in addFoldingStateChangedCallback() 117 @NonNull java.util.function.Consumer<WindowLayoutInfo> consumer) { in addWindowLayoutInfoListener() argument 118 final Consumer<WindowLayoutInfo> extConsumer = consumer::accept; in addWindowLayoutInfoListener() 120 mJavaToExtConsumers.put(consumer, extConsumer); in addWindowLayoutInfoListener() 127 @NonNull java.util.function.Consumer<WindowLayoutInfo> consumer) { in addWindowLayoutInfoListener() argument 128 final Consumer<WindowLayoutInfo> extConsumer = consumer::accept; in addWindowLayoutInfoListener() 130 mJavaToExtConsumers.put(consumer, extConsumer); in addWindowLayoutInfoListener() 148 @NonNull Consumer<WindowLayoutInfo> consumer) { in addWindowLayoutInfoListener() argument 153 || mWindowLayoutChangeListeners.containsValue(consumer)) { in addWindowLayoutInfoListener() [all …]
|
/frameworks/native/libs/nativedisplay/surfacetexture/ |
D | surface_texture.cpp | 35 android::sp<android::SurfaceTexture> consumer; member 113 ast->consumer = SurfaceTexture_getSurfaceTexture(env, surfacetexture); in ASurfaceTexture_fromSurfaceTexture() 130 return st->consumer->attachToContext(tex); in ASurfaceTexture_attachToGLContext() 134 return st->consumer->detachFromContext(); in ASurfaceTexture_detachFromGLContext() 138 return st->consumer->updateTexImage(); in ASurfaceTexture_updateTexImage() 142 st->consumer->getTransformMatrix(mtx); in ASurfaceTexture_getTransformMatrix() 146 return st->consumer->getTimestamp(); in ASurfaceTexture_getTimestamp() 184 return st->consumer->getCurrentTextureTarget(); in ASurfaceTexture_getCurrentTextureTarget() 188 texture->consumer->takeConsumerOwnership(); in ASurfaceTexture_takeConsumerOwnership() 192 texture->consumer->releaseConsumerOwnership(); in ASurfaceTexture_releaseConsumerOwnership() [all …]
|
/frameworks/native/services/surfaceflinger/tests/ |
D | VirtualDisplay_test.cpp | 30 sp<IGraphicBufferConsumer> consumer; in SetUp() local 32 BufferQueue::createBufferQueue(&mProducer, &consumer); in SetUp() 33 consumer->setConsumerName(String8("Virtual disp consumer")); in SetUp() 34 consumer->setDefaultBufferSize(100, 100); in SetUp() 36 mGLConsumer = new GLConsumer(consumer, GLConsumer::TEXTURE_EXTERNAL, true, false); in SetUp()
|
/frameworks/av/services/camera/libcameraservice/gui/ |
D | RingBufferConsumer.h | 63 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/base/services/core/java/com/android/server/biometrics/log/ |
D | ALSProbe.java | 141 final NextConsumer consumer = mNextConsumer; in onNext() local 143 if (consumer != null) { in onNext() 152 consumer.consume(value); in onNext() 174 public synchronized void awaitNextLux(@NonNull Consumer<Float> consumer, in awaitNextLux() argument 176 final NextConsumer nextConsumer = new NextConsumer(consumer, handler); in awaitNextLux() 236 private NextConsumer(@NonNull Consumer<Float> consumer, @Nullable Handler handler) { in NextConsumer() argument 237 mConsumer = consumer; in NextConsumer() 252 public void add(NextConsumer consumer) { in add() argument 253 mOthers.add(consumer); in add()
|
/frameworks/base/core/java/android/view/ |
D | InsetsController.java | 769 InsetsSourceConsumer consumer = mSourceConsumers.valueAt(i); in updateDisabledUserAnimationTypes() local 770 if (consumer.getControl() != null in updateDisabledUserAnimationTypes() 771 && (toPublicType(consumer.getType()) & diff) != 0) { in updateDisabledUserAnimationTypes() 877 final InsetsSourceConsumer consumer = mSourceConsumers.valueAt(i); in onControlsChanged() local 878 final InsetsSourceControl control = mTmpControlArray.get(consumer.getType()); in onControlsChanged() 882 consumer.setControl(control, showTypes, hideTypes); in onControlsChanged() 889 final InsetsSourceConsumer consumer = getSourceConsumer(type); in onControlsChanged() local 890 consumer.setControl(control, showTypes, hideTypes); in onControlsChanged() 893 final boolean requestedVisible = consumer.isRequestedVisible(); in onControlsChanged() 978 InsetsSourceConsumer consumer = getSourceConsumer(internalType); in show() local [all …]
|
/frameworks/base/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/ |
D | WindowAreaComponentImpl.java | 95 @NonNull Consumer<@WindowAreaStatus Integer> consumer) { in addRearDisplayStatusListener() 97 mRearDisplayStatusListeners.add(consumer); in addRearDisplayStatusListener() 103 consumer.accept(getCurrentStatus()); in addRearDisplayStatusListener() 112 @NonNull Consumer<@WindowAreaStatus Integer> consumer) { in removeRearDisplayStatusListener() 114 mRearDisplayStatusListeners.remove(consumer); in removeRearDisplayStatusListener() 262 @NonNull Consumer<ExtensionWindowAreaStatus> consumer) { in addRearDisplayPresentationStatusListener() 269 @NonNull Consumer<ExtensionWindowAreaStatus> consumer) { in removeRearDisplayPresentationStatusListener() 276 @NonNull Consumer<@WindowAreaSessionState Integer> consumer) { in startRearDisplayPresentationSession() argument
|
/frameworks/native/libs/gui/ |
D | BufferHubConsumer.cpp | 25 sp<BufferHubConsumer> consumer = new BufferHubConsumer; in Create() local 26 consumer->mQueue = queue; in Create() 27 return consumer; in Create() 36 sp<BufferHubConsumer> consumer = new BufferHubConsumer; in Create() local 37 consumer->mQueue = ConsumerQueue::Import(parcelable.TakeChannelHandle()); in Create() 38 return consumer; in Create()
|
D | BufferQueue.cpp | 122 sp<IGraphicBufferConsumer> consumer(new BufferQueueConsumer(core)); in createBufferQueue() local 123 LOG_ALWAYS_FATAL_IF(consumer == nullptr, in createBufferQueue() 127 *outConsumer = consumer; in createBufferQueue() 137 sp<IGraphicBufferConsumer> consumer; in createBufferHubQueue() local 148 consumer = BufferHubConsumer::Create(consumerQueue); in createBufferHubQueue() 151 LOG_ALWAYS_FATAL_IF(consumer == nullptr, "BufferQueue: failed to create BufferQueueConsumer"); in createBufferHubQueue() 154 *outConsumer = consumer; in createBufferHubQueue()
|
/frameworks/native/opengl/tests/EGLTest/ |
D | EGL_test.cpp | 149 sp<IGraphicBufferConsumer> consumer; in TEST_F() local 150 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F() 151 consumer->consumerConnect(new MockConsumer, false); in TEST_F() 269 sp<IGraphicBufferConsumer> consumer; in TEST_F() local 270 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F() 271 consumer->consumerConnect(new MockConsumer, false); in TEST_F() 317 sp<IGraphicBufferConsumer> consumer; in TEST_F() local 318 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F() 319 consumer->consumerConnect(new MockConsumer, false); in TEST_F() 409 sp<IGraphicBufferConsumer> consumer; in TEST_F() local [all …]
|
/frameworks/base/core/tests/batterystatstests/BatteryStatsViewer/src/com/android/frameworks/core/batterystatsviewer/ |
D | BatteryConsumerData.java | 288 for (UidBatteryConsumer consumer : batteryUsageStats.getUidBatteryConsumers()) { in getRequestedBatteryConsumer() 289 if (batteryConsumerId(consumer).equals(batteryConsumerId)) { in getRequestedBatteryConsumer() 290 return consumer; in getRequestedBatteryConsumer() 323 final BatteryConsumer consumer = in computeTotalPower() local 327 powerByComponentMah[component] += consumer.getConsumedPower(component); in computeTotalPower() 333 final BatteryConsumer consumer = in computeTotalPowerForCustomComponent() local 336 final int customComponentCount = consumer.getCustomPowerComponentCount(); in computeTotalPowerForCustomComponent() 340 powerByComponentMah[component] += consumer.getConsumedPowerForCustomComponent( in computeTotalPowerForCustomComponent() 347 for (BatteryConsumer consumer : batteryUsageStats.getUidBatteryConsumers()) { in computeTotalDuration() 350 durationByComponentMs[component] += consumer.getUsageDurationMillis(component); in computeTotalDuration() [all …]
|
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/common/ |
D | ScreenshotUtils.java | 38 Consumer<SurfaceControl.ScreenshotHardwareBuffer> consumer) { in captureLayer() argument 39 consumer.accept(SurfaceControl.captureLayers( in captureLayer() 113 BufferConsumer consumer = new BufferConsumer(t, sc, parentSc, layer); in takeScreenshot() local 114 captureLayer(sc, crop, consumer); in takeScreenshot() 115 return consumer.mScreenshot; in takeScreenshot()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/wallpaper/ |
D | LocalColorRepositoryTest.java | 102 Consumer<ILocalWallpaperColorConsumer> consumer = mock(Consumer.class); in testAreaCallback() local 111 mRepo.forEachCallback(consumer, area1, 0); in testAreaCallback() 112 Mockito.verify(consumer, times(1)).accept(eq(mCallback1)); in testAreaCallback() 113 Mockito.verify(consumer, times(0)).accept(eq(mCallback2)); in testAreaCallback() 114 mRepo.forEachCallback(consumer, area2, 0); in testAreaCallback() 115 Mockito.verify(consumer, times(2)).accept(eq(mCallback1)); in testAreaCallback() 116 Mockito.verify(consumer, times(1)).accept(eq(mCallback2)); in testAreaCallback()
|
/frameworks/base/core/java/android/os/ |
D | BatteryUsageStats.java | 168 final UidBatteryConsumer consumer = uidBatteryConsumerBuilder.build(); in BatteryUsageStats() local 169 totalPowerMah += consumer.getConsumedPower(); in BatteryUsageStats() 170 mUidBatteryConsumers.add(consumer); in BatteryUsageStats() 177 final UserBatteryConsumer consumer = in BatteryUsageStats() local 179 totalPowerMah += consumer.getConsumedPower(); in BatteryUsageStats() 180 mUserBatteryConsumers.add(consumer); in BatteryUsageStats() 363 final AggregateBatteryConsumer consumer = new AggregateBatteryConsumer(data); in BatteryUsageStats() local 364 mAggregateBatteryConsumers[consumer.getScope()] = consumer; in BatteryUsageStats() 491 final UidBatteryConsumer consumer = consumers.get(i); in writeUidBatteryConsumersProto() local 493 final long fgMs = consumer.getTimeInStateMs(UidBatteryConsumer.STATE_FOREGROUND); in writeUidBatteryConsumersProto() [all …]
|
/frameworks/native/libs/gui/tests/ |
D | Surface_test.cpp | 131 sp<IGraphicBufferConsumer> consumer; in testSurfaceListener() local 132 BufferQueue::createBufferQueue(&producer, &consumer); in testSurfaceListener() 135 consumer->consumerConnect(mockConsumer, false); in testSurfaceListener() 136 consumer->setConsumerName(String8("TestConsumer")); in testSurfaceListener() 174 ASSERT_EQ(NO_ERROR, consumer->acquireBuffer(&releasedItems[i], 0)); in testSurfaceListener() 175 ASSERT_EQ(NO_ERROR, consumer->releaseBuffer(releasedItems[i].mSlot, in testSurfaceListener() 186 ASSERT_EQ(NO_ERROR, consumer->acquireBuffer(&item, 0)); in testSurfaceListener() 189 ASSERT_EQ(NO_ERROR, consumer->discardFreeBuffers()); in testSurfaceListener() 326 sp<IGraphicBufferConsumer> consumer; in TEST_F() local 327 BufferQueue::createBufferQueue(&producer, &consumer); in TEST_F() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/dreams/complication/ |
D | ComplicationLayoutParamsTest.java | 211 final Consumer<Integer> consumer = mock(Consumer.class); in testIteratePositions() local 213 ComplicationLayoutParams.iteratePositions(consumer, positions); in testIteratePositions() 215 verify(consumer).accept(ComplicationLayoutParams.POSITION_TOP); in testIteratePositions() 216 verify(consumer).accept(ComplicationLayoutParams.POSITION_START); in testIteratePositions() 217 verify(consumer).accept(ComplicationLayoutParams.POSITION_END); in testIteratePositions() 218 verify(consumer, never()).accept(ComplicationLayoutParams.POSITION_BOTTOM); in testIteratePositions()
|