/frameworks/base/tools/aapt2/format/binary/ |
D | ResChunkPullParser.h | 55 const android::ResChunk_header* chunk() const; 71 inline static const T* ConvertTo(const android::ResChunk_header* chunk) { in ConvertTo() argument 72 if (util::DeviceToHost16(chunk->headerSize) < MinSize) { in ConvertTo() 75 return reinterpret_cast<const T*>(chunk); in ConvertTo() 78 inline static const uint8_t* GetChunkData(const android::ResChunk_header* chunk) { in GetChunkData() argument 79 return reinterpret_cast<const uint8_t*>(chunk) + util::DeviceToHost16(chunk->headerSize); in GetChunkData() 82 inline static uint32_t GetChunkDataLen(const android::ResChunk_header* chunk) { in GetChunkDataLen() argument 83 return util::DeviceToHost32(chunk->size) - util::DeviceToHost16(chunk->headerSize); in GetChunkDataLen() 109 inline const android::ResChunk_header* ResChunkPullParser::chunk() const { in chunk() function
|
D | BinaryResourceParser.cpp | 103 if (parser.chunk()->type != android::RES_TABLE_TYPE) { in Parse() 105 static_cast<int>(parser.chunk()->type))); in Parse() 109 if (!ParseTable(parser.chunk())) { in Parse() 120 static_cast<int>(parser.chunk()->type))); in Parse() 134 bool BinaryResourceParser::ParseTable(const ResChunk_header* chunk) { in ParseTable() argument 135 const ResTable_header* table_header = ConvertTo<ResTable_header>(chunk); in ParseTable() 144 switch (util::DeviceToHost16(parser.chunk()->type)) { in ParseTable() 148 value_pool_.setTo(parser.chunk(), util::DeviceToHost32(parser.chunk()->size)); in ParseTable() 163 if (!ParsePackage(parser.chunk())) { in ParseTable() 171 << static_cast<int>(util::DeviceToHost16(parser.chunk()->type))); in ParseTable() [all …]
|
D | BinaryResourceParser.h | 52 bool ParseTable(const android::ResChunk_header* chunk); 53 bool ParsePackage(const android::ResChunk_header* chunk); 54 bool ParseTypeSpec(const ResourceTablePackage* package, const android::ResChunk_header* chunk, 56 bool ParseType(const ResourceTablePackage* package, const android::ResChunk_header* chunk, 58 bool ParseLibrary(const android::ResChunk_header* chunk); 59 bool ParseOverlayable(const android::ResChunk_header* chunk); 60 bool ParseStagedAliases(const android::ResChunk_header* chunk);
|
D | ChunkWriter.h | 38 T* chunk = buffer_->NextBlock<T>(); in StartChunk() local 39 header_ = &chunk->header; in StartChunk() 42 return chunk; in StartChunk()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/ |
D | LengthlessEncryptedChunkEncoder.java | 19 import com.android.server.backup.encryption.chunk.ChunkOrderingType; 37 public void writeChunkToWriter(BackupWriter writer, EncryptedChunk chunk) throws IOException { in writeChunkToWriter() argument 38 writer.writeBytes(chunk.nonce()); in writeChunkToWriter() 39 writer.writeBytes(chunk.encryptedBytes()); in writeChunkToWriter() 43 public int getEncodedLengthOfChunk(EncryptedChunk chunk) { in getEncodedLengthOfChunk() argument 44 return chunk.nonce().length + chunk.encryptedBytes().length; in getEncodedLengthOfChunk()
|
D | InlineLengthsEncryptedChunkEncoder.java | 19 import com.android.server.backup.encryption.chunk.ChunkOrderingType; 40 public void writeChunkToWriter(BackupWriter writer, EncryptedChunk chunk) throws IOException { in writeChunkToWriter() argument 41 int length = mLengthlessEncryptedChunkEncoder.getEncodedLengthOfChunk(chunk); in writeChunkToWriter() 43 mLengthlessEncryptedChunkEncoder.writeChunkToWriter(writer, chunk); in writeChunkToWriter() 47 public int getEncodedLengthOfChunk(EncryptedChunk chunk) { in getEncodedLengthOfChunk() argument 48 return BYTES_LENGTH + mLengthlessEncryptedChunkEncoder.getEncodedLengthOfChunk(chunk); in getEncodedLengthOfChunk()
|
D | EncryptedChunkEncoder.java | 19 import com.android.server.backup.encryption.chunk.ChunkOrderingType; 32 void writeChunkToWriter(BackupWriter writer, EncryptedChunk chunk) throws IOException; in writeChunkToWriter() argument 38 int getEncodedLengthOfChunk(EncryptedChunk chunk); in getEncodedLengthOfChunk() argument
|
D | BackupFileBuilder.java | 25 import com.android.server.backup.encryption.chunk.ChunkHash; 26 import com.android.server.backup.encryption.chunk.ChunkListingMap; 216 ChunksMetadataProto.Chunk chunk = new ChunksMetadataProto.Chunk(); in addChunk() local 217 chunk.hash = Arrays.copyOf(chunkHash, chunkHash.length); in addChunk() 218 chunk.length = length; in addChunk() 219 mKnownChunks.add(chunk); in addChunk()
|
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ |
D | ProgramInfoCacheTest.java | 71 ProgramListChunk chunk = new ProgramListChunk(); in testUpdateFromHal() local 72 chunk.purge = true; in testUpdateFromHal() 73 chunk.complete = true; in testUpdateFromHal() 74 chunk.modified.add(TestUtils.programInfoToHal(mRdsInfo)); in testUpdateFromHal() 75 chunk.modified.add(TestUtils.programInfoToHal(mDabEnsembleInfo)); in testUpdateFromHal() 76 cache.updateFromHalProgramListChunk(chunk); in testUpdateFromHal() 81 chunk.purge = false; in testUpdateFromHal() 82 chunk.complete = false; in testUpdateFromHal() 83 chunk.modified.clear(); in testUpdateFromHal() 86 chunk.modified.add(TestUtils.programInfoToHal(updatedRdsInfo)); in testUpdateFromHal() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | NinePatch.java | 103 public NinePatch(Bitmap bitmap, byte[] chunk) { in NinePatch() argument 104 this(bitmap, chunk, null); in NinePatch() 115 public NinePatch(Bitmap bitmap, byte[] chunk, String srcName) { in NinePatch() argument 118 mNativeChunk = validateNinePatchChunk(chunk); in NinePatch() 262 public native static boolean isNinePatchChunk(byte[] chunk); in isNinePatchChunk() argument 269 private static native long validateNinePatchChunk(byte[] chunk); in validateNinePatchChunk() argument 270 private static native void nativeFinalize(long chunk); in nativeFinalize() argument 271 private static native long nativeGetTransparentRegion(long bitmapHandle, long chunk, in nativeGetTransparentRegion() argument
|
/frameworks/base/tools/aapt2/ |
D | Debug.cpp | 599 void PrintChunkHeader(const ResChunk_header* chunk) { in PrintChunkHeader() argument 600 switch (util::DeviceToHost16(chunk->type)) { in PrintChunkHeader() 623 printer_->Print(StringPrintf(" chunkSize: %u", util::DeviceToHost32(chunk->size))); in PrintChunkHeader() 624 printer_->Print(StringPrintf(" headerSize: %u", util::DeviceToHost32(chunk->headerSize))); in PrintChunkHeader() 627 bool PrintTable(const ResTable_header* chunk) { in PrintTable() argument 629 StringPrintf(" Package count: %u\n", util::DeviceToHost32(chunk->packageCount))); in PrintTable() 634 ResChunkPullParser(GetChunkData(&chunk->header), GetChunkDataLen(&chunk->header))); in PrintTable() 657 bool PrintTableType(const ResTable_type* chunk) { in PrintTableType() argument 658 printer_->Print(StringPrintf(" id: 0x%02x", util::DeviceToHost32(chunk->id))); in PrintTableType() 660 " name: %s", util::GetString(type_pool_, util::DeviceToHost32(chunk->id) - 1).c_str())); in PrintTableType() [all …]
|
/frameworks/base/services/core/java/com/android/server/broadcastradio/hal2/ |
D | ProgramInfoCache.java | 107 @NonNull android.hardware.broadcastradio.V2_0.ProgramListChunk chunk) { in updateFromHalProgramListChunk() 108 if (chunk.purge) { in updateFromHalProgramListChunk() 111 for (android.hardware.broadcastradio.V2_0.ProgramInfo halProgramInfo : chunk.modified) { in updateFromHalProgramListChunk() 115 for (android.hardware.broadcastradio.V2_0.ProgramIdentifier halProgramId : chunk.removed) { in updateFromHalProgramListChunk() 118 mComplete = chunk.complete; in updateFromHalProgramListChunk() 164 @Nullable List<ProgramList.Chunk> filterAndApplyChunk(@NonNull ProgramList.Chunk chunk) { in filterAndApplyChunk() argument 165 return filterAndApplyChunkInternal(chunk, MAX_NUM_MODIFIED_PER_CHUNK, in filterAndApplyChunk() 170 @Nullable List<ProgramList.Chunk> filterAndApplyChunkInternal(@NonNull ProgramList.Chunk chunk, in filterAndApplyChunkInternal() argument 172 if (chunk.isPurge()) { in filterAndApplyChunkInternal() 178 for (RadioManager.ProgramInfo info : chunk.getModified()) { in filterAndApplyChunkInternal() [all …]
|
/frameworks/base/libs/hwui/ |
D | NinePatchUtils.h | 22 static inline void SetLatticeDivs(SkCanvas::Lattice* lattice, const Res_png_9patch& chunk, in SetLatticeDivs() argument 24 lattice->fXCount = chunk.numXDivs; in SetLatticeDivs() 25 lattice->fYCount = chunk.numYDivs; in SetLatticeDivs() 26 lattice->fXDivs = chunk.getXDivs(); in SetLatticeDivs() 27 lattice->fYDivs = chunk.getYDivs(); in SetLatticeDivs() 57 int numFlags, const Res_png_9patch& chunk, SkColor* colors) { in SetLatticeFlags() argument 85 uint32_t currentColor = chunk.getColors()[i++]; in SetLatticeFlags()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunk/ |
D | ChunkListingMap.java | 17 package com.android.server.backup.encryption.chunk; 43 for (ChunksMetadataProto.Chunk chunk : chunkListingProto.chunks) { in fromProto() 44 entries.put(new ChunkHash(chunk.hash), new Entry(start, chunk.length)); in fromProto() 45 start += chunk.length; in fromProto()
|
/frameworks/base/tools/aapt/ |
D | pseudolocalize.cpp | 72 String16 chunk = String16(text, size, lastpos); in text() local 74 chunk = mImpl->text(chunk); in text() 77 chunk = mImpl->placeholder(chunk); in text() 79 out.append(chunk); in text() 275 String16 chunk; in text() local 277 chunk.append(&c, 1); in text() 281 chunk.append(&c, 1); in text() 287 chunk.append(&c, 1); in text() 292 result += ((c == '%') ? chunk : placeholder(chunk)); in text()
|
/frameworks/base/tools/aapt2/compile/ |
D | Pseudolocalizer.cpp | 119 std::string chunk = text.substr(lastpos, size).to_string(); in Text() local 121 chunk = impl_->Text(chunk); in Text() 123 chunk = impl_->Placeholder(chunk); in Text() 125 out.append(chunk); in Text() 361 std::string chunk; in Text() local 363 chunk.append(&c, 1); in Text() 367 chunk.append(&c, 1); in Text() 373 chunk.append(&c, 1); in Text() 378 result += ((c == '%') ? chunk : Placeholder(chunk)); in Text()
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/ |
D | ChunkEncryptorTest.java | 31 import com.android.server.backup.encryption.chunk.ChunkHash; 103 EncryptedChunk chunk = mChunkEncryptor.encrypt(mPlaintextHash, PLAINTEXT_BYTES); in encrypt_withHash_resultContainsHashAsKey() local 105 assertThat(chunk.key()).isEqualTo(mPlaintextHash); in encrypt_withHash_resultContainsHashAsKey() 110 EncryptedChunk chunk = mChunkEncryptor.encrypt(mPlaintextHash, PLAINTEXT_BYTES); in encrypt_generatesHmacOfPlaintext() local 112 byte[] generatedHash = chunk.key().getHash(); in encrypt_generatesHmacOfPlaintext() 147 EncryptedChunk chunk = mChunkEncryptor.encrypt(mPlaintextHash, PLAINTEXT_BYTES); in encrypt_decryptedResultCorrespondsToPlaintext() local 153 new GCMParameterSpec(GCM_TAG_LENGTH_BYTES * 8, chunk.nonce())); in encrypt_decryptedResultCorrespondsToPlaintext() 154 byte[] decrypted = cipher.doFinal(chunk.encryptedBytes()); in encrypt_decryptedResultCorrespondsToPlaintext()
|
/frameworks/base/packages/BackupEncryption/proto/ |
D | backup_chunks_metadata.proto | 40 // The chunk ordering contains a list of the start position of each chunk in the encrypted file, 45 // The chunk ordering does not contain any start positions, and instead each encrypted chunk in 46 // the backup file is prefixed with its length. This allows us to decrypt each chunk but does 54 // SHA-256 MAC of the plaintext of the chunk 56 // Number of bytes in encrypted chunk 60 // List of the chunks in the blob, along with the length of each chunk. From this is it possible to 73 // Defines the type of chunk order used to encode the backup file on the server, so that we can 88 // blob in its correct order. (The chunk order is randomized so as to give the server less 93 // Ordered start positions of chunks. i.e., the file is the chunk starting at this position, 94 // followed by the chunk starting at this position, followed by ... etc. You can compute the [all …]
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/cdc/ |
D | ContentDefinedChunkerTest.java | 126 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withLargeChunks_splitsIntoChunksAcrossBoundaries() 141 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withSmallChunks_combinesChunksUntilMinSize() 157 mChunker.chunkify(inputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_doesNotProduceChunksLargerThanMaxSize() 189 zeroAvailabilityInputStream, (chunk) -> result.add(new String(chunk, UTF_8))); in chunkify_withInputStreamReturningZeroAvailability_returnsChunks() 207 (chunk) -> { in chunkify_whenConsumerThrowsException_rethrowsException()
|
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/ |
D | BackupStreamEncrypterTest.java | 23 import com.android.server.backup.encryption.chunk.ChunkHash; 81 for (EncryptedChunk chunk : result.getNewChunks()) { in testBackup_producesChunksOfTheGivenAverageSize() 82 totalSize += chunk.encryptedBytes().length; in testBackup_producesChunksOfTheGivenAverageSize() 97 for (EncryptedChunk chunk : chunks.subList(0, chunks.size() - 2)) { in testBackup_producesNoChunksSmallerThanMinSize() 98 assertThat(chunk.encryptedBytes().length) in testBackup_producesNoChunksSmallerThanMinSize() 108 for (EncryptedChunk chunk : chunks) { in testBackup_producesNoChunksLargerThanMaxSize() 109 assertThat(chunk.encryptedBytes().length) in testBackup_producesNoChunksLargerThanMaxSize() 237 for (EncryptedChunk chunk : chunks) { in chunksIndexedByKey() 238 chunksByKey.put(chunk.key(), chunk); in chunksIndexedByKey() local 256 EncryptedChunk chunk = byKey.get(listing.get(i)); in positionOfChunk() local [all …]
|
/frameworks/base/libs/hwui/jni/ |
D | NinePatch.cpp | 58 const Res_png_9patch* chunk = reinterpret_cast<const Res_png_9patch*>(array); in isNinePatchChunk() local 59 int8_t wasDeserialized = chunk->wasDeserialized; in isNinePatchChunk() 87 Res_png_9patch* chunk = reinterpret_cast<Res_png_9patch*>(chunkHandle); in getTransparentRegion() local 88 SkASSERT(chunk); in getTransparentRegion() 98 NinePatchUtils::SetLatticeDivs(&lattice, *chunk, bitmap.width(), bitmap.height()); in getTransparentRegion() 105 if (iter.numRectsToDraw() == chunk->numColors) { in getTransparentRegion() 110 if (0 == chunk->getColors()[index++] && !iterDst.isEmpty()) { in getTransparentRegion()
|
/frameworks/av/media/extractors/mp4/ |
D | SampleIterator.cpp | 91 uint32_t chunk = in seekTo() local 95 if (!mInitialized || chunk != mCurrentChunkIndex) { in seekTo() 97 if ((err = getChunkOffset(chunk, &mCurrentChunkOffset)) != OK) { in seekTo() 106 + mSamplesPerChunk * (chunk - mFirstChunk); in seekTo() 127 mCurrentChunkIndex = chunk; in seekTo() 202 status_t SampleIterator::getChunkOffset(uint32_t chunk, off64_t *offset) { in getChunkOffset() argument 205 if (chunk >= mTable->mNumChunkOffsets) { in getChunkOffset() 213 mTable->mChunkOffsetOffset + 8 + 4 * chunk, in getChunkOffset() 225 mTable->mChunkOffsetOffset + 8 + 8 * chunk, in getChunkOffset()
|
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/tasks/ |
D | BackupStreamEncrypter.java | 21 import com.android.server.backup.encryption.chunk.ChunkHash; 106 chunk -> { in backup() 107 messageDigest.update(chunk); in backup() 108 ChunkHash key = chunkHasher.computeHash(chunk); in backup() 111 newChunks.add(encryptor.encrypt(key, chunk)); in backup()
|
D | EncryptedBackupTask.java | 24 import com.android.server.backup.encryption.chunk.ChunkHash; 180 for (ChunksMetadataProto.Chunk chunk : chunkListing.chunks) { in getChunkHashes() 181 hashes.add(new ChunkHash(chunk.hash)); in getChunkHashes() 189 for (EncryptedChunk chunk : chunks) { in buildChunkMap() 190 chunkMap.put(chunk.key(), chunk); in buildChunkMap() local
|
/frameworks/base/packages/DynamicSystemInstallationService/src/com/android/dynsystem/ |
D | SparseInputStream.java | 70 SparseChunk chunk = new SparseChunk(); in readChunk() local 72 chunk.mChunkType = buf.getShort(); in readChunk() 74 chunk.mChunkSize = buf.getInt(); in readChunk() 75 chunk.mTotalSize = buf.getInt(); in readChunk() 76 return chunk; in readChunk()
|