Pull files from the device cache after a MH test concludes.

PiperOrigin-RevId: 412251020
This commit is contained in:
samrobinson 2021-11-25 11:58:12 +00:00 committed by kim-vde
parent be0b2b8c8c
commit 3cc64ae2df

View file

@ -83,7 +83,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
Uri uri = Uri.parse(uriString); Uri uri = Uri.parse(uriString);
File externalCacheFile = createExternalCacheFile(context, /* filePrefix= */ testId); File externalCacheFile = createExternalCacheFile(context, /* filePrefix= */ testId);
try {
InstrumentationRegistry.getInstrumentation() InstrumentationRegistry.getInstrumentation()
.runOnMainSync( .runOnMainSync(
() -> { () -> {
@ -104,9 +103,6 @@ import org.checkerframework.checker.nullness.compatqual.NullableType;
} }
long outputSizeBytes = externalCacheFile.length(); long outputSizeBytes = externalCacheFile.length();
return new TransformationResult(outputSizeBytes); return new TransformationResult(outputSizeBytes);
} finally {
externalCacheFile.delete();
}
} }
private static File createExternalCacheFile(Context context, String filePrefix) private static File createExternalCacheFile(Context context, String filePrefix)