diff --git a/cmds/idmap2/idmap2d/Idmap2Service.cpp b/cmds/idmap2/idmap2d/Idmap2Service.cpp index 63c22ef6fb3e5..02e92aeb9dc63 100644 --- a/cmds/idmap2/idmap2d/Idmap2Service.cpp +++ b/cmds/idmap2/idmap2d/Idmap2Service.cpp @@ -113,7 +113,7 @@ Status Idmap2Service::verifyIdmap(const std::string& overlay_apk_path, Status Idmap2Service::createIdmap(const std::string& target_apk_path, const std::string& overlay_apk_path, int32_t fulfilled_policies, bool enforce_overlayable, int32_t user_id ATTRIBUTE_UNUSED, - std::optional* _aidl_return) { + aidl::nullable* _aidl_return) { assert(_aidl_return); SYSTRACE << "Idmap2Service::createIdmap " << target_apk_path << " " << overlay_apk_path; _aidl_return->reset(); @@ -155,7 +155,7 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path, return error("failed to write to idmap path " + idmap_path); } - *_aidl_return = idmap_path; + *_aidl_return = aidl::make_nullable(idmap_path); return ok(); } diff --git a/cmds/idmap2/idmap2d/Idmap2Service.h b/cmds/idmap2/idmap2d/Idmap2Service.h index 047353f52590f..b6f5136fc8018 100644 --- a/cmds/idmap2/idmap2d/Idmap2Service.h +++ b/cmds/idmap2/idmap2d/Idmap2Service.h @@ -19,9 +19,7 @@ #include #include - -#include -#include +#include #include "android/os/BnIdmap2.h" @@ -46,7 +44,7 @@ class Idmap2Service : public BinderService, public BnIdmap2 { binder::Status createIdmap(const std::string& target_apk_path, const std::string& overlay_apk_path, int32_t fulfilled_policies, bool enforce_overlayable, int32_t user_id, - std::optional* _aidl_return) override; + aidl::nullable* _aidl_return) override; }; } // namespace android::os diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp index a903f4c9d7cad..cccd013391772 100644 --- a/services/incremental/IncrementalService.cpp +++ b/services/incremental/IncrementalService.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -1083,7 +1084,7 @@ bool IncrementalService::prepareDataLoader(IncrementalService::IncFsMount& ifs, return false; } FileSystemControlParcel fsControlParcel; - fsControlParcel.incremental = IncrementalFileSystemControlParcel(); + fsControlParcel.incremental = aidl::make_nullable(); fsControlParcel.incremental->cmd.reset(base::unique_fd(::dup(ifs.control.cmd))); fsControlParcel.incremental->pendingReads.reset( base::unique_fd(::dup(ifs.control.pendingReads)));