Loading tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ public class SystemPreparer extends ExternalResource { private File copyResourceToTemp(String resourcePath) throws IOException { final File tempFile = mHostTempFolder.newFile(); final ClassLoader classLoader = getClass().getClassLoader(); try (InputStream assetIs = classLoader.getResource(resourcePath).openStream(); try (InputStream assetIs = classLoader.getResourceAsStream(resourcePath); FileOutputStream assetOs = new FileOutputStream(tempFile)) { if (assetIs == null) { throw new IllegalStateException("Failed to find resource " + resourcePath); Loading Loading
tests/utils/hostutils/src/com/android/internal/util/test/SystemPreparer.java +1 −1 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ public class SystemPreparer extends ExternalResource { private File copyResourceToTemp(String resourcePath) throws IOException { final File tempFile = mHostTempFolder.newFile(); final ClassLoader classLoader = getClass().getClassLoader(); try (InputStream assetIs = classLoader.getResource(resourcePath).openStream(); try (InputStream assetIs = classLoader.getResourceAsStream(resourcePath); FileOutputStream assetOs = new FileOutputStream(tempFile)) { if (assetIs == null) { throw new IllegalStateException("Failed to find resource " + resourcePath); Loading