Add AIDL library to update_engine
Also move IApexService.h header to apex_handler_android.h, so that
consumer of ApexHandlerInterface do not need to see IApexService.h.
IApexService.h includes some binder_ndk headers, which includes
syslog.h, which defines LOG_INFO/LOG_WARNING. libchrome also defines
these macros, so including both libchrome and AIDL headers will cause
macro conflict.
Test: th
Bug: 227536004
Change-Id: Ia17d91cc878d106e9b2adeddafe35a71105e1663
diff --git a/aosp/apex_handler_android.cc b/aosp/apex_handler_android.cc
index 8beef96..f47889b 100644
--- a/aosp/apex_handler_android.cc
+++ b/aosp/apex_handler_android.cc
@@ -47,7 +47,8 @@
} // namespace
-std::unique_ptr<ApexHandlerInterface> CreateApexHandler() {
+std::unique_ptr<ApexHandlerInterface>
+ApexHandlerInterface::CreateApexHandler() {
if (android::sysprop::ApexProperties::updatable().value_or(false)) {
return std::make_unique<ApexHandlerAndroid>();
} else {
@@ -65,7 +66,7 @@
}
auto compressed_apex_info_list = CreateCompressedApexInfoList(apex_infos);
- int64_t size_from_apexd;
+ int64_t size_from_apexd = 0;
auto result = apex_service->calculateSizeForCompressedApex(
compressed_apex_info_list, &size_from_apexd);
if (!result.isOk()) {