Home
last modified time | relevance | path

Searched refs:file (Results 1 – 25 of 3471) sorted by relevance

12345678910>>...139

/cts/hostsidetests/appsecurity/
DOWNERS3 per-file AccessSerialNumberTest.java = moltmann@google.com
4 per-file AdoptableFeatureConsistentTest.java = jsharkey@google.com
5 per-file AdoptableHostTest.java = jsharkey@google.com
6 per-file ApexSignatureVerificationTest.java = dariofreni@google.com
7 per-file ApplicationVisibilityTest.java = toddke@google.com
8 per-file AppDataIsolationTests.java = rickywai@google.com
9 per-file AppOpsTest.java = moltmann@google.com
10 per-file AppSecurityTests.java = cbrubaker@google.com
11 per-file AuthBoundKeyTest.java = cbrubaker@google.com
12 per-file BaseInstallMultiple.java = toddke@google.com
[all …]
/cts/tools/release-parser/tests/
Dgenerate_golden_sample_files.sh15 for file in $TargetFiles; do
16 echo Processing $file
17 …se-parser.jar com.android.cts.releaseparser.ApkParser -i resources/$file -of resources/$file.pb.txt
21 for file in $TargetFiles; do
22 echo Processing $file
23 …parser.jar com.android.cts.releaseparser.SoParser -i resources/$file -pi -of resources/$file.pb.txt
27 for file in $TargetFiles; do
28 echo Processing $file
29 …ase-parser.jar com.android.cts.releaseparser.SoParser -i resources/$file -of resources/$file.pb.txt
33 for file in $TargetFiles; do
[all …]
/cts/hostsidetests/backup/includeexcludeapp/src/android/cts/backup/includeexcludeapp/
DIncludeExcludeTest.java182 for (File file : mIncludeFiles) { in generateFiles()
183 addData(file); in generateFiles()
185 for (File file : mExcludeFiles) { in generateFiles()
186 addData(file); in generateFiles()
188 for (File file : mRequireFakeClientSideEncryptionFiles) { in generateFiles()
189 addData(file); in generateFiles()
197 for (File file : mIncludeFiles) { in deleteAllFiles()
198 file.delete(); in deleteAllFiles()
200 for (File file : mExcludeFiles) { in deleteAllFiles()
201 file.delete(); in deleteAllFiles()
[all …]
/cts/tools/cfassembler/src/dxconvext/util/
DFileUtils.java42 File file = new File(fileName); in readFile() local
43 return readFile(file); in readFile()
53 public static byte[] readFile(File file) { in readFile() argument
54 if (!file.exists()) { in readFile()
55 throw new RuntimeException(file + ": file not found"); in readFile()
58 if (!file.isFile()) { in readFile()
59 throw new RuntimeException(file + ": not a file"); in readFile()
62 if (!file.canRead()) { in readFile()
63 throw new RuntimeException(file + ": file not readable"); in readFile()
66 long longLength = file.length(); in readFile()
[all …]
/cts/tests/tests/database/src/android/database/cts/
DSQLiteCantOpenDatabaseExceptionTest.java39 private void callWithExceptedMessage(File file, String expectedMessagePatter) { in callWithExceptedMessage() argument
41 SQLiteDatabase.openDatabase(file, new OpenParams.Builder().build()); in callWithExceptedMessage()
55 final File file = getDatabaseFile("nonexisitentdir/mydb.db"); in testDirectoryDoesNotExist() local
57 callWithExceptedMessage(file, ".*: Directory .* doesn't exist"); in testDirectoryDoesNotExist()
62 final File file = getDatabaseFile("mydb.db"); in testFileDoesNotExist() local
64 callWithExceptedMessage(file, ".*: File .* doesn't exist"); in testFileDoesNotExist()
69 final File file = getDatabaseFile("mydb.db"); in testFileNotReadable() local
71 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(file, null); in testFileNotReadable()
74 file.setReadable(false); in testFileNotReadable()
76 callWithExceptedMessage(file, ".*: File .* not readable"); in testFileNotReadable()
[all …]
/cts/tools/release-parser/src/com/android/cts/releaseparser/
DFileParser.java61 public static FileParser getParser(File file) { in getParser() argument
62 String fName = file.getName(); in getParser()
64 if (isSymbolicLink(file)) { in getParser()
65 return new SymbolicLinkParser(file); in getParser()
67 return new ApkParser(file); in getParser()
69 return new TestModuleConfigParser(file); in getParser()
71 return new TestSuiteTradefedParser(file); in getParser()
74 return new JarParser(file); in getParser()
76 return new SoParser(file); in getParser()
78 return new ArtParser(file); in getParser()
[all …]
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DIconTest.java94 File file = new File(mActivity.getFilesDir(), "testimage.jpg"); in testFileIcon() local
96 writeSampleImage(file); in testFileIcon()
97 assertTrue(file.exists()); in testFileIcon()
99 verifyIconValidity(Icon.createWithFilePath(file.getPath())); in testFileIcon()
101 verifyIconValidity(Icon.createWithContentUri(Uri.fromFile(file))); in testFileIcon()
103 verifyIconValidity(Icon.createWithContentUri(file.toURI().toString())); in testFileIcon()
105 file.delete(); in testFileIcon()
111 File file = new File(mActivity.getFilesDir(), "testimage.jpg"); in testAdaptiveFileIcon() local
113 writeSampleImage(file); in testAdaptiveFileIcon()
114 assertTrue(file.exists()); in testAdaptiveFileIcon()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DFileAccessPermissionTest.java55 File file = new File("/system"); in testSystemDirAccess() local
56 assertTrue(file.canRead()); in testSystemDirAccess()
57 assertFalse(file.canWrite()); in testSystemDirAccess()
59 File fakeSystemFile = new File(file, "test"); in testSystemDirAccess()
68 file = new File("/system/app"); in testSystemDirAccess()
69 assertTrue(file.canRead()); in testSystemDirAccess()
70 assertFalse(file.canWrite()); in testSystemDirAccess()
73 File[] allFiles = file.listFiles(); in testSystemDirAccess()
84 File file = new File("/system/app"); in testApksAlwaysReadable() local
87 File[] apkFiles = file.listFiles(new FilenameFilter() { in testApksAlwaysReadable()
[all …]
/cts/tests/tests/permission/
DOWNERS3 per-file PowerManagerServicePermissionTest.java = dehboxturtle@google.com
4 per-file RequestLocation.java = hallliu@google.com
5 per-file NoAudioPermissionTest.java = elaurent@google.com
6 per-file MainlineNetworkStackPermissionTest.java = file: platform/frameworks/base:/services/net/OWN…
7 per-file Camera2PermissionTest.java = file: platform/frameworks/av:/camera/OWNERS
8 per-file OneTimePermissionTest.java, AppThatRequestOneTimePermission/... = evanseverson@google.com
9 per-file LocationAccessCheckTest.java = ntmyren@google.com
/cts/tests/tests/media/src/android/media/cts/
DThumbnailUtilsTest.java100 final File file = stageFile(R.raw.testmp3, new File(mDir, "cts.mp3")); in testCreateAudioThumbnail() local
102 assertSaneThumbnail(size, ThumbnailUtils.createAudioThumbnail(file, size, null)); in testCreateAudioThumbnail()
108 final File file = stageFile(R.raw.monotestmp3, new File(mDir, "audio.mp3")); in testCreateAudioThumbnail_SeparateFile() local
112 assertSaneThumbnail(size, ThumbnailUtils.createAudioThumbnail(file, size, null)); in testCreateAudioThumbnail_SeparateFile()
118 final File file = stageFile(R.raw.monotestmp3, new File(mDir, "cts.mp3")); in testCreateAudioThumbnail_None() local
120 ThumbnailUtils.createAudioThumbnail(file, TEST_SIZES[0], null); in testCreateAudioThumbnail_None()
128 final File file = stageFile(R.raw.volantis, new File(mDir, "cts.jpg")); in testCreateImageThumbnail() local
130 assertSaneThumbnail(size, ThumbnailUtils.createImageThumbnail(file, size, null)); in testCreateImageThumbnail()
146 final File file = stageFile(resId, new File(mDir, "cts.jpg")); in testCreateImageThumbnail_sampleWithThumbnail() local
147 final Bitmap bitmap = ThumbnailUtils.createImageThumbnail(file, TEST_SIZES[0], null); in testCreateImageThumbnail_sampleWithThumbnail()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/
Dpoc.c41 EAS_FILE file; in PlayFile() local
42 file.handle = (void*) fopen(filename, "rb"); in PlayFile()
43 file.readAt = EAS_fread; in PlayFile()
44 file.size = EAS_fsize; in PlayFile()
46 if (EAS_OpenFile(easData, &file, &handle) != EAS_SUCCESS) { in PlayFile()
48 if(file.handle) { in PlayFile()
49 fclose(file.handle); in PlayFile()
56 if(file.handle) { in PlayFile()
57 fclose(file.handle); in PlayFile()
/cts/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/src/com/android/cts/multiuserstorageapp/
DMultiUserStorageTest.java56 for (File file : files) { in wipeTestFiles()
57 if (file.getName().startsWith(FILE_PREFIX)) { in wipeTestFiles()
58 Log.d(TAG, "Wiping " + file); in wipeTestFiles()
59 file.delete(); in wipeTestFiles()
175 private File buildApiObbPath(String file) { in buildApiObbPath() argument
176 return new File(getContext().getObbDir(), file); in buildApiObbPath()
179 private File buildEnvObbPath(String file) { in buildEnvObbPath() argument
180 return new File(new File(System.getenv("EXTERNAL_STORAGE"), "Android/obb"), file); in buildEnvObbPath()
183 private File buildRawObbPath(String file) { in buildRawObbPath() argument
184 return new File("/sdcard/Android/obb/", file); in buildRawObbPath()
[all …]
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DOutOfProcessActivity.java34 import java.nio.file.Files;
35 import java.nio.file.Paths;
36 import java.nio.file.StandardOpenOption;
139 final File file = getStoppedMarker(context); in waitActivityStopped()
140 return file.exists() ? file : null; in waitActivityStopped()
146 final File file = getStartedMarker(context); in waitActivityStarted()
147 return file.exists() ? file : null; in waitActivityStarted()
162 private void write(@NonNull File file, @NonNull String string) {
163 Log.d(TAG, "writing '" + string + "' to " + file);
165 Files.write(Paths.get(file.getAbsolutePath()), string.getBytes(),
[all …]
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontTest.java65 final File file = new File(ctx.getCacheDir(), prefix + i); in getTempFile() local
67 if (file.createNewFile()) { in getTempFile()
68 return file; in getTempFile()
78 File file = getTempFile(); in mmap() local
80 if (!copyToFile(file, is)) { in mmap()
83 return mmap(file); in mmap()
88 file.delete(); in mmap()
92 private static ByteBuffer mmap(File file) { in mmap() argument
93 try (FileInputStream fis = new FileInputStream(file)) { in mmap()
101 private static boolean copyToFile(File file, InputStream is) { in copyToFile() argument
[all …]
/cts/suite/audio_quality/lib/src/audio/
DBuffer.cpp91 std::ifstream file(filename.string(), std::ios::in | std::ios::binary | in loadFromFile() local
93 if (!file.is_open()) { in loadFromFile()
97 size_t size = file.tellg(); in loadFromFile()
102 file.seekg(0, std::ios::beg); in loadFromFile()
103 file.read(buffer->mData, size); //TODO handle read error in loadFromFile()
104 file.close(); in loadFromFile()
116 std::ofstream file(filenameWithExtension.string(), std::ios::out | std::ios::binary | in saveToFile() local
118 if (!file.is_open()) { in saveToFile()
123 file.write(mData, mSize); in saveToFile()
125 if (file.rdstate() != std::ios_base::goodbit) { in saveToFile()
[all …]
/cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/
DTestSuiteContentReport.java33 import java.nio.file.Path;
34 import java.nio.file.Paths;
125 private static FileMetadata parseFileMetadata(Entry.Builder fEntry, File file) in parseFileMetadata() argument
127 if (file.getName().endsWith(CONFIG_EXT_TAG)) { in parseFileMetadata()
129 return parseConfigFile(file); in parseFileMetadata()
130 } else if (file.getName().endsWith(APK_EXT_TAG)) { in parseFileMetadata()
132 } else if (file.getName().endsWith(JAR_EXT_TAG)) { in parseFileMetadata()
134 } else if (file.getName().endsWith(SO_EXT_TAG)) { in parseFileMetadata()
143 private static FileMetadata parseConfigFile(File file) in parseConfigFile() argument
146 TestModuleConfigHandler testModuleXmlHandler = new TestModuleConfigHandler(file.getName()); in parseConfigFile()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/media/
DMediaStoreTrashedTest.java80 final File file = ProviderTestUtils.stageFile(R.drawable.scenery, in testOwned() local
82 final Uri uri = ProviderTestUtils.scanFile(file); in testOwned()
85 doTrashed(file, uri); in testOwned()
96 final File file = ProviderTestUtils.stageFile(R.drawable.scenery, in testUnowned() local
98 final Uri uri = ProviderTestUtils.scanFile(file); in testUnowned()
101 doTrashed(file, uri); in testUnowned()
112 final File file = ProviderTestUtils.stageFile(R.drawable.scenery, in testAtypical() local
114 final Uri uri = ProviderTestUtils.scanFile(file); in testAtypical()
117 doTrashed(file, uri); in testAtypical()
120 private void doTrashed(File file, Uri uri) { in doTrashed() argument
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/
Dpoc.cpp112 std::ifstream file; in main() local
113 file.open(argv[1], std::ios::in | std::ios::binary); in main()
114 if (!file.is_open()) { in main()
117 file.ignore(std::numeric_limits<std::streamsize>::max()); in main()
118 std::streamsize length = file.gcount(); in main()
119 file.clear(); in main()
120 file.seekg(0, std::ios_base::beg); in main()
122 file.read(reinterpret_cast<char *>(data), length); in main()
123 file.close(); in main()
/cts/hostsidetests/appsecurity/test-apps/StorageApp/src/com/android/cts/storageapp/
DUtils.java103 public static File useWrite(File file, long size) throws Exception { in useWrite() argument
104 try (FileOutputStream os = new FileOutputStream(file)) { in useWrite()
111 return file; in useWrite()
114 public static File useFallocate(File file, long length, long time) throws Exception { in useFallocate() argument
115 final File res = useFallocate(file, length); in useFallocate()
116 file.setLastModified(time); in useFallocate()
120 public static File useFallocate(File file, long length) throws Exception { in useFallocate() argument
121 final FileDescriptor fd = Os.open(file.getAbsolutePath(), in useFallocate()
128 return file; in useFallocate()
172 for (File file : files) { in deleteContents()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java71 import java.nio.file.Files;
210 public static File waitUntilExists(File file) throws IOException { in waitUntilExists() argument
212 return IO_TIMEOUT.run("file '" + file + "' doesn't exist yet", () -> { in waitUntilExists()
213 return file.exists() ? file : null; // will retry if it returns null in waitUntilExists()
250 public static File stageFile(int resId, File file) throws IOException { in stageFile() argument
256 FileUtils.contains(Environment.getStorageDirectory(), file)) { in stageFile()
257 executeShellCommand("mkdir -p " + file.getParent()); in stageFile()
258 waitUntilExists(file.getParentFile()); in stageFile()
267 file.createNewFile(); in stageFile()
274 source.getAbsolutePath(), skip, count, file.getAbsolutePath())); in stageFile()
[all …]
/cts/tests/tests/net/src/android/net/cts/
DVpnServiceTest.java116 File file = new File("/dev/tun"); in testTunDevice() local
117 assertTrue(file.exists()); in testTunDevice()
118 assertFalse(file.isFile()); in testTunDevice()
119 assertFalse(file.isDirectory()); in testTunDevice()
120 assertFalse(file.canExecute()); in testTunDevice()
121 assertFalse(file.canRead()); in testTunDevice()
122 assertFalse(file.canWrite()); in testTunDevice()
/cts/hostsidetests/theme/app/src/android/theme/app/
DThemeTestUtils.java34 public static boolean compressDirectory(File dir, File file) throws IOException { in compressDirectory() argument
35 if (dir == null || !dir.exists() || file == null || file.exists()) { in compressDirectory()
44 final ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(file)); in compressDirectory()
74 for (File file : files) { in deleteDirectory()
75 deleteDirectory(file); in deleteDirectory()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java270 public static boolean openFileAs(TestApp testApp, File file, boolean forWrite) in openFileAs() argument
272 return openFileAs(testApp, file.getAbsolutePath(), forWrite); in openFileAs()
367 public static Uri insertFileUsingDataColumn(@NonNull File file) { in insertFileUsingDataColumn() argument
369 values.put(MediaStore.MediaColumns.DATA, file.getPath()); in insertFileUsingDataColumn()
399 public static Uri getFileUri(@NonNull File file) { in getFileUri() argument
401 final int id = getFileRowIdFromDatabase(file); in getFileUri()
409 public static int getFileRowIdFromDatabase(@NonNull File file) { in getFileRowIdFromDatabase() argument
411 try (Cursor c = queryFile(file, MediaStore.MediaColumns._ID)) { in getFileRowIdFromDatabase()
424 public static String getFileOwnerPackageFromDatabase(@NonNull File file) { in getFileOwnerPackageFromDatabase() argument
426 try (Cursor c = queryFile(file, MediaStore.MediaColumns.OWNER_PACKAGE_NAME)) { in getFileOwnerPackageFromDatabase()
[all …]
/cts/hostsidetests/scopedstorage/ScopedStorageTestHelper/src/android/scopedstorage/cts/
DScopedStorageTestHelper.java162 final File file = new File(filePath); in accessFile() local
165 returnStatus = file.exists() && file.canRead() && file.canWrite(); in accessFile()
167 maybeCreateParentDirInAndroid(file); in accessFile()
168 returnStatus = file.createNewFile(); in accessFile()
170 returnStatus = file.delete(); in accessFile()
172 returnStatus = canOpen(file, false /* forWrite */); in accessFile()
174 returnStatus = canOpen(file, true /* forWrite */); in accessFile()
177 returnStatus = file.setLastModified(newTimeMillis); in accessFile()
187 private void maybeCreateParentDirInAndroid(File file) { in maybeCreateParentDirInAndroid() argument
188 final String ownedPathType = getOwnedDirectoryType(file); in maybeCreateParentDirInAndroid()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapDumper.java53 for (File file : toRemove) { in initialize()
54 deleteContentsAndDir(file); in initialize()
71 for (File file : files) { in deleteContents()
72 if (file.isDirectory()) { in deleteContents()
73 success &= deleteContents(file); in deleteContents()
75 if (!file.delete()) { in deleteContents()
76 Log.w(TAG, "Failed to delete " + file); in deleteContents()
150 private static void saveBitmap(Bitmap bitmap, File file) { in saveBitmap() argument
156 logIfBitmapSolidColor(file.getName(), bitmap); in saveBitmap()
158 try (FileOutputStream fileStream = new FileOutputStream(file)) { in saveBitmap()

12345678910>>...139