Add profiler record for `aapt2 convert` This is to ensure that the timing for `convert` is recorded in the Aapt2ResourcePackagingAction stats. PiperOrigin-RevId: 930963805 Change-Id: I4dbb29505aec3758c8007c37f01b32b9113ac6c4
diff --git a/src/tools/java/com/google/devtools/build/android/aapt2/ResourceLinker.java b/src/tools/java/com/google/devtools/build/android/aapt2/ResourceLinker.java index 4d8ed13..01dda99 100644 --- a/src/tools/java/com/google/devtools/build/android/aapt2/ResourceLinker.java +++ b/src/tools/java/com/google/devtools/build/android/aapt2/ResourceLinker.java
@@ -736,6 +736,7 @@ /** Convert a proto apk to binary. */ public Path convertProtoApkToBinary(ProtoApk protoApk) { try { + profiler.startTask("convert"); final Path protoApkPath = protoApk.asApkPath(); final Path working = workingDirectory @@ -753,6 +754,7 @@ .add("-o", apk.toString()) .add(protoApk.asApkPath().toString()) .execute(String.format("Converting %s", protoApkPath))); + profiler.recordEndOf("convert"); return copyAndFixCompression(apk, working); } catch (IOException e) { throw new LinkError(e);