Home
last modified time | relevance | path

Searched refs:dataSize (Results 1 – 25 of 165) sorted by relevance

1234567

/frameworks/base/libs/androidfw/tests/
DBackupData_test.cpp96 size_t dataSize; in TEST_F() local
97 EXPECT_EQ(NO_ERROR, reader->ReadEntityHeader(&key, &dataSize)) in TEST_F()
101 EXPECT_EQ(sizeof(DATA1), dataSize) in TEST_F()
104 char* dataBytes = new char[dataSize]; in TEST_F()
105 EXPECT_EQ((int) dataSize, reader->ReadEntityData(dataBytes, dataSize)) in TEST_F()
131 size_t dataSize; in TEST_F() local
135 reader->ReadEntityHeader(&key, &dataSize); in TEST_F()
136 dataBytes = new char[dataSize]; in TEST_F()
137 reader->ReadEntityData(dataBytes, dataSize); in TEST_F()
145 EXPECT_EQ(NO_ERROR, reader->ReadEntityHeader(&key, &dataSize)) in TEST_F()
[all …]
/frameworks/native/libs/binder/
DParcelableHolder.cpp32 RETURN_ON_FAILURE(p->writeInt32(this->mParcelPtr->dataSize())); in writeToParcel()
33 RETURN_ON_FAILURE(p->appendFrom(this->mParcelPtr.get(), 0, this->mParcelPtr->dataSize())); in writeToParcel()
42 size_t dataSize = p->dataPosition() - dataStartPos; in writeToParcel() local
45 RETURN_ON_FAILURE(p->writeInt32(dataSize)); in writeToParcel()
46 p->setDataPosition(p->dataPosition() + dataSize); in writeToParcel()
72 size_t dataSize = rawDataSize; in readFromParcel() local
76 if (dataStartPos > SIZE_MAX - dataSize) { in readFromParcel()
86 status = this->mParcelPtr->appendFrom(p, dataStartPos, dataSize); in readFromParcel()
91 p->setDataPosition(dataStartPos + dataSize); in readFromParcel()
/frameworks/base/core/java/android/os/
DParcelableHolder.java186 int dataSize = parcel.readInt(); in readFromParcel() local
187 if (dataSize < 0) { in readFromParcel()
189 } else if (dataSize == 0) { in readFromParcel()
203 mParcel.appendFrom(parcel, dataStartPos, dataSize); in readFromParcel()
204 parcel.setDataPosition(MathUtils.addOrThrow(dataStartPos, dataSize)); in readFromParcel()
212 parcel.writeInt(mParcel.dataSize()); in writeToParcel()
213 parcel.appendFrom(mParcel, 0, mParcel.dataSize()); in writeToParcel()
226 int dataSize = parcel.dataPosition() - dataStartPos; in writeToParcel() local
229 parcel.writeInt(dataSize); in writeToParcel()
230 parcel.setDataPosition(MathUtils.addOrThrow(parcel.dataPosition(), dataSize)); in writeToParcel() local
/frameworks/base/core/java/android/content/pm/
DPackageStats.java53 public long dataSize; field in PackageStats
103 if (dataSize != 0) { in toString()
105 sb.append(dataSize); in toString()
150 dataSize = source.readLong(); in PackageStats()
163 dataSize = pStats.dataSize; in PackageStats()
180 dest.writeLong(dataSize); in writeToParcel()
199 && dataSize == otherStats.dataSize in equals()
210 return Objects.hash(packageName, userHandle, codeSize, dataSize, in hashCode()
/frameworks/base/media/jni/
Dandroid_media_Utils.cpp131 uint32_t dataSize, ySize, cSize, cStride; in getLockedImageInfo() local
137 dataSize = ySize = cSize = cStride = 0; in getLockedImageInfo()
175 dataSize = buffer->stride * (buffer->height - 1) + buffer->width; in getLockedImageInfo()
179 dataSize = buffer->chromaStride * (buffer->height / 2 - 1) + in getLockedImageInfo()
219 dataSize = (idx == 0) ? ySize : cSize; in getLockedImageInfo()
261 dataSize = (idx == 0) ? ySize : cSize; in getLockedImageInfo()
288 dataSize = (idx == 0) ? ySize : cSize; in getLockedImageInfo()
296 dataSize = buffer->stride * buffer->height; in getLockedImageInfo()
306 dataSize = buffer->stride * buffer->height * bytesPerPixel; in getLockedImageInfo()
324 dataSize = Image_getBlobSize(buffer, usingRGBAOverride); in getLockedImageInfo()
[all …]
/frameworks/base/libs/androidfw/
DBackupData.cpp87 BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize) in WriteEntityHeader() argument
110 key.string(), dataSize); in WriteEntityHeader()
120 header.dataSize = tolel(dataSize); in WriteEntityHeader()
263 m_header.entity.dataSize = fromlel(m_header.entity.dataSize); in ReadNextHeader()
278 m_dataEndPos = m_pos + m_header.entity.dataSize; in ReadNextHeader()
298 BackupDataReader::ReadEntityHeader(String8* key, size_t* dataSize) in ReadEntityHeader() argument
307 *dataSize = m_header.entity.dataSize; in ReadEntityHeader()
320 if (m_header.entity.dataSize > 0) { in SkipEntityData()
/frameworks/base/services/robotests/src/com/android/server/testing/shadows/
DShadowBackupDataOutput.java64 protected int writeEntityHeader(String key, int dataSize) throws IOException { in writeEntityHeader() argument
68 writeEntityHeader(new ObjectOutputStream(byteStream), key, dataSize); in writeEntityHeader()
71 writeEntityHeader(mOutput, key, dataSize); in writeEntityHeader()
75 private void writeEntityHeader(ObjectOutputStream stream, String key, int dataSize) in writeEntityHeader() argument
78 stream.writeInt(dataSize); in writeEntityHeader()
/frameworks/base/core/tests/coretests/src/android/app/backup/
DBackupDataTest.java177 int dataSize = bdi.getDataSize(); in testReadMockData() local
181 (expectedBytes == null ? -1: expectedBytes.length), dataSize); in testReadMockData()
182 if (dataSize != -1) { in testReadMockData()
183 byte[] buffer = new byte[dataSize]; in testReadMockData()
184 bdi.readEntityData(buffer, 0, dataSize); in testReadMockData()
186 Base64.encodeToString(buffer, 0, dataSize, Base64.NO_WRAP)); in testReadMockData()
207 int dataSize = bdi.getDataSize(); in testReadRealData() local
211 (expectedBytes == null ? -1: expectedBytes.length), dataSize); in testReadRealData()
212 if (dataSize != -1) { in testReadRealData()
213 byte[] buffer = new byte[dataSize]; in testReadRealData()
[all …]
/frameworks/av/media/libstagefright/id3/test/
DID3Test.cpp131 size_t dataSize; in TEST_P() local
133 const void *data = tag.getAlbumArt(&dataSize, &mime); in TEST_P()
137 ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.string()); in TEST_P()
145 hexdump(data, dataSize > 128 ? 128 : dataSize); in TEST_P()
167 size_t dataSize; in TEST_P() local
169 const void *data = tag.getAlbumArt(&dataSize, &mime); in TEST_P()
171 ALOGV("Found album art: size = %zu mime = %s \n", dataSize, mime.string()); in TEST_P()
173 hexdump(data, dataSize > 128 ? 128 : dataSize); in TEST_P()
/frameworks/native/libs/binder/ndk/include_cpp/android/
Dbinder_parcelable_utils.h77 int32_t dataSize; in readFromParcel() local
78 binder_status_t status = AParcel_readInt32(parcel, &dataSize); in readFromParcel()
80 if (status != STATUS_OK || dataSize < 0) { in readFromParcel()
86 if (dataStartPos > INT32_MAX - dataSize) { in readFromParcel()
91 status = AParcel_appendFrom(parcel, mParcel.get(), dataStartPos, dataSize); in readFromParcel()
98 return AParcel_setDataPosition(parcel, dataStartPos + dataSize); in readFromParcel()
/frameworks/av/media/libstagefright/id3/
Dtestid3.cpp101 size_t dataSize; in scanFile() local
103 const void *data = tag.getAlbumArt(&dataSize, &mime); in scanFile()
106 printf("found album art: size=%zu mime='%s'\n", dataSize, in scanFile()
109 hexdump(data, dataSize > 128 ? 128 : dataSize); in scanFile()
DID3.cpp429 size_t dataSize; in removeUnsynchronizationV2_4() local
431 dataSize = U32_AT(&mData[offset + 4]); in removeUnsynchronizationV2_4()
432 } else if (!ParseSyncsafeInteger(&mData[offset + 4], &dataSize)) { in removeUnsynchronizationV2_4()
436 if (dataSize > mSize - 10 - offset) { in removeUnsynchronizationV2_4()
446 if (mSize < 14 || mSize - 14 < offset || dataSize < 4) { in removeUnsynchronizationV2_4()
451 dataSize -= 4; in removeUnsynchronizationV2_4()
460 if ((hasGlobalUnsync || (flags & 2)) && (dataSize >= 2)) { in removeUnsynchronizationV2_4()
466 for (size_t i = 0; i + 1 < dataSize; ++i) { in removeUnsynchronizationV2_4()
471 --dataSize; in removeUnsynchronizationV2_4()
473 if (i + 1 < dataSize) { in removeUnsynchronizationV2_4()
[all …]
/frameworks/av/media/ndk/
DNdkImage.cpp421 uint32_t dataSize, ySize, cSize, cStride; in getPlaneData() local
435 dataSize = mLockedBuffer->stride * (mLockedBuffer->height - 1) + in getPlaneData()
438 dataSize = in getPlaneData()
457 dataSize = (planeIdx == 0) ? ySize : cSize; in getPlaneData()
475 dataSize = (planeIdx == 0) ? ySize : cSize; in getPlaneData()
481 dataSize = mLockedBuffer->stride * mLockedBuffer->height; in getPlaneData()
487 dataSize = in getPlaneData()
499 dataSize = getJpegSize(); in getPlaneData()
505 dataSize = in getPlaneData()
516 dataSize = mLockedBuffer->width; in getPlaneData()
[all …]
/frameworks/base/cmds/backup/
Dbackup.cpp75 size_t dataSize; in perform_list() local
76 err = reader.ReadEntityHeader(&key, &dataSize); in perform_list()
78 printf(" entity: %s (%zu bytes)\n", key.string(), dataSize); in perform_list()
/frameworks/rs/
DrsApiElement.cpp36 const char **names, size_t *arraySizes, uint32_t dataSize) { in rsaElementGetSubElements() argument
38 rsAssert(e->getFieldCount() == dataSize); in rsaElementGetSubElements()
40 for (uint32_t i = 0; i < dataSize; i ++) { in rsaElementGetSubElements()
/frameworks/av/media/libmedia/
DMediaScanner.cpp248 void MediaAlbumArt::init(MediaAlbumArt *instance, int32_t dataSize, const void *data) { in init() argument
249 instance->mSize = dataSize; in init()
250 memcpy(&instance->mData[0], data, dataSize); in init()
253 MediaAlbumArt *MediaAlbumArt::fromData(int32_t dataSize, const void* data) { in fromData() argument
254 size_t byte_size = sizeof(MediaAlbumArt) + dataSize; in fromData()
256 init(result, dataSize, data); in fromData()
/frameworks/base/core/jni/
Dandroid_backup_BackupHelperDispatcher.cpp37 int dataSize; // corresponds to Header.chunkSize member
92 ALOGD(" dataSize=%d", flattenedHeader.dataSize); in readHeader_native()
96 if (flattenedHeader.dataSize < 0 || flattenedHeader.nameLength < 0 || in readHeader_native()
99 flattenedHeader.dataSize, flattenedHeader.nameLength); in readHeader_native()
120 env->SetIntField(headerObj, s_chunkSizeField, flattenedHeader.dataSize); in readHeader_native()
187 header.dataSize = prevPos - (pos + header.headerSize); in writeHeader_native()
Dandroid_backup_BackupDataInput.cpp73 size_t dataSize; in readNextHeader_native() local
74 err = reader->ReadEntityHeader(&key, &dataSize); in readNextHeader_native()
81 env->SetIntField(entity, s_dataSizeField, dataSize); in readNextHeader_native()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageManagerShellCommandDataLoader.java188 int dataSize = ByteBuffer.wrap(bytes, offset, 4).order( in fromByteArray() local
191 data = new String(bytes, offset, dataSize, StandardCharsets.UTF_8); in fromByteArray()
192 offset += dataSize; in fromByteArray()
213 int dataSize = dataBytes.length; in toByteArray() local
215 result = new byte[1 + 4 + dataSize + saltBytes.length]; in toByteArray()
220 dataSize); in toByteArray()
222 System.arraycopy(dataBytes, 0, result, offset, dataSize); in toByteArray()
223 offset += dataSize; in toByteArray()
/frameworks/base/core/java/android/app/backup/
DBackupDataOutput.java131 public int writeEntityHeader(String key, int dataSize) throws IOException { in writeEntityHeader() argument
132 int result = writeEntityHeader_native(mBackupWriter, key, dataSize); in writeEntityHeader()
174 … private native static int writeEntityHeader_native(long mBackupWriter, String key, int dataSize); in writeEntityHeader_native() argument
DBackupDataInputStream.java45 int dataSize; field in BackupDataInputStream
118 return this.dataSize; in size()
/frameworks/base/cmds/incidentd/src/
DPrivacyFilter.cpp140 ssize_t dataSize() const { return mSize; } in dataSize() function in android::os::incidentd::FieldStripper
295 ssize_t dataSize = fieldStripper.dataSize(); in writeData() local
296 if (dataSize > 0) { in writeData()
297 err = write_section_header(output->getFd(), mSectionId, dataSize); in writeData()
311 if (dataSize > *maxSize) { in writeData()
312 *maxSize = dataSize; in writeData()
/frameworks/base/services/backup/java/com/android/server/backup/
DPackageManagerBackupAgent.java444 int dataSize = data.getDataSize(); in getAncestralRecordVersionValue() local
446 if (DEBUG) Slog.v(TAG, " got key=" + key + " dataSize=" + dataSize); in getAncestralRecordVersionValue()
450 byte[] inputBytes = new byte[dataSize]; in getAncestralRecordVersionValue()
451 data.readEntityData(inputBytes, 0, dataSize); in getAncestralRecordVersionValue()
684 int dataSize = data.getDataSize(); in consumeRestoreData() local
686 if (DEBUG) Slog.v(TAG, " got key=" + key + " dataSize=" + dataSize); in consumeRestoreData()
689 byte[] inputBytes = new byte[dataSize]; in consumeRestoreData()
690 data.readEntityData(inputBytes, 0, dataSize); in consumeRestoreData()
730 + " dataSize=" + dataSize in consumeRestoreData()
769 int dataSize = data.getDataSize(); in consumeRestoreData() local
[all …]
/frameworks/base/libs/androidfw/include/androidfw/
DBackupHelpers.h35 int dataSize; // size of the data, not including the padding, -1 means delete member
74 status_t WriteEntityHeader(const String8& key, size_t dataSize);
115 status_t ReadEntityHeader(String8* key, size_t* dataSize);
/frameworks/base/media/jni/soundpool/
DSound.cpp143 const size_t dataSize = std::min((size_t)info.size, available); in decode() local
144 memcpy(writePos, buf + info.offset, dataSize); in decode()
145 writePos += dataSize; in decode()
146 written += dataSize; in decode()
147 available -= dataSize; in decode()

1234567