/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/ |
D | FileUseMap.java | 102 private void internalAdd(@Nonnull FileUseMapEntry<?> entry) { in internalAdd() argument 103 map.add(entry); in internalAdd() 105 if (entry.isFree()) { in internalAdd() 106 free.add(entry); in internalAdd() 115 private void internalRemove(@Nonnull FileUseMapEntry<?> entry) { in internalRemove() argument 116 boolean wasRemoved = map.remove(entry); in internalRemove() 119 if (entry.isFree()) { in internalRemove() 120 free.remove(entry); in internalRemove() 131 private void add(@Nonnull FileUseMapEntry<?> entry) { in add() argument 132 Preconditions.checkArgument(entry.getStart() < size, "entry.getStart() >= size"); in add() [all …]
|
D | ZFile.java | 545 StoredEntry entry = mapEntry.getStore(); in entries() local 546 assert entry != null; in entries() 547 entries.put(entry.getCentralDirectoryHeader().getName(), entry); in entries() local 612 for (StoredEntry entry : directory.getEntries().values()) { in readData() 613 long start = entry.getCentralDirectoryHeader().getOffset(); in readData() 614 long end = start + entry.getInFileSize(); in readData() 669 + describe.apply(entry) in readData() 674 FileUseMapEntry<StoredEntry> mapEntry = map.add(start, end, entry); in readData() 675 entries.put(entry.getCentralDirectoryHeader().getName(), mapEntry); in readData() 949 void delete(@Nonnull final StoredEntry entry, boolean notify) throws IOException { in delete() argument [all …]
|
/tools/external/fat32lib/src/main/java/de/waldheinz/fs/fat/ |
D | FatLfnDirectory.java | 93 FatFile getFile(FatDirectoryEntry entry) throws IOException { in getFile() argument 94 FatFile file = entryToFile.get(entry); in getFile() 97 file = FatFile.get(fat, entry); in getFile() 98 entryToFile.put(entry, file); in getFile() 104 FatLfnDirectory getDirectory(FatDirectoryEntry entry) throws IOException { in getDirectory() argument 105 FatLfnDirectory result = entryToDirectory.get(entry); in getDirectory() 108 final ClusterChainDirectory storage = read(entry, fat); in getDirectory() 110 entryToDirectory.put(entry, result); in getDirectory() 136 final FatLfnDirectoryEntry entry = in addFile() local 139 dir.addEntries(entry.compactForm()); in addFile() [all …]
|
D | FatType.java | 51 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument 55 data[idx] = (byte) (entry & 0xFF); in writeEntry() 56 data[idx + 1] = (byte) ((entry >> 8) & 0x0F); in writeEntry() 58 data[idx] |= (byte) ((entry & 0x0F) << 4); in writeEntry() 59 data[idx + 1] = (byte) ((entry >> 4) & 0xFF); in writeEntry() 78 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument 80 data[idx] = (byte) (entry & 0xFF); in writeEntry() 81 data[idx + 1] = (byte) ((entry >> 8) & 0xFF); in writeEntry() 101 void writeEntry(byte[] data, int index, long entry) { in writeEntry() argument 103 data[idx] = (byte) (entry & 0xFF); in writeEntry() [all …]
|
D | FatFile.java | 36 private final FatDirectoryEntry entry; field in FatFile 42 this.entry = myEntry; in FatFile() 46 static FatFile get(Fat fat, FatDirectoryEntry entry) in get() argument 49 if (entry.isDirectory()) in get() 50 throw new IllegalArgumentException(entry + " is a directory"); in get() 53 fat, entry.getStartCluster(), entry.isReadonlyFlag()); in get() 55 if (entry.getLength() > cc.getLengthOnDisk()) throw new IOException( in get() 58 return new FatFile(entry, cc); in get() 71 return entry.getLength(); in getLength() 93 this.entry.setStartCluster(chain.getStartCluster()); in setLength() [all …]
|
D | AbstractDirectory.java | 218 final FatDirectoryEntry entry = entries.get(i); in flush() local 220 if (entry != null) { in flush() 221 entry.write(data); in flush() 288 public void removeEntry(FatDirectoryEntry entry) throws IOException { in removeEntry() argument 289 assert (entry != null); in removeEntry() 291 this.entries.remove(entry); in removeEntry() 313 final FatDirectoryEntry entry = FatDirectoryEntry.create(true); in createSub() local 314 entry.setStartCluster(chain.getStartCluster()); in createSub() 324 copyDateTimeFields(entry, dot); in createSub() 332 copyDateTimeFields(entry, dotDot); in createSub() [all …]
|
D | Fat.java | 262 long entry = entries[(int) cluster]; in getNextCluster() local 263 if (isEofCluster(entry)) { in getNextCluster() 266 return entry; in getNextCluster() 425 protected boolean isFreeCluster(long entry) { in isFreeCluster() argument 426 if (entry > Integer.MAX_VALUE) throw new IllegalArgumentException(); in isFreeCluster() 427 return (entries[(int) entry] == 0); in isFreeCluster() 436 protected boolean isReservedCluster(long entry) { in isReservedCluster() argument 437 return fatType.isReservedCluster(entry); in isReservedCluster() 446 protected boolean isEofCluster(long entry) { in isEofCluster() argument 447 return fatType.isEofCluster(entry); in isEofCluster()
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/ |
D | ZipUtil2.java | 47 private static boolean applyUnixModeIfNecessary(ZipArchiveEntry entry, File localFile) in applyUnixModeIfNecessary() argument 49 if (entry.getPlatform() == ZipArchiveEntry.PLATFORM_UNIX) { in applyUnixModeIfNecessary() 51 FileUtil.unixModeToPosix(entry.getUnixMode())); in applyUnixModeIfNecessary() 66 private static boolean extractZipEntry(ZipFile zipFile, ZipArchiveEntry entry, File destFile) in extractZipEntry() argument 68 FileUtil.writeToFile(zipFile.getInputStream(entry), destFile); in extractZipEntry() 69 return applyUnixModeIfNecessary(entry, destFile); in extractZipEntry() 83 ZipArchiveEntry entry = entries.nextElement(); in extractZip() local 84 File childFile = new File(destDir, entry.getName()); in extractZip() 85 ZipUtil.validateDestinationDir(destDir, entry.getName()); in extractZip() 87 if (entry.isDirectory()) { in extractZip() [all …]
|
D | ZipUtil.java | 116 ZipEntry entry = entries.nextElement(); in extractZip() local 117 File childFile = new File(destDir, entry.getName()); in extractZip() 118 validateDestinationDir(destDir, entry.getName()); in extractZip() 120 if (entry.isDirectory()) { in extractZip() 123 FileUtil.writeToFile(zipFile.getInputStream(entry), childFile); in extractZip() 140 ZipEntry entry = entries.nextElement(); in extractZip() local 141 File childFile = new File(destDir, entry.getName()); in extractZip() 142 validateDestinationDir(destDir, entry.getName()); in extractZip() 144 if (!entry.isDirectory() && shouldExtract.test(entry)) { in extractZip() 145 FileUtil.writeToFile(zipFile.getInputStream(entry), childFile); in extractZip() [all …]
|
/tools/test/mobly_extensions/tools/results_uploader/src/ |
D | mobly_result_converter.py | 198 entry: Mapping[str, Any], 219 or entry.get(records.TestResultEnums.RECORD_SIGNATURE, None) is None 223 test_class = entry[records.TestResultEnums.RECORD_CLASS] 226 entry[records.TestResultEnums.RECORD_SIGNATURE] 398 for entry in entries: 399 if records.TestResultEnums.RECORD_SIGNATURE not in entry: 401 current_signature = entry[records.TestResultEnums.RECORD_SIGNATURE] 402 signature_test_name_map[current_signature] = entry[ 406 rerun_parent = entry.get(records.TestResultEnums.RECORD_PARENT, None) 432 entry: Mapping[str, Any], [all …]
|
/tools/tradefederation/core/javatests/com/android/tradefed/device/metric/ |
D | RebootReasonCollectorTest.java | 123 entry -> in testAddingMetrics_singleDevice() 124 entry.getKey().contains(RebootReasonCollector.METRIC_PREFIX) in testAddingMetrics_singleDevice() 125 && entry.getKey().contains("bootloader_reason") in testAddingMetrics_singleDevice() 126 && entry.getKey().contains("system_reason_1") in testAddingMetrics_singleDevice() 127 && !entry.getKey().contains(DEVICE_SERIAL_1) in testAddingMetrics_singleDevice() 129 entry.getValue() in testAddingMetrics_singleDevice() 138 entry -> in testAddingMetrics_singleDevice() 139 entry.getKey().contains(RebootReasonCollector.METRIC_PREFIX) in testAddingMetrics_singleDevice() 140 && entry.getKey().contains("bootloader_reason") in testAddingMetrics_singleDevice() 141 && entry.getKey().contains("system_reason_2") in testAddingMetrics_singleDevice() [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/postprocessor/ |
D | PerfettoGenericPostProcessor.java | 455 for (Entry<FieldDescriptor, Object> entry : fields.entrySet()) { in convertPerfettoProtoMessage() 456 if (!(entry.getValue() instanceof Message) && !(entry.getValue() instanceof List)) { in convertPerfettoProtoMessage() 457 if (isNumeric(entry.getValue().toString())) { in convertPerfettoProtoMessage() 460 if (mPerfettoPrefixKeyFields.contains(entry.getKey().toString())) { in convertPerfettoProtoMessage() 465 entry.getKey().getName().toString(), entry.getValue().toString())); in convertPerfettoProtoMessage() 470 entry.getKey().toString())) { in convertPerfettoProtoMessage() 475 "%s-%s", entry.getKey().getName().toString(), in convertPerfettoProtoMessage() 476 entry.getValue().toString())); in convertPerfettoProtoMessage() 482 if (mNumberPattern.matcher(entry.getValue().toString()).matches()) { in convertPerfettoProtoMessage() 484 entry.getKey().getName(), in convertPerfettoProtoMessage() [all …]
|
D | StatsdGenericPostProcessor.java | 219 for (Entry<FieldDescriptor, Object> entry : fields.entrySet()) { in convertProtoMessage() 220 if (FIELDS_TO_SKIP.contains(entry.getKey().getName())) { in convertProtoMessage() 223 if (entry.getValue() instanceof Message) { in convertProtoMessage() 225 convertProtoMessage((Message) entry.getValue()); in convertProtoMessage() 228 String.join(METRIC_SEP, entry.getKey().getName(), metricEntry.getKey()), in convertProtoMessage() 231 } else if (entry.getValue() instanceof List) { in convertProtoMessage() 232 List<? extends Object> listMetrics = (List) entry.getValue(); in convertProtoMessage() 236 ? entry.getKey().getName() in convertProtoMessage() 239 entry.getKey().getName(), in convertProtoMessage() 259 entry.getKey().getName(), in convertProtoMessage() [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/multi/ |
D | MixImageZipPreparer.java | 230 for (Entry<String, String> entry : mSystemFileNameMaps.entrySet()) { in setUp() 231 InputStreamFactory value = extraSystemFiles.get(entry.getValue()); in setUp() 234 "Cannot find " + entry.getValue() + " in system build image zip.", in setUp() 238 systemFiles.put(entry.getKey(), value); in setUp() 363 final ZipEntry entry = entries.nextElement(); in getInputStreamFactoriesFromImageZip() local 364 if (entry.isDirectory()) { in getInputStreamFactoriesFromImageZip() 365 CLog.w("Image zip contains subdirectory %s.", entry.getName()); in getInputStreamFactoriesFromImageZip() 369 String name = new File(entry.getName()).getName(); in getInputStreamFactoriesFromImageZip() 374 if (entry.getSize() < 0) { in getInputStreamFactoriesFromImageZip() 377 if (entry.getCrc() < 0) { in getInputStreamFactoriesFromImageZip() [all …]
|
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/sign/ |
D | SigningExtension.java | 163 @Nonnull StoredEntry entry, @Nullable StoredEntry replaced) { in register() 164 return () -> onZipEntryOutput(entry); in register() 168 public IOExceptionRunnable removed(@Nonnull StoredEntry entry) { in register() 169 String entryName = entry.getCentralDirectoryHeader().getName(); in register() 244 private void onZipEntryOutput(@Nonnull StoredEntry entry) throws IOException { in onZipEntryOutput() argument 246 String entryName = entry.getCentralDirectoryHeader().getName(); in onZipEntryOutput() 249 if (entry.isDeleted()) { in onZipEntryOutput() 256 byte[] entryContents = entry.read(); in onZipEntryOutput() 277 for (StoredEntry entry : zFile.entries()) { in onOutputZipReadyForUpdate() 278 String entryName = entry.getCentralDirectoryHeader().getName(); in onOutputZipReadyForUpdate() [all …]
|
/tools/tradefederation/core/common_util/com/android/tradefed/util/zip/ |
D | MergedZipEntryCollection.java | 89 for (CentralDirectoryInfo entry : entries) { in createCollections() 91 long newGap = entry.getLocalHeaderOffset() - endOffset + totalGap; in createCollections() 93 entry.getLocalHeaderOffset() in createCollections() 95 + entry.getCompressedSize() in createCollections() 98 if (endOffset < entry.getLocalHeaderOffset() - MAX_GAP in createCollections() 105 group.add(entry); in createCollections() 106 if (group.size() > 1 && entry.getLocalHeaderOffset() > endOffset) { in createCollections() 107 totalGap += entry.getLocalHeaderOffset() - endOffset; in createCollections() 109 endOffset = entry.getLocalHeaderOffset() + HEADER_SIZE + entry.getCompressedSize(); in createCollections()
|
/tools/security/remote_provisioning/hwtrust/src/cbor/dice/ |
D | chain.rs | 1 use super::entry::{ConfigFormat, Entry}; 3 use crate::cbor::dice::entry::PayloadFields; 30 let entry = Entry::verify_cbor_value(value, &root_public_key) in from_value() localVariable 32 let fields = PayloadFields::from_cbor(session, entry.payload(), ConfigFormat::Android) in from_value() 74 let entry = Entry::verify_cbor_value(value, previous_public_key) in from_root_and_entries() localVariable 84 let payload = Payload::from_cbor(session, entry.payload(), config_format) in from_root_and_entries() 212 let entry = Entry::from_payload(&valid_payload(n, key)).unwrap(); in chain_from_cbor_valid() localVariable 213 entry.sign(&keys[n]).to_cbor_value().unwrap() in chain_from_cbor_valid() 227 let entry = Entry::from_payload(&valid_payload(n, key)).unwrap(); in chain_from_cbor_valid_with_mixed_key_types() localVariable 228 entry.sign(&keys[n]).to_cbor_value().unwrap() in chain_from_cbor_valid_with_mixed_key_types() [all …]
|
/tools/tradefederation/core/global_configuration/com/android/tradefed/host/ |
D | LocalHostResourceManager.java | 47 for (Map.Entry<String, String> entry : mHostResources.entrySet()) { in setup() 48 File localFile = fetchHostResource(entry.getKey(), entry.getValue()); in setup() 49 mDownloadedHostResources.put(entry.getKey(), localFile); in setup() 65 for (Map.Entry<String, File> entry : mDownloadedHostResources.entrySet()) { in cleanup() 66 clearHostResource(entry.getKey(), entry.getValue()); in cleanup()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/reporter/ |
D | GameQualificationResultReporter.java | 160 for (Map.Entry<TestDescription, MetricSummary> entry : summaries.entrySet()) { in getInvocationSummary() 161 sb.append(String.format("\n%s Metrics:\n%s\n", entry.getKey(), entry.getValue())); in getInvocationSummary() 179 for (Map.Entry<TestDescription, TestResult> entry in getInvocationSummary() 186 sb.append(entry.getKey().toString()); in getInvocationSummary() 188 sb.append(entry.getValue().getStatus().name()); in getInvocationSummary() 276 for (Map.Entry<TestDescription, TestResult> entry : testResults.entrySet()) { in getTestRunSummary() 277 if (mSuppressPassedTest && TestStatus.PASSED.equals(entry.getValue().getStatus())) { in getTestRunSummary() 280 sb.append(getTestSummary(entry.getKey(), entry.getValue())); in getTestRunSummary() 304 for (Map.Entry<TestDescription, MetricSummary> entry : summaries.entrySet()) { in createPerformanceReport() 305 TestDescription testId = entry.getKey(); in createPerformanceReport() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/cloud/ |
D | CommonLogRemoteFileUtil.java | 215 for (GceAvdInfo.LogFileEntry entry : gceAvd.getLogs()) { in fetchCommonFiles() 221 entry.path, in fetchCommonFiles() 222 entry.type, in fetchCommonFiles() 223 Strings.isNullOrEmpty(entry.name) ? null : entry.name)) { in fetchCommonFiles() 236 for (KnownLogFileEntry entry : toFetch) { in fetchCommonFiles() 243 String.format(entry.path, options.getInstanceUser()), in fetchCommonFiles() 244 entry.type, in fetchCommonFiles() 245 entry.logName); in fetchCommonFiles() 343 for (GceAvdInfo.LogFileEntry entry : gceAvd.getLogs()) { in fetchTombstones() 344 if (entry.name.equals(TOMBSTONES_ZIP_NAME)) { in fetchTombstones() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/targetprep/multi/ |
D | HelloWorldMultiTargetPreparer.java | 42 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in setUp() 44 entry.getKey().getSerialNumber(), entry.getValue().getBuildId()); in setUp() 54 for (Entry<ITestDevice, IBuildInfo> entry : deviceBuildInfo.entrySet()) { in tearDown() 56 entry.getKey().getSerialNumber(), entry.getValue().getBuildId()); in tearDown()
|
/tools/netsim/rust/common/src/util/ |
D | zip_artifact.rs | 36 for entry in entries { in recurse_files() 37 let entry = entry?; in recurse_files() localVariable 38 let meta = entry.metadata()?; in recurse_files() 41 let mut subdir = recurse_files(&entry.path())?; in recurse_files() 45 if let Some(filename) = entry in recurse_files() 51 result.push((entry.path(), filename)); in recurse_files() 53 warn!("Unable to fetch filename for file: {:?}", entry.path()); in recurse_files()
|
/tools/tradefederation/core/javatests/com/android/tradefed/util/ |
D | ZipUtilFuncTest.java | 100 for (CentralDirectoryInfo entry : zipEntries) { in testCentralDirectoryInfos() 101 Assert.assertFalse(validateCentralDirectoryInfo(entry)); in testCentralDirectoryInfos() 164 private boolean validateCentralDirectoryInfo(CentralDirectoryInfo entry) { in validateCentralDirectoryInfo() argument 165 return (Long.toHexString(entry.getCompressedSize()).equals(OVERFLOW) || in validateCentralDirectoryInfo() 166 Long.toHexString(entry.getUncompressedSize()).equals(OVERFLOW) || in validateCentralDirectoryInfo() 167 Long.toHexString(entry.getLocalHeaderOffset()).equals(OVERFLOW)); in validateCentralDirectoryInfo() 173 for (CentralDirectoryInfo entry : zipEntries) { in validateCentralDirectoryInfos() 178 if (zipEntry.getName().equals(entry.getFileName())) { in validateCentralDirectoryInfos()
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | FilePullerDeviceMetricCollector.java | 152 for (Map.Entry<String, File> entry : pulledMetrics.entrySet()) { in processMetricRequest() 153 processMetricFile(entry.getKey(), entry.getValue(), data); in processMetricRequest() 195 for (Entry<String, String> entry : currentMetrics.entrySet()) { in pullMetricFile() 196 if (p.matcher(entry.getKey()).find()) { in pullMetricFile() 203 retrieveFile(device, entry.getValue(), deviceUsers.get(device)); in pullMetricFile() 206 device.deleteFile(entry.getValue()); in pullMetricFile() 210 matchedFiles.put(entry.getKey(), attemptPull); in pullMetricFile() 215 entry.getValue(), device.getSerialNumber()); in pullMetricFile()
|
/tools/test/graphicsbenchmark/performance_tests/hostside/src/com/android/game/qualification/metric/ |
D | Histogram.java | 111 for (Map.Entry<Long, Integer> entry : mCounts.entrySet()) { in plotAscii() 112 cumulative += entry.getValue(); in plotAscii() 113 long key = entry.getKey(); in plotAscii() 123 float percentage = entry.getValue() * 100f / total; in plotAscii() 126 ? (entry.getValue() * maxBarLength + maxCount - 1) / maxCount in plotAscii() 127 : entry.getValue(); in plotAscii() 134 entry.getValue(), in plotAscii()
|