/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | DrawableTest.java | 153 File imageFile = new File(mContext.getFilesDir(), "tempimage.jpg"); in testCreateFromPath() local 154 assertTrue(imageFile.createNewFile()); in testCreateFromPath() 155 assertTrue(imageFile.exists()); in testCreateFromPath() 156 writeSampleImage(imageFile); in testCreateFromPath() 158 final String path = imageFile.getPath(); in testCreateFromPath() 161 assertTrue(imageFile.delete()); in testCreateFromPath() 175 File imageFile = new File(mContext.getFilesDir(), "tempimage.jpg"); in testCreateFromIncomplete() local 176 assertTrue(imageFile.createNewFile()); in testCreateFromIncomplete() 177 assertTrue(imageFile.exists()); in testCreateFromIncomplete() 178 try (OutputStream target = new FileOutputStream(imageFile)) { in testCreateFromIncomplete() [all …]
|
/cts/tests/tests/media/misc/src/android/media/misc/cts/ |
D | ExifInterfaceTest.java | 426 File imageFile = new File(mInpPrefix, fileName); in readFromStandaloneDataWithExif() local 427 String verboseTag = imageFile.getName(); in readFromStandaloneDataWithExif() 429 FileInputStream fis = new FileInputStream(imageFile); in readFromStandaloneDataWithExif() 445 File imageFile = new File(mInpPrefix, fileName); in testExifInterfaceCommon() local 447 String verboseTag = imageFile.getName(); in testExifInterfaceCommon() 450 ExifInterface exifInterface = new ExifInterface(imageFile.getAbsolutePath()); in testExifInterfaceCommon() 455 exifInterface = new ExifInterface(imageFile); in testExifInterfaceCommon() 461 in = new BufferedInputStream(new FileInputStream(imageFile.getAbsolutePath())); in testExifInterfaceCommon() 471 fd = Os.open(imageFile.getAbsolutePath(), OsConstants.O_RDONLY, 0600); in testExifInterfaceCommon() 484 File imageFile = new File(mInpPrefix, fileName); in testExifInterfaceRange() local [all …]
|
D | HeifWriterTest.java | 160 File imageFile = new File(imageFilePath); in tearDown() local 161 if (imageFile.exists()) { in tearDown() 162 imageFile.delete(); in tearDown()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-21144/src/android/security/cts/CVE_2023_21144/ |
D | DeviceTest.java | 163 File imageFile = getImageFile(context); in withTemporaryImage() local 164 imageFile.createNewFile(); in withTemporaryImage() 165 FileOutputStream fileOutputStream = new FileOutputStream(imageFile); in withTemporaryImage() 184 File imageFile = getImageFile(context); in withTemporaryImage() 185 if (imageFile.exists()) { in withTemporaryImage() 186 imageFile.delete(); in withTemporaryImage() 195 context.getString(R.string.imageFile)); in getImageFile()
|
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ |
D | OwnedFilesRule.java | 70 public Uri createFile(int resourceId, File imageFile) throws IOException { in createFile() argument 71 assertThat(imageFile.createNewFile()).isTrue(); in createFile() 72 Uri uri = MediaStore.scanFile(mContentResolver, imageFile); in createFile() 73 createContentFromResource(resourceId, imageFile); in createFile()
|
D | OtherAppFilesRule.java | 177 protected static void modifyReadAccess(File imageFile, 179 final String pickerUri1 = buildPhotopickerUriWithStringEscaping(imageFile); 196 private static String buildPhotopickerUriWithStringEscaping(File imageFile) { 204 final Uri originalUri = MediaStore.scanFile(getContentResolver(), imageFile);
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/ |
D | ByodPresentMediaDialog.java | 137 File imageFile = (File) getArguments().getSerializable(KEY_IMAGE_FILE); in onCreateDialog() local 144 int orientationInDegree = getOrientationInDegreeFromImage(imageFile); in onCreateDialog() 146 input = new FileInputStream(imageFile); in onCreateDialog() 160 input = new FileInputStream(imageFile); in onCreateDialog() 214 private static int getOrientationInDegreeFromImage(File imageFile) throws IOException { in getOrientationInDegreeFromImage() argument 215 ExifInterface exifInterface = new ExifInterface(imageFile.getAbsolutePath()); in getOrientationInDegreeFromImage()
|
/cts/tests/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/ |
D | VirtualCameraCameraXTest.kt | 165 val imageFile = takeAndSavePicture(cameraSelector, imageCapture) in <lambda>() constant 166 assertThat(imageFile.exists()).isTrue() in <lambda>() 167 val bitmap = BitmapFactory.decodeFile(imageFile.path) in <lambda>() 215 val imageFile = File( in <lambda>() constant 229 OutputFileOptions.Builder(imageFile).build(), in <lambda>() 245 return imageFile in <lambda>()
|
D | VirtualCameraUtils.java | 240 File imageFile = new File(dir, imageName + ".png"); in writeImageToDisk() local 242 Log.i(TAG, "Saving image to disk at " + imageFile.getAbsolutePath()); in writeImageToDisk() 243 bitmap.compress(Bitmap.CompressFormat.PNG, 80, new FileOutputStream(imageFile)); in writeImageToDisk()
|
/cts/hostsidetests/scopedstorage/general/src/android/scopedstorage/cts/general/ |
D | ScopedStorageDeviceTest.java | 509 final File imageFile = new File(getDcimDir(), IMAGE_FILE_NAME); in testContributeMediaFile() local 512 assertThat(imageFile.createNewFile()).isTrue(); in testContributeMediaFile() 515 assertThat(getFileOwnerPackageFromDatabase(imageFile)).isEqualTo(THIS_PACKAGE_NAME); in testContributeMediaFile() 518 try (FileOutputStream fos = new FileOutputStream(imageFile)) { in testContributeMediaFile() 524 assertFileContent(imageFile, expected); in testContributeMediaFile() 528 assertThat(MediaStore.scanFile(getContentResolver(), imageFile)).isNotNull(); in testContributeMediaFile() 531 assertThat(getFileSizeFromDatabase(imageFile)).isEqualTo( in testContributeMediaFile() 534 imageFile.delete(); in testContributeMediaFile() 537 assertThat(getFileRowIdFromDatabase(imageFile)).isEqualTo(-1); in testContributeMediaFile() 1592 final File imageFile = new File(getPicturesDir(), IMAGE_FILE_NAME); in testSystemGalleryCanRenameImagesAndVideos() local [all …]
|
/cts/hostsidetests/scopedstorage/legacy/src/android/scopedstorage/cts/legacy/ |
D | LegacyStorageTest.java | 658 final File imageFile = new File(TestUtils.getDcimDir(), IMAGE_FILE_NAME); in testRenameDoesntInvalidateUri_hasRW() local 663 assertThat(imageFile.createNewFile()).isTrue(); in testRenameDoesntInvalidateUri_hasRW() 664 try (final FileOutputStream fos = new FileOutputStream(imageFile)) { in testRenameDoesntInvalidateUri_hasRW() 668 final Uri uri = TestUtils.insertFileUsingDataColumn(imageFile); in testRenameDoesntInvalidateUri_hasRW() 671 Files.copy(imageFile, temporaryImageFile); in testRenameDoesntInvalidateUri_hasRW() 676 assertThat(imageFile.delete()).isTrue(); in testRenameDoesntInvalidateUri_hasRW() 677 temporaryImageFile.renameTo(imageFile); in testRenameDoesntInvalidateUri_hasRW() 680 final Uri scannedUri = MediaStore.scanFile(cr, imageFile); in testRenameDoesntInvalidateUri_hasRW() 684 assertFileContent(imageFile, expected); in testRenameDoesntInvalidateUri_hasRW() 686 imageFile.delete(); in testRenameDoesntInvalidateUri_hasRW() [all …]
|
/cts/hostsidetests/scopedstorage/src/android/scopedstorage/cts/ |
D | ScopedStorageTest.java | 1071 final File imageFile = new File(getPicturesDir(), IMAGE_FILE_NAME); in testRenameFromShell() local 1077 assertTrue(imageFile.createNewFile()); in testRenameFromShell() 1078 assertThat(getFileRowIdFromDatabase(imageFile)).isNotEqualTo(-1); in testRenameFromShell() 1084 imageFile.getAbsolutePath(), renamedImageFile.getAbsolutePath()); in testRenameFromShell() 1086 assertFalse(imageFile.exists()); in testRenameFromShell() 1087 assertThat(getFileRowIdFromDatabase(imageFile)).isEqualTo(-1); in testRenameFromShell() 1101 imageFile.delete(); in testRenameFromShell()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/its/ |
D | ItsTestActivity.java | 1202 File imageFile = new File(imageDir, "ITS_JCA_" + timestamp + ".jpg"); in doJcaCapture() local 1203 Logt.i(TAG, "file path: " + imageFile.toString()); in doJcaCapture() 1204 mJcaCapturePath = imageFile.toString(); in doJcaCapture() 1208 imageFile); in doJcaCapture()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | RemoteViewsTest.java | 368 File imageFile = new File(path); in testSetImageViewUri() local 371 createSampleImage(imageFile, R.raw.testimage); in testSetImageViewUri() 385 imageFile.delete(); in testSetImageViewUri()
|