summaryrefslogtreecommitdiff
path: root/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java')
-rw-r--r--hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java27
1 files changed, 15 insertions, 12 deletions
diff --git a/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java b/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java
index bc6d64421be..8a0c53a4e2c 100644
--- a/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java
+++ b/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ScopedStorageDeviceTest.java
@@ -139,6 +139,7 @@ import android.os.storage.StorageManager;
import android.provider.DocumentsContract;
import android.provider.MediaStore;
import android.scopedstorage.cts.lib.RedactionTestHelper;
+import android.scopedstorage.cts.lib.ScopedStorageBaseDeviceTest;
import android.system.ErrnoException;
import android.system.Os;
import android.system.StructStat;
@@ -174,7 +175,9 @@ import java.util.HashMap;
import java.util.List;
/**
- * Device-side test suite to verify scoped storage business logic.
+ * We are in process of splitting CtsScopedStorageDeviceOnlyTest module into multiple ones.
+ * This is a temporary test class, and it will be deleted
+ * after all the links to new modules are created.
*/
@RunWith(Parameterized.class)
public class ScopedStorageDeviceTest extends ScopedStorageBaseDeviceTest {
@@ -182,7 +185,7 @@ public class ScopedStorageDeviceTest extends ScopedStorageBaseDeviceTest {
public static final byte[] BYTES_DATA1 = STR_DATA1.getBytes();
- static final String TAG = "ScopedStorageDeviceTest";
+ static final String TAG = "ScopedStorageDeviceTestCopy";
static final String THIS_PACKAGE_NAME = getContext().getPackageName();
/**
@@ -873,7 +876,7 @@ public class ScopedStorageDeviceTest extends ScopedStorageBaseDeviceTest {
try (InputStream in =
getContext().getResources().openRawResource(R.raw.img_with_metadata);
- FileOutputStream out = new FileOutputStream(jpgFile)) {
+ FileOutputStream out = new FileOutputStream(jpgFile)) {
// Dump the image we have to external storage
FileUtils.copy(in, out);
// Sync file to disk to ensure file is fully written to the lower fs attempting to
@@ -1211,9 +1214,9 @@ public class ScopedStorageDeviceTest extends ScopedStorageBaseDeviceTest {
File lowerCaseFile = new File(getDownloadDir(), "cache_consistency_for_case_insensitivity");
try (ParcelFileDescriptor upperCasePfd =
- ParcelFileDescriptor.open(upperCaseFile, MODE_READ_WRITE | MODE_CREATE);
+ ParcelFileDescriptor.open(upperCaseFile, MODE_READ_WRITE | MODE_CREATE);
ParcelFileDescriptor lowerCasePfd =
- ParcelFileDescriptor.open(lowerCaseFile, MODE_READ_WRITE | MODE_CREATE)) {
+ ParcelFileDescriptor.open(lowerCaseFile, MODE_READ_WRITE | MODE_CREATE)) {
assertRWR(upperCasePfd, lowerCasePfd);
assertRWR(lowerCasePfd, upperCasePfd);
@@ -1276,15 +1279,15 @@ public class ScopedStorageDeviceTest extends ScopedStorageBaseDeviceTest {
public void testReadStorageInvalidation() throws Exception {
if (SdkLevel.isAtLeastT()) {
testAppOpInvalidation(
- APP_C,
- new File(getDcimDir(), "read_storage.jpg"),
- Manifest.permission.READ_MEDIA_IMAGES,
- AppOpsManager.OPSTR_READ_MEDIA_IMAGES,
- /* forWrite */ false);
+ APP_C,
+ new File(getDcimDir(), "read_storage.jpg"),
+ Manifest.permission.READ_MEDIA_IMAGES,
+ AppOpsManager.OPSTR_READ_MEDIA_IMAGES,
+ /* forWrite */ false);
} else {
testAppOpInvalidation(APP_C, new File(getDcimDir(), "read_storage.jpg"),
- Manifest.permission.READ_EXTERNAL_STORAGE,
- AppOpsManager.OPSTR_READ_EXTERNAL_STORAGE, /* forWrite */ false);
+ Manifest.permission.READ_EXTERNAL_STORAGE,
+ AppOpsManager.OPSTR_READ_EXTERNAL_STORAGE, /* forWrite */ false);
}
}