Return the freed bytes from deleteOdex API
This will help quantify the number of bytes we free for
telemetry purposes.
Test: installd_tests
Bug: 187458876
Change-Id: I29f7974977a58decf784bda443715f8b11fdf7c1
diff --git a/cmds/installd/dexopt.h b/cmds/installd/dexopt.h
index cdeadf1..5a637b1 100644
--- a/cmds/installd/dexopt.h
+++ b/cmds/installd/dexopt.h
@@ -109,7 +109,8 @@
const std::string& code_path,
const std::optional<std::string>& dex_metadata);
-bool delete_odex(const char* apk_path, const char* instruction_set, const char* output_path);
+// Returns the total bytes that were freed, or -1 in case of errors.
+int64_t delete_odex(const char* apk_path, const char* instruction_set, const char* output_path);
bool reconcile_secondary_dex_file(const std::string& dex_path,
const std::string& pkgname, int uid, const std::vector<std::string>& isas,