From f2505e4acc48aeaf6bf60b731257e7eadd6580a8 Mon Sep 17 00:00:00 2001 From: corysmith Date: Tue, 31 Jul 2018 08:06:59 -0700 Subject: Add profiling data to the resources zip. RELNOTES:None PiperOrigin-RevId: 206762523 --- .../java/com/google/devtools/build/android/ResourcesZip.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/tools/android/java/com/google/devtools/build/android/ResourcesZip.java') 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); } } } -- cgit v1.2.3