Home
last modified time | relevance | path

Searched refs:Files (Results 1 – 25 of 95) 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()
/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/opt/gamesdk/src/tuningfork/tools/validation/src/test/java/com/google/tuningfork/validation/
DExternalProtoCompilerTest.java25 import com.google.common.io.Files;
89 FileDescriptorSet fileSet = FileDescriptorSet.parseFrom(Files.toByteArray(outFile)); in compareDescriptors()
149 byte[] error = Files.toByteArray(errorFile.get()); in encodeAndDecode()
160 String originalMessage = Files.asCharSource(originalTextFile, UTF_8).read(); in encodeAndDecode()
161 String decodedMessage = Files.asCharSource(decodedTextFile, UTF_8).read(); in encodeAndDecode()
162 error = Files.toByteArray(errorFile.get()); in encodeAndDecode()
DTestdataHelper.java23 import com.google.common.io.Files;
44 Files.asCharSink(file, UTF_8).write(content); in createFile()
53 Files.asCharSink(file, UTF_8).write(content); in getFile()
DDeveloperTuningforkParserTest.java21 import com.google.common.io.Files;
100 ByteString settingsBinary = ByteString.copyFrom(Files.toByteArray(settingsFile)); in checkSettings()
125 ByteString devFidelityBinary = ByteString.copyFrom(Files.toByteArray(devFidelityFile)); in checkFidelityParameters()
/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.java34 import android.provider.MediaStore.Files;
96 private static final String PATH_WHERE = Files.FileColumns.DATA + "=?";
97 private static final String[] ID_PROJECTION = new String[] {Files.FileColumns._ID};
98 private static final String[] PATH_PROJECTION = new String[] {Files.FileColumns.DATA};
234 return MediaStore.Files.getContentUri(volumeName); in getObjectPropertiesUri()
573 values.put(Files.FileColumns.DATA, newPath.toString()); in renameFile()
578 final Uri objectsUri = MediaStore.Files.getMtpObjectsUri(obj.getVolumeName()); in renameFile()
634 values.put(Files.FileColumns.DATA, path.toString()); in endMoveObject()
636 values.put(Files.FileColumns.PARENT, 0); in endMoveObject()
640 values.put(Files.FileColumns.PARENT, parentId); in endMoveObject()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DFileUtilsTest.java26 import com.google.common.io.Files;
46 sTemporaryDir = Files.createTempDir(); in setUpClass()
/frameworks/base/tests/FlickerTests/lib/src/com/android/server/wm/flicker/monitor/
DScreenRecorder.java27 import java.nio.file.Files;
72 return Files.move(DEFAULT_OUTPUT_PATH, getPath(testTag), in save()
/frameworks/opt/gamesdk/src/tuningfork/tools/validation/src/main/java/com/google/tuningfork/validation/
DDeveloperTuningforkParser.java23 import com.google.common.io.Files;
113 Files.write(settings.toByteArray(), outFile); in saveBinarySettings()
160 content = ByteString.copyFrom(Files.toByteArray(binaryFile)); in encodeBinaryAndValidateDevFidelity()
184 String content = Files.asCharSource(file, UTF_8).read(); in findTuningforkSettings()
/frameworks/opt/gamesdk/samples/unitypackaging/
D.gitignore11 # Files for the ART/Dalvik VM
36 # Log Files
105 # Package Files #
/frameworks/opt/gamesdk/samples/unitypackaging/app/
D.gitignore11 # Files for the ART/Dalvik VM
36 # Log Files
105 # Package Files #
/frameworks/base/services/robotests/backup/src/com/android/server/backup/keyvalue/
DKeyValueBackupTaskTest.java151 import java.nio.file.Files;
327 Files.write(getStateFile(mTransport, PM_PACKAGE), "pmState".getBytes()); in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
328 Files.write(getStateFile(mTransport, PACKAGE_1), "packageState".getBytes()); in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
332 assertThat(Files.readAllBytes(getStateFile(mTransport, PM_PACKAGE))) in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
334 assertThat(Files.readAllBytes(getStateFile(mTransport, PACKAGE_1))) in testRunTask_whenQueueEmpty_doesNotChangeStateFiles()
455 Files.write(getStateFile(mTransport, PACKAGE_1), "oldState".getBytes()); in testRunTask_whenPackageWithOldStateAndIncremental_passesOldStateToAgent()
468 Files.write(getStateFile(mTransport, PACKAGE_1), "oldState".getBytes()); in testRunTask_whenPackageWithOldStateAndNonIncremental_passesEmptyOldStateToAgent()
523 Files.write(getStateFile(mTransport, PACKAGE_2), "package2State".getBytes()); in testRunTask_whenOnePackageAndNoPmState_initializesTransportAndResetsState()
531 assertThat(Files.exists(getStateFile(mTransport, PACKAGE_2))).isFalse(); in testRunTask_whenOnePackageAndNoPmState_initializesTransportAndResetsState()
542 Files.write(getStateFile(mTransport, PACKAGE_2), "package2State".getBytes()); in testRunTask_whenOnePackageAndWithPmState_doesNotInitializeTransportOrResetState()
[all …]
/frameworks/base/tests/FlickerTests/lib/test/src/com/android/server/wm/flicker/monitor/
DLayersTraceMonitorTest.java26 import com.google.common.io.Files;
72 byte[] trace = Files.toByteArray(testFile); in captureLayersTrace()
DWindowManagerTraceMonitorTest.java26 import com.google.common.io.Files;
72 byte[] trace = Files.toByteArray(testFile); in captureWindowTrace()
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/create/
DMain.java34 import com.google.common.io.Files;
151 String extension = Files.getFileExtension(osDestJarFile.getName()); in createLayoutLib()
156 Files.getNameWithoutExtension(osDestJarFile.getName()) + "-stubs" + in createLayoutLib()
/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/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/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()

1234