diff options
author | Jooyung Han <jooyung@google.com> | 2020-08-10 12:53:14 +0900 |
---|---|---|
committer | Jooyung Han <jooyung@google.com> | 2020-08-10 08:36:35 +0000 |
commit | 16bac8513e2f5be0fc8e7d7fe261b1756a0231d1 (patch) | |
tree | 885973c54bfafe0ed2fed6fc18b63953725c98f3 /cmds/idmap2/idmap2d/Idmap2Service.cpp | |
parent | 8d2626f55a5310389fe55ae676ce8c379ce59a8f (diff) |
Switch aidl::nullable to std::optional
AIDL's @nullable is represented as std::optional in C++ backend.
The previous aidl::nullable was a temporary solution to avoid
merge-conflicts between rvc-dev and master branches.
Bug: 151275535
Test: m
Change-Id: I8fe5bfc1763087e7ff364b4408f862436492d1db
Diffstat (limited to 'cmds/idmap2/idmap2d/Idmap2Service.cpp')
-rw-r--r-- | cmds/idmap2/idmap2d/Idmap2Service.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmds/idmap2/idmap2d/Idmap2Service.cpp b/cmds/idmap2/idmap2d/Idmap2Service.cpp index a6c402ccc075..15e22a3410cf 100644 --- a/cmds/idmap2/idmap2d/Idmap2Service.cpp +++ b/cmds/idmap2/idmap2d/Idmap2Service.cpp @@ -166,7 +166,7 @@ Status Idmap2Service::verifyIdmap(const std::string& target_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, - aidl::nullable<std::string>* _aidl_return) { + std::optional<std::string>* _aidl_return) { assert(_aidl_return); SYSTRACE << "Idmap2Service::createIdmap " << target_apk_path << " " << overlay_apk_path; _aidl_return->reset(); @@ -214,7 +214,7 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path, return error("failed to write to idmap path " + idmap_path); } - *_aidl_return = aidl::make_nullable<std::string>(idmap_path); + *_aidl_return = idmap_path; return ok(); } |