Home
last modified time | relevance | path

Searched refs:Files (Results 1 – 25 of 86) sorted by relevance

1234

/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DProcTimeInStateReaderTest.java37 import java.nio.file.Files;
60 Files.write(initialTimeInStateFile, "1 2\n3 4\n5 6\n7 8\n".getBytes()); in testSimple()
77 Files.write(initialTimeInStateFile, "header1\n1 2\nheader2:\n3 4\n5 6\n7 8\n".getBytes()); in testHeaderFormat()
93 Files.write(initialTimeInStateFile, "1 2\n3 4\n5 6\n7 8\n".getBytes()); in testDifferentFile()
97 Files.write(timeInStateFile, "1 20\n3 40\n5 60\n7 80\n".getBytes()); in testDifferentFile()
107 Files.write(initialTimeInStateFile, "1 2\n3 4\n5 6\n7 8\n".getBytes()); in testWrongLength()
111 Files.write(timeInStateFile, "1 2\n3 4\n5 6\n".getBytes()); in testWrongLength()
118 Files.write(initialTimeInStateFile, "".getBytes()); in testEmptyInitialFails()
DProcStatsUtilTest.java35 import java.nio.file.Files;
171 Files.write(tempFile.toPath(), fileContents.getBytes()); in runReadNullSeparatedFile()
173 Files.delete(tempFile.toPath()); in runReadNullSeparatedFile()
179 Files.write(tempFile.toPath(), fileContents.getBytes()); in runReadSingleLineProcFile()
181 Files.delete(tempFile.toPath()); in runReadSingleLineProcFile()
188 Files.write(tempFile.toPath(), fileContents.getBytes()); in runReadTerminatedProcFile()
190 Files.delete(tempFile.toPath()); in runReadTerminatedProcFile()
DKernelCpuProcStringReaderTest.java42 import java.nio.file.Files;
106 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit()
120 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadErrorsLimit()
141 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLine()
175 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testMultipleRead()
192 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadLineToArray()
230 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testReadOverLimit()
248 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testConcurrent()
300 try (BufferedWriter w = Files.newBufferedWriter(mTestFile.toPath())) { in testConcurrent()
DStoragedUidIoStatsReaderTest.java39 import java.nio.file.Files;
95 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testReadExpected()
132 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testLineDoesNotElevenEntries()
155 BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath()); in testLineIsMalformed()
DKernelCpuThreadReaderTest.java42 import java.nio.file.Files;
115 Files.write(processPath.resolve("cmdline"), processName.getBytes()); in setupDirectory()
125 Files.write(threadPath.resolve("comm"), threadNames[i].getBytes()); in setupDirectory()
129 Files.newOutputStream(threadPath.resolve("time_in_state")); in setupDirectory()
/frameworks/base/apct-tests/perftests/core/src/android/os/
DCpuUsageTrackingPerfTest.java29 import java.nio.file.Files;
56 byte[] data = Files.readAllBytes(Paths.get(procFile)); in timeReadStatFileDirectly()
66 byte[] data = Files.readAllBytes(Paths.get(procFile)); in timeReadPidProcDirectly()
77 byte[] data = Files.readAllBytes(Paths.get(procFile)); in timeReadThreadProcDirectly()
/frameworks/base/services/robotests/src/com/android/server/testing/shadows/
DShadowFullBackup.java14 import java.nio.file.Files;
44 byte[] data = Files.readAllBytes(file); in backupToTar()
54 tarBlock.putLong(Files.size(file)); // file size in backupToTar()
55 tarBlock.putLong(Files.getLastModifiedTime(file).toMillis()); // last modified time in backupToTar()
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/
DUtils.java22 import java.nio.file.Files;
47 return Files.exists(path) && Files.size(path) > 0; in isFileNonEmpty()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DPasswordSlotManagerTestable.java21 import java.nio.file.Files;
57 Files.delete(Paths.get(getSlotMapDir(), "slot_map")); in cleanup()
/frameworks/base/media/java/android/mtp/
DMtpDatabase.java35 import android.provider.MediaStore.Files;
98 private static final String PATH_WHERE = Files.FileColumns.DATA + "=?";
99 private static final String[] ID_PROJECTION = new String[] {Files.FileColumns._ID};
100 private static final String[] PATH_PROJECTION = new String[] {Files.FileColumns.DATA};
236 return MediaStore.Files.getContentUri(volumeName); in getObjectPropertiesUri()
575 values.put(Files.FileColumns.DATA, newPath.toString()); in renameFile()
580 final Uri objectsUri = MediaStore.Files.getMtpObjectsUri(obj.getVolumeName()); in renameFile()
636 values.put(Files.FileColumns.DATA, path.toString()); in endMoveObject()
638 values.put(Files.FileColumns.PARENT, 0); in endMoveObject()
642 values.put(Files.FileColumns.PARENT, parentId); in endMoveObject()
[all …]
/frameworks/base/services/robotests/backup/src/com/android/server/backup/keyvalue/
DKeyValueBackupTaskTest.java150 import java.nio.file.Files;
326 Files.write(getStateFile(mTransport, PM_PACKAGE), "pmState".getBytes()); in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
327 Files.write(getStateFile(mTransport, PACKAGE_1), "packageState".getBytes()); in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
331 assertThat(Files.readAllBytes(getStateFile(mTransport, PM_PACKAGE))) in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
333 assertThat(Files.readAllBytes(getStateFile(mTransport, PACKAGE_1))) in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
454 Files.write(getStateFile(mTransport, PACKAGE_1), "oldState".getBytes()); in testRunTask_whenPackageWithOldStateAndIncremental_passesOldStateToAgent()
467 Files.write(getStateFile(mTransport, PACKAGE_1), "oldState".getBytes()); in testRunTask_whenPackageWithOldStateAndNonIncremental_passesEmptyOldStateToAgent()
522 Files.write(getStateFile(mTransport, PACKAGE_2), "package2State".getBytes()); in testRunTask_whenOnePackageAndNoPmState_initializesTransportAndResetsState()
530 assertThat(Files.exists(getStateFile(mTransport, PACKAGE_2))).isFalse(); in testRunTask_whenOnePackageAndNoPmState_initializesTransportAndResetsState()
541 Files.write(getStateFile(mTransport, PACKAGE_2), "package2State".getBytes()); in testRunTask_whenOnePackageAndWithPmState_doesNotInitializeTransportOrResetState()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DFileUtilsTest.java26 import com.google.common.io.Files;
55 sTemporaryDir = Files.createTempDir(); in setUp()
/frameworks/base/services/core/java/com/android/server/testharness/
DTestHarnessModeService.java58 import java.nio.file.Files;
199 OutputStream fileOutputStream = Files.newOutputStream(adbKeys); in writeBytesToFile()
203 Set<PosixFilePermission> permissions = Files.getPosixFilePermissions(adbKeys); in writeBytesToFile()
205 Files.setPosixFilePermissions(adbKeys, permissions); in writeBytesToFile()
353 try (InputStream inputStream = Files.newInputStream(path)) { in getBytesFromFile()
354 int size = (int) Files.size(path); in getBytesFromFile()
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/create/
DMain.java34 import com.google.common.io.Files;
153 String extension = Files.getFileExtension(osDestJarFile.getName()); in createLayoutLib()
158 Files.getNameWithoutExtension(osDestJarFile.getName()) + "-stubs" + in createLayoutLib()
/frameworks/base/services/tests/servicestests/src/com/android/server/power/
DPreRebootLoggerTest.java34 import com.google.common.io.Files;
73 mDumpDir = Files.createTempDir(); in setup()
/frameworks/base/media/java/android/media/
DMediaScanner.java39 import android.provider.MediaStore.Files;
40 import android.provider.MediaStore.Files.FileColumns;
137 Files.FileColumns._ID, // 0
138 Files.FileColumns.DATA, // 1
139 Files.FileColumns.FORMAT, // 2
140 Files.FileColumns.DATE_MODIFIED, // 3
141 Files.FileColumns.MEDIA_TYPE, // 4
145 Files.FileColumns._ID,
454 mFilesUri = Files.getContentUri(volumeName); in MediaScanner()
1113 values.put(Files.FileColumns.FORMAT, format);
[all …]
/frameworks/base/core/java/com/android/internal/os/
DStoragedUidIoStatsReader.java28 import java.nio.file.Files;
79 try (BufferedReader reader = Files.newBufferedReader(file.toPath())) { in readAbsolute()
DProcTimeInStateReader.java25 import java.nio.file.Files;
163 byte[] timeInStateBytes = Files.readAllBytes(timeInStatePath); in initializeTimeInStateFormat()
/frameworks/base/services/core/java/com/android/server/security/
DVerityUtils.java36 import java.nio.file.Files;
70 if (Files.size(Paths.get(signaturePath)) > MAX_SIGNATURE_FILE_SIZE_BYTES) { in setUpFsverity()
73 byte[] pkcs7Signature = Files.readAllBytes(Paths.get(signaturePath)); in setUpFsverity()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskSnapshotLoader.java36 import java.nio.file.Files;
75 final byte[] bytes = Files.readAllBytes(protoFile.toPath()); in loadTask()
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFont_Builder_Delegate.java30 import java.nio.file.Files;
78 byte[] byteArray = Files.readAllBytes(new File(fullPath).toPath()); in nGetAssetBuffer()
/frameworks/base/core/tests/coretests/src/android/text/
DFontFallbackSetup.java36 import java.nio.file.Files;
68 Files.copy(is, outInCache.toPath(), StandardCopyOption.REPLACE_EXISTING); in FontFallbackSetup()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/metrics/
DPersistAtomsStorage.java30 import java.nio.file.Files;
132 Files.readAllBytes(mContext.getFileStreamPath(FILENAME).toPath())); in loadAtomsFromFile()
/frameworks/base/core/tests/coretests/src/android/content/pm/dex/
DDexMetadataHelperTest.java52 import java.nio.file.Files;
147 Files.createFile(invalidDmFile.toPath()); in testParsePackageWithDmFileInvalid()
163 Files.createFile(invalidDmFile.toPath()); in testParsePackageSplitsWithDmFileInvalid()
/frameworks/base/core/java/android/content/pm/dex/
DDexMetadataHelper.java30 import java.nio.file.Files;
123 if (Files.exists(Paths.get(dexMetadataPath))) { in buildPackageApkToDexMetadataMap()

1234