Home
last modified time | relevance | path

Searched refs:block (Results 1 – 25 of 291) sorted by relevance

12345678910>>...12

/frameworks/base/libs/androidfw/
DBigBuffer.cpp29 Block& block = blocks_.back(); in NextBlockImpl() local
30 if (block.block_size_ - block.size >= size) { in NextBlockImpl()
31 void* out_buffer = block.buffer.get() + block.size; in NextBlockImpl()
32 block.size += size; in NextBlockImpl()
40 Block block = {}; in NextBlockImpl() local
43 block.buffer = std::unique_ptr<uint8_t[]>(new uint8_t[actual_size]()); in NextBlockImpl()
44 CHECK(block.buffer); in NextBlockImpl()
46 block.size = size; in NextBlockImpl()
47 block.block_size_ = actual_size; in NextBlockImpl()
49 blocks_.push_back(std::move(block)); in NextBlockImpl()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/util/
DTraceUtils.kt27 inline fun <T> traceSection(tag: String, block: () -> T): T = in traceSection()
31 block() in traceSection()
36 block()
41 inline fun traceRunnable(tag: String, crossinline block: () -> Unit): Runnable { in traceRunnable()
42 return Runnable { traceSection(tag) { block() } } in traceRunnable()
50 inline fun namedRunnable(tag: String, crossinline block: () -> Unit): Runnable { in namedRunnable()
53 override fun run() = block() in namedRunnable()
69 inline fun <T> traceAsync(method: String, block: () -> T): T = in traceAsync()
70 traceAsync("AsyncTraces", method, block) in traceAsync()
79 inline fun <T> traceAsync(trackName: String, method: String, block: () -> T): T { in traceAsync()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/lifecycle/
DRepeatWhenAttachedTest.kt62 private lateinit var block: Block variable
82 block = Block() in setUp()
112 assertThat(block.invocationCount).isEqualTo(0) in repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached()
118 assertThat(block.invocationCount).isEqualTo(1) in repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached()
119 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED) in repeatWhenAttached_viewStartsDetached_runsBlockWhenAttached()
130 assertThat(block.invocationCount).isEqualTo(1) in repeatWhenAttached_viewAlreadyAttached_immediatelyRunsBlock()
131 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.CREATED) in repeatWhenAttached_viewAlreadyAttached_immediatelyRunsBlock()
143 assertThat(block.invocationCount).isEqualTo(1) in repeatWhenAttached_startsVisibleWithoutFocus_STARTED()
144 assertThat(block.latestLifecycleState).isEqualTo(Lifecycle.State.STARTED) in repeatWhenAttached_startsVisibleWithoutFocus_STARTED()
156 assertThat(block.invocationCount).isEqualTo(1) in repeatWhenAttached_startsWithFocusButInvisible_CREATED()
[all …]
/frameworks/av/media/libnbaio/
DNBAIO.cpp64 ssize_t NBAIO_Sink::writeVia(writeVia_t via, size_t total, void *user, size_t block) in writeVia() argument
73 if (block == 0 || block > maxBlock) { in writeVia()
74 block = maxBlock; in writeVia()
76 double buffer[((frameSize * block) + sizeof(double) - 1) / sizeof(double)]; in writeVia()
80 if (count > block) { in writeVia()
81 count = block; in writeVia()
100 ssize_t NBAIO_Source::readVia(readVia_t via, size_t total, void *user, size_t block) in readVia() argument
109 if (block == 0 || block > maxBlock) { in readVia()
110 block = maxBlock; in readVia()
112 double buffer[((frameSize * block) + sizeof(double) - 1) / sizeof(double)]; in readVia()
[all …]
/frameworks/libs/net/common/netd/libnetdutils/
DMemBlockTest.cpp49 void checkArbitraryMemBlock(const MemBlock& block, size_t expectedSize) { in checkArbitraryMemBlock() argument
50 Slice slice = block.get(); in checkArbitraryMemBlock()
93 MemBlock block(makeArbitraryMemBlock(DNS_PACKET_SIZE)); in TEST() local
94 ASSERT_NO_FATAL_FAILURE(checkArbitraryMemBlock(block, DNS_PACKET_SIZE)); in TEST()
98 MemBlock block = makeArbitraryMemBlock(DNS_PACKET_SIZE); in TEST() local
99 ASSERT_NO_FATAL_FAILURE(checkArbitraryMemBlock(block, DNS_PACKET_SIZE)); in TEST()
105 MemBlock block; in TEST() local
106 EXPECT_TRUE(block.get().empty()); in TEST()
107 EXPECT_EQ(nullptr, block.get().base()); in TEST()
116 block = std::move(block2); in TEST()
[all …]
/frameworks/libs/net/common/testutils/hostdevice/com/android/testutils/
DCleanup.kt77 fun <T> tryTest(block: () -> T) = TryExpr( in <lambda>()
79 Result.success(block()) in <lambda>()
88 inline infix fun <reified E : Throwable> catch(block: (E) -> T): TryExpr<T> { in catch()
92 Result.success(block(originalException)) in catch()
99 inline infix fun cleanupStep(block: () -> Unit): TryExpr<T> { in cleanupStep()
101 block() in cleanupStep()
114 inline infix fun cleanup(block: () -> Unit): T = cleanupStep(block).result.getOrThrow() in cleanup()
/frameworks/av/media/module/mpeg2ts/
DHlsSampleDecryptor.cpp326 AString HlsSampleDecryptor::aesBlockToStr(uint8_t block[AES_BLOCK_SIZE]) { in aesBlockToStr()
329 if (block == NULL) { in aesBlockToStr()
333 block[0], block[1], block[2], block[3], block[4], block[5], block[6], block[7], in aesBlockToStr()
334 block[8], block[9], block[10], block[11], block[12], block[13], block[14], block[15]); in aesBlockToStr()
/frameworks/av/media/tests/benchmark/src/native/common/
DBenchmarkC2Common.h41 explicit LinearBuffer(const std::shared_ptr<C2LinearBlock> &block) in LinearBuffer() argument
42 : C2Buffer({block->share(block->offset(), block->size(), ::C2Fence())}) {} in LinearBuffer()
44 explicit LinearBuffer(const std::shared_ptr<C2LinearBlock> &block, size_t size) in LinearBuffer() argument
45 : C2Buffer({block->share(block->offset(), size, ::C2Fence())}) {} in LinearBuffer()
50 explicit GraphicBuffer(const std::shared_ptr<C2GraphicBlock> &block) in GraphicBuffer() argument
51 : C2Buffer({block->share(C2Rect(block->width(), block->height()), ::C2Fence())}) {} in GraphicBuffer()
/frameworks/base/services/tests/servicestests/utils-mockito/com/android/server/testutils/
DMockitoUtils.kt62 inline fun <reified T> mock(block: T.() -> Unit = {}) = Mockito.mock(T::class.java).apply(block) in <lambda>()
64 fun <T> spy(value: T, block: T.() -> Unit = {}) = Mockito.spy(value).apply(block) in <lambda>()
70 fun <Type> whenever(mock: Type, block: InvocationOnMock.() -> Type) = in whenever()
71 Mockito.`when`(mock).thenAnswer { block(it) } in whenever()
75 inline fun <reified T> spyThrowOnUnmocked(value: T?, block: T.() -> Unit = {}): T { in <lambda>()
85 .defaultAnswer(swappingAnswer)).apply(block)
92 inline fun <reified T> mockThrowOnUnmocked(block: T.() -> Unit = {}) = in <lambda>()
93 spyThrowOnUnmocked<T>(null, block)
/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/animation/
DLaunchableView.kt40 fun setShouldBlockVisibilityChanges(block: Boolean) in setShouldBlockVisibilityChanges()
57 override fun setShouldBlockVisibilityChanges(block: Boolean) { in setShouldBlockVisibilityChanges()
58 if (block == blockVisibilityChanges) { in setShouldBlockVisibilityChanges()
62 blockVisibilityChanges = block in setShouldBlockVisibilityChanges()
63 if (block) { in setShouldBlockVisibilityChanges()
/frameworks/base/tools/aapt/
DResourceTable.cpp302 ResXMLTree& block, bool _appendComment) in PendingAttribute()
304 , sourcePos(in->getPrintableSource(), block.getLineNumber()) in PendingAttribute()
328 ResXMLTree& block, in compileAttribute() argument
334 PendingAttribute attr(myPackage, in, block, inStyleable); in compileAttribute()
347 ssize_t identIdx = block.indexOfAttribute(NULL, "name"); in compileAttribute()
349 attr.ident = String16(block.getAttributeStringValue(identIdx, &len)); in compileAttribute()
359 block.getComment(&len) ? block.getComment(&len) : nulStr); in compileAttribute()
361 ssize_t typeIdx = block.indexOfAttribute(NULL, "format"); in compileAttribute()
363 String16 typeStr = String16(block.getAttributeStringValue(typeIdx, &len)); in compileAttribute()
379 ssize_t minIdx = block.indexOfAttribute(NULL, "min"); in compileAttribute()
[all …]
/frameworks/base/libs/androidfw/tests/
DAppAsLib_test.cpp38 ssize_t block = table.getResource(app::R::integer::number1, &val); in TEST() local
39 ASSERT_GE(block, 0); in TEST()
57 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST() local
58 ASSERT_GE(block, 0); in TEST()
76 ssize_t block = table.getResource(lib::R::integer::number1, &val); in TEST() local
77 ASSERT_GE(block, 0); in TEST()
DResTable_test.cpp154 ssize_t block = in TEST() local
156 ASSERT_GE(block, 0); in TEST()
160 ssize_t newBlock = table.resolveReference(&val, block); in TEST()
161 EXPECT_EQ(block, newBlock); in TEST()
175 ssize_t block = in TEST() local
177 ASSERT_GE(block, 0); in TEST()
190 block = table.getResource(basic::R::integer::number1, &val, MAY_NOT_BE_BAG); in TEST()
191 ASSERT_GE(block, 0); in TEST()
208 ssize_t block = in TEST() local
210 ASSERT_GE(block, 0); in TEST()
[all …]
DSplit_test.cpp87 ssize_t block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F() local
92 EXPECT_GE(block, 0); in TEST_F()
115 ssize_t block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F() local
118 EXPECT_GE(block, 0); in TEST_F()
164 ssize_t block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F() local
166 EXPECT_GE(block, 0); in TEST_F()
174 block = table.getResource(R::string::test1, &val, MAY_NOT_BE_BAG, 0, in TEST_F()
176 ASSERT_GE(block, 0); in TEST_F()
219 ssize_t block = table.getResource(R::string::test3, &val, MAY_NOT_BE_BAG); in TEST_F() local
220 EXPECT_LT(block, 0); in TEST_F()
[all …]
/frameworks/base/tools/codegen/src/com/android/codegen/
DPrinter.kt136 operator fun String.invoke(block: SELF.() -> Unit) { in <lambda>()
144 indentedBy(2, block) in <lambda>()
149 indentedBy(1, block) in <lambda>()
161 else -> indentedBy(2, block) in <lambda>()
165 fun indentedBy(level: Int, block: SELF.() -> Unit) { in <lambda>()
171 (this as SELF).block() in <lambda>()
/frameworks/base/services/permission/java/com/android/server/permission/access/util/
DAtomicFileExtensions.kt28 inline fun AtomicFile.read(block: (FileInputStream) -> Unit) { in read()
29 openRead().use(block) in read()
37 inline fun AtomicFile.writeInlined(block: (FileOutputStream) -> Unit) { in writeInlined()
40 block(it) in writeInlined()
/frameworks/base/packages/SystemUI/src/com/android/systemui/common/coroutine/
DCoroutineResult.kt37 suspend inline fun <T> suspendRunCatching(crossinline block: suspend () -> T): Result<T> = in suspendRunCatching()
39 Result.success(block()) in suspendRunCatching()
60 suspend inline fun <T, R> T.suspendRunCatching(crossinline block: suspend T.() -> R): Result<R> = in suspendRunCatching()
63 com.android.systemui.common.coroutine.suspendRunCatching { block(this) } in suspendRunCatching()
/frameworks/av/media/module/codecs/m4v_h263/enc/src/
Dfastcodemb.h32 Int(*DCT)(Int block[ ], Int coeff[ ], approxDCT *);
55 Int getBlockSAV(Int block[]);
60 Int AppVCA1_dct(Int block[], Int out[ ], approxDCT *function);
61 Int AppVCA2_dct(Int block[], Int out[ ], approxDCT *function);
62 Int AppVCA3_dct(Int block[], Int out[ ], approxDCT *function);
63 Int AppVCA4_dct(Int block[], Int out[ ], approxDCT *function);
64 Int AppVCA5_dct(Int block[], Int out[ ], approxDCT *function);
97 void BlockIDCTMotionComp(Int *block, UChar *bitmapcol, UChar bitmaprow,
/frameworks/av/media/codec2/hal/client/
Doutput.cpp48 sp<GraphicBuffer> createGraphicBuffer(const C2ConstGraphicBlock& block) { in createGraphicBuffer() argument
58 block.handle(), &width, &height, &format, &usage, in createGraphicBuffer()
61 UnwrapNativeCodec2GrallocHandle(block.handle()); in createGraphicBuffer()
76 for (const C2ConstGraphicBlock& block : in forEachBlock() local
78 process(block); in forEachBlock()
106 status_t attachToBufferQueue(const C2ConstGraphicBlock& block, in attachToBufferQueue() argument
116 sp<GraphicBuffer> graphicBuffer = createGraphicBuffer(block); in attachToBufferQueue()
120 << " block dimension " << block.width() << "x" in attachToBufferQueue()
121 << block.height() in attachToBufferQueue()
160 bool getBufferQueueAssignment(const C2ConstGraphicBlock& block, in getBufferQueueAssignment() argument
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/kotlin/
DIpcSerializer.kt78 suspend fun <R> runSerialized(block: suspend () -> R): R { in runSerialized()
86 val result = block() in runSerialized()
97 fun <R> runSerializedBlocking(block: suspend () -> R): R = runBlocking { runSerialized(block) } in <lambda>()
/frameworks/base/services/usb/java/com/android/server/usb/descriptors/
DUsbACMidi20Endpoint.java50 for (int block = 0; block < mNumGroupTerminals; block++) { in parseRawDescriptors()
51 mBlockIds[block] = stream.getByte(); in parseRawDescriptors()
/frameworks/av/media/codec2/fuzzer/
DC2Fuzzer.cpp28 explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block) in LinearBuffer() argument
29 : C2Buffer({block->share(block->offset(), block->size(), ::C2Fence())}) {} in LinearBuffer()
31 explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block, size_t size) in LinearBuffer() argument
32 : C2Buffer({block->share(block->offset(), size, ::C2Fence())}) {} in LinearBuffer()
275 std::shared_ptr<C2LinearBlock> block; in decodeFrames() local
277 alignedSize, {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE}, &block); in decodeFrames()
278 if (status != C2_OK || block == nullptr) { in decodeFrames()
282 C2WriteView view = block->map().get(); in decodeFrames()
287 work->input.buffers.emplace_back(new LinearBuffer(block, frameSize)); in decodeFrames()
/frameworks/av/media/codec2/components/cmds/
Dcodec2.cpp69 explicit LinearBuffer(const std::shared_ptr<C2LinearBlock> &block) in LinearBuffer() argument
70 : C2Buffer({ block->share(block->offset(), block->size(), ::C2Fence()) }) {} in LinearBuffer()
251 const C2ConstGraphicBlock block = output->data().graphicBlocks().front(); in play() local
252 native_handle_t *grallocHandle = UnwrapNativeCodec2GrallocHandle(block.handle()); in play()
256 block.width(), in play()
257 block.height(), in play()
261 block.width())); in play()
270 Rect(block.width(), block.height()), in play()
343 std::shared_ptr<C2LinearBlock> block; in play() local
347 &block); in play()
[all …]
/frameworks/base/libs/dream/lowlight/src/com/android/dream/lowlight/util/
DKotlinUtils.kt26 crossinline block: (CancellableContinuation<T>) -> Unit in suspendCoroutineWithTimeout()
28 suspendCancellableCoroutine(block = block) in suspendCoroutineWithTimeout()
/frameworks/av/media/codec2/vndk/
DC2Buffer.cpp171 _C2MappedBlock1DImpl(const _C2Block1DImpl &block, uint8_t *data, in _C2MappedBlock1DImpl() argument
173 : _C2Block1DImpl(block, offset, size), mData(data), mError(C2_OK) { } in _C2MappedBlock1DImpl()
339 std::shared_ptr<C2LinearBlock> *block /* nonnull */) { in fetchLinearBlock() argument
340 block->reset(); in fetchLinearBlock()
348 *block = _C2BlockFactory::CreateLinearBlock(alloc); in fetchLinearBlock()
423 const C2Block1D &block) { in GetLinearBlockPoolData() argument
424 if (block.mImpl) { in GetLinearBlockPoolData()
425 return block.mImpl->poolData(); in GetLinearBlockPoolData()
450 std::shared_ptr<C2LinearBlock> block = _C2BlockFactory::CreateLinearBlock(alloc); in CreateLinearBlock() local
451 return block; in CreateLinearBlock()
[all …]

12345678910>>...12