add IInstalld.controlDexOptBlocking call
- This allows cancelling pending dexoptimization by killng the currently
running dex2oat process and block future dexopt calls.
- As the only client is system server and installd restarts, it relies on
the client to restore the state to unblcoked state properly.
Bug: 179094324
Bug: 156537504
Test: Run added test with existing tests
atest installd_dexopt_test installd_service_test
Change-Id: I73bff6e4cd4473b57d0f06b062dd035dbda6b496
diff --git a/cmds/installd/InstalldNativeService.h b/cmds/installd/InstalldNativeService.h
index 3127be6..480e41b 100644
--- a/cmds/installd/InstalldNativeService.h
+++ b/cmds/installd/InstalldNativeService.h
@@ -114,7 +114,10 @@
const std::optional<std::string>& seInfo, bool downgrade,
int32_t targetSdkVersion, const std::optional<std::string>& profileName,
const std::optional<std::string>& dexMetadataPath,
- const std::optional<std::string>& compilationReason);
+ const std::optional<std::string>& compilationReason,
+ bool* aidl_return);
+
+ binder::Status controlDexOptBlocking(bool block);
binder::Status compileLayouts(const std::string& apkPath, const std::string& packageName,
const std::string& outDexFile, int uid, bool* _aidl_return);