diff options
author | corysmith <corysmith@google.com> | 2018-07-31 08:06:59 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-31 08:09:28 -0700 |
commit | f2505e4acc48aeaf6bf60b731257e7eadd6580a8 (patch) | |
tree | 68ee62c47abd86364d83173fc5e4e24bef4df57c /src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java | |
parent | 83516bdda827c605eda91292ab4c2f8c5bce33f5 (diff) |
Add profiling data to the resources zip.
RELNOTES:None
PiperOrigin-RevId: 206762523
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java')
-rw-r--r-- | src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java b/src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java index 80ed2dc8ca..dd3cb099f3 100644 --- a/src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java +++ b/src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java @@ -77,8 +77,7 @@ public class ResourcesZip { * @param apkWithAssets The apk containing assets. * @param resourceIds Optional path to a file containing the resource ids. */ - public static ResourcesZip fromApk( - Path resourcesRoot, Path apkWithAssets, @Nullable Path resourceIds) { + public static ResourcesZip fromApk(Path resourcesRoot, Path apkWithAssets, Path resourceIds) { return new ResourcesZip( resourcesRoot, /* assetsRoot= */ null, @@ -157,13 +156,12 @@ public class ResourcesZip { Files.walkFileTree(assetsRoot, visitor); visitor.writeEntries(); } - - if (ids != null) { - try { + try { + if (ids != null) { zip.addEntry("ids.txt", Files.readAllBytes(ids), ZipEntry.STORED); - } catch (IOException e) { - throw new RuntimeException(e); } + } catch (IOException e) { + throw new RuntimeException(e); } } } |