diff options
Diffstat (limited to 'hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java')
-rw-r--r-- | hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java index 753977b19a3..be8b785a65c 100644 --- a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java +++ b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/CommonExternalStorageTest.java @@ -169,13 +169,11 @@ public class CommonExternalStorageTest extends AndroidTestCase { public static List<File> getAllPackageSpecificObbGiftPaths(Context context, String targetPackageName) { - final File[] files = context.getObbDirs(); final List<File> targetFiles = new ArrayList<>(); - for (File file : files) { - final File targetFile = new File( - file.getAbsolutePath().replace(context.getPackageName(), targetPackageName)); - targetFiles.add(new File(targetFile, targetPackageName + ".gift")); - } + final File obbDir = context.getObbDir(); + final File targetObbDir = new File( + obbDir.getAbsolutePath().replace(context.getPackageName(), targetPackageName)); + targetFiles.add(new File(targetObbDir, targetPackageName + ".gift")); return targetFiles; } |