Home
last modified time | relevance | path

Searched refs:fileSize (Results 1 – 25 of 63) sorted by relevance

123

/frameworks/base/libs/androidfw/tests/
DBackupHelpers_test.cpp40 off64_t fileSize = 1024; in TEST_F() local
41 ASSERT_EQ(0, posix_fallocate64(tf.fd, 0, fileSize)); in TEST_F()
46 off64_t expectedTarSize = fileSize + 512; in TEST_F()
53 off64_t fileSize = 2LL * 1024LL * 1024LL * 1024LL + 512LL; in TEST_F() local
54 ASSERT_EQ(0, posix_fallocate64(tf.fd, 0, fileSize)); in TEST_F()
59 off64_t expectedTarSize = fileSize + 512; in TEST_F()
/frameworks/native/opengl/libs/EGL/
DFileBlobCache.cpp79 size_t fileSize = statBuf.st_size; in FileBlobCache() local
80 if (fileSize > mMaxTotalSize * 2) { in FileBlobCache()
87 uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(nullptr, fileSize, in FileBlobCache()
97 size_t cacheSize = fileSize - headerSize; in FileBlobCache()
114 munmap(buf, fileSize); in FileBlobCache()
119 munmap(buf, fileSize); in FileBlobCache()
154 size_t fileSize = headerSize + cacheSize; in writeToFile() local
156 uint8_t* buf = new uint8_t [fileSize]; in writeToFile()
180 if (write(fd, buf, fileSize) == -1) { in writeToFile()
DMultifileBlobCache.cpp202 size_t fileSize = static_cast<size_t>(st.st_size); in MultifileBlobCache() local
206 mmap(nullptr, fileSize, PROT_READ, MAP_PRIVATE, fd, 0)); in MultifileBlobCache()
219 fileSize - sizeof(MultifileHeader))) { in MultifileBlobCache()
242 trackEntry(entryHash, header.valueSize, fileSize, st.st_atime); in MultifileBlobCache()
245 increaseTotalCacheSize(fileSize); in MultifileBlobCache()
248 if ((mHotCacheSize + fileSize) < mHotCacheLimit) { in MultifileBlobCache()
254 if (!addToHotCache(entryHash, fd, mappedEntry, fileSize)) { in MultifileBlobCache()
256 munmap(mappedEntry, fileSize); in MultifileBlobCache()
261 munmap(mappedEntry, fileSize); in MultifileBlobCache()
321 size_t fileSize = sizeof(MultifileHeader) + keySize + valueSize; in set() local
[all …]
DMultifileBlobCache.h49 size_t fileSize; member
126 void trackEntry(uint32_t entryHash, EGLsizeiANDROID valueSize, size_t fileSize,
138 void increaseTotalCacheSize(size_t fileSize);
139 void decreaseTotalCacheSize(size_t fileSize);
/frameworks/av/media/module/foundation/tests/OpusHeader/
DOpusHeaderTest.cpp127 size_t fileSize = buf.st_size; in TEST_P() local
128 mInputBuffer = (uint8_t *)malloc(fileSize); in TEST_P()
129 ASSERT_NE(mInputBuffer, nullptr) << "Insufficient memory. Malloc failed for size " << fileSize; in TEST_P()
131 mEleStream.read(reinterpret_cast<char *>(mInputBuffer), fileSize); in TEST_P()
132 ASSERT_EQ(mEleStream.gcount(), fileSize) << "mEleStream.gcount() != bytesCount"; in TEST_P()
134 ASSERT_EQ(fileSize, headerSize) in TEST_P()
137 reinterpret_cast<char *>(headerData), fileSize); in TEST_P()
218 size_t fileSize = buf.st_size; in TEST_P() local
219 mInputBuffer = (uint8_t *)malloc(fileSize); in TEST_P()
220 ASSERT_NE(mInputBuffer, nullptr) << "Insufficient memory. Malloc failed for size " << fileSize; in TEST_P()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/
DDownloadManagerFunctionalTest.java101 int fileSize = 1024; in testBinaryDownload() local
102 byte[] blobData = generateData(fileSize, DataType.BINARY); in testBinaryDownload()
114 int fileSize = 1024; in testTextDownload() local
115 byte[] blobData = generateData(fileSize, DataType.TEXT); in testTextDownload()
133 int fileSize = fileData.length; in verifyDownload() local
140 verifyFileSize(pfd, fileSize); in verifyDownload()
320 int fileSize = 1024; in testRemoveDownload() local
321 byte[] blobData = generateData(fileSize, DataType.BINARY); in testRemoveDownload()
340 int fileSize = 1024; in testSetTitle() local
341 byte[] blobData = generateData(fileSize, DataType.BINARY); in testSetTitle()
[all …]
DDownloadManagerStressTest.java123 long fileSize = 50000000L; // note: kept relatively small to not exceed /cache dir size in testDownloadLargeFile() local
124 Log.i(TAG, "creating a file of size: " + fileSize); in testDownloadLargeFile()
125 File largeFile = createFileOnSD(null, fileSize, DataType.TEXT, null); in testDownloadLargeFile()
126 Log.i(TAG, "DONE creating a file of size: " + fileSize); in testDownloadLargeFile()
DDownloadManagerBaseTest.java357 long fileSize = actual.getStatSize(); in verifyFileContents() local
359 assertTrue(fileSize <= Integer.MAX_VALUE); in verifyFileContents()
360 assertEquals(expected.length, fileSize); in verifyFileContents()
363 assertEquals(input.read(actualData), fileSize); in verifyFileContents() local
490 int fileSize = fileData.length; in verifyAndCleanupSingleFileDownload() local
498 verifyFileSize(pfd, fileSize); in verifyAndCleanupSingleFileDownload()
593 protected File createFileOnSD(String filename, long fileSize, DataType type, in createFileOnSD() argument
616 long remaining = fileSize; in createFileOnSD()
634 Log.i(TAG, "while creating " + fileSize + " file, " + in createFileOnSD()
/frameworks/base/core/java/android/util/apk/
DZipUtils.java67 long fileSize = zip.getChannel().size(); in findZipEndOfCentralDirectoryRecord() local
68 if (fileSize < ZIP_EOCD_REC_MIN_SIZE) { in findZipEndOfCentralDirectoryRecord()
115 long fileSize = zip.getChannel().size(); in findZipEndOfCentralDirectoryRecord() local
116 if (fileSize < ZIP_EOCD_REC_MIN_SIZE) { in findZipEndOfCentralDirectoryRecord()
121 maxCommentSize = (int) Math.min(maxCommentSize, fileSize - ZIP_EOCD_REC_MIN_SIZE); in findZipEndOfCentralDirectoryRecord()
125 long bufOffsetInFile = fileSize - buf.capacity(); in findZipEndOfCentralDirectoryRecord()
/frameworks/base/tests/FsVerityTest/FsVerityTestApp/src/com/android/fsverity/
DHelper.java67 int fileSize = Integer.parseInt(testArgs.getString("fileSize")); in prepareTest() local
68 Log.d(TAG, "Preparing test file with size " + fileSize); in prepareTest()
73 for (int i = 0; i < fileSize; i += bytes.length) { in prepareTest()
74 if (i + bytes.length > fileSize) { in prepareTest()
75 os.write(bytes, 0, fileSize % bytes.length); in prepareTest()
/frameworks/av/media/tests/benchmark/tests/
DC2DecoderTest.cpp76 size_t fileSize = buf.st_size; in TEST_P() local
79 ASSERT_LE(fileSize, kMaxBufferSize) in TEST_P()
82 int32_t trackCount = extractor->initExtractor(fd, fileSize); in TEST_P()
89 std::unique_ptr<uint8_t[]> inputBuffer(new (std::nothrow) uint8_t[fileSize]); in TEST_P()
102 ASSERT_LE(inputBufferOffset + info.size, fileSize) << "Memory allocated not sufficient"; in TEST_P()
115 ASSERT_LE(inputBufferOffset + info.size, fileSize) << "Memory allocated not sufficient"; in TEST_P()
DC2EncoderTest.cpp79 size_t fileSize = buf.st_size; in TEST_P() local
82 ASSERT_LE(fileSize, kMaxBufferSize) in TEST_P()
85 int32_t trackCount = extractor->initExtractor(fd, fileSize); in TEST_P()
92 std::unique_ptr<uint8_t[]> inputBuffer(new (std::nothrow) uint8_t[fileSize]); in TEST_P()
104 ASSERT_LE(inputBufferOffset + info.size, fileSize) << "Memory allocated not sufficient"; in TEST_P()
DExtractorTest.cpp44 size_t fileSize = buf.st_size; in TEST_P() local
47 int32_t trackCount = extractObj->initExtractor(fd, fileSize); in TEST_P()
/frameworks/av/drm/mediadrm/plugins/clearkey/common/include/clearkeydrm/
DMemoryFileSystem.h35 size_t fileSize; member
38 size_t getFileSize() const { return fileSize; } in getFileSize()
43 fileSize = size; in setFileSize()
/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/src/main/cpp/
DNativeDecoder.cpp56 size_t fileSize = buf.st_size; in Java_com_android_media_benchmark_library_Native_Decode() local
57 if (fileSize > kMaxBufferSize) { in Java_com_android_media_benchmark_library_Native_Decode()
62 int32_t trackCount = extractor->initExtractor(fd, fileSize); in Java_com_android_media_benchmark_library_Native_Decode()
74 uint8_t *inputBuffer = (uint8_t *) malloc(fileSize); in Java_com_android_media_benchmark_library_Native_Decode()
DNativeMuxer.cpp61 size_t fileSize = buf.st_size; in Java_com_android_media_benchmark_library_Native_Mux() local
64 int32_t trackCount = extractor->initExtractor(fd, fileSize); in Java_com_android_media_benchmark_library_Native_Mux()
77 uint8_t *inputBuffer = (uint8_t *) malloc(fileSize); in Java_com_android_media_benchmark_library_Native_Mux()
91 if (inputBufferOffset + info.size > fileSize) { in Java_com_android_media_benchmark_library_Native_Mux()
DNativeExtractor.cpp39 size_t fileSize = buf.st_size; in Java_com_android_media_benchmark_library_Native_Extract() local
43 int32_t trackCount = extractObj->initExtractor((long) fd, fileSize); in Java_com_android_media_benchmark_library_Native_Extract()
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/base/
DInputStreamSource.java63 int fileSize = 0; in process() local
73 fileSize += bytesRead; in process()
82 mOutputFormat.setDimensions(fileSize); in process()
/frameworks/av/media/module/foundation/tests/AVCUtils/
DAVCUtilsUnitTest.cpp152 size_t fileSize = buf.st_size; in TEST_P() local
153 ASSERT_NE(fileSize, 0) << "Invalid file size found"; in TEST_P()
155 std::unique_ptr<uint8_t[]> volBuffer(new uint8_t[fileSize]); in TEST_P()
156 ASSERT_NE(volBuffer, nullptr) << "Failed to allocate VOL buffer of size: " << fileSize; in TEST_P()
158 inputFileStream.read((char *)(volBuffer.get()), fileSize); in TEST_P()
159 ASSERT_EQ(inputFileStream.gcount(), fileSize) in TEST_P()
167 bool status = ExtractDimensionsFromVOLHeader(volBuffer.get(), fileSize, &volWidth, &volHeight); in TEST_P()
/frameworks/base/services/core/java/com/android/server/storage/
DFileCollector.java246 long fileSize = f.length(); in handleFile() local
250 result.audioSize += fileSize; in handleFile()
253 result.videosSize += fileSize; in handleFile()
256 result.imagesSize += fileSize; in handleFile()
259 result.miscSize += fileSize; in handleFile()
/frameworks/base/tests/FsVerityTest/src/com/android/fsverity/
DFsVerityHostTest.java91 private void prepareTest(int fileSize) throws Exception { in prepareTest() argument
96 options.addInstrumentationArg("fileSize", String.valueOf(fileSize)); in prepareTest()
/frameworks/av/media/module/libmediatranscoding/transcoder/benchmark/
DMediaSampleReaderBenchmark.cpp55 const size_t fileSize = lseek(srcFd, 0, SEEK_END); in ReadMediaSamples() local
59 auto sampleReader = MediaSampleReaderNDK::createFromFd(srcFd, 0, fileSize); in ReadMediaSamples()
/frameworks/av/media/libstagefright/httplive/fuzzer/
Dhttplive_fuzzer.cpp228 size_t fileSize = 0; in createFiles() local
231 fileSize = bytesRemaining - location; in createFiles()
233 initDataFile(m3u8fileName, &mData[location], fileSize); in createFiles()
237 fileSize = bytesRemaining - location; in createFiles()
239 initDataFile(binfileName, &mData[location], fileSize); in createFiles()
/frameworks/base/media/java/android/media/
DMediaScanner.java123 long fileSize, boolean isDirectory, boolean noMedia) { in beginFile() argument
129 public void scanFile(String path, long lastModified, long fileSize, in scanFile() argument
137 long fileSize, boolean isDirectory, boolean scanAlways, boolean noMedia) { in doScanFile() argument
DMediaScannerClient.java24 public void scanFile(String path, long lastModified, long fileSize, in scanFile() argument

123