summaryrefslogtreecommitdiff
path: root/services/incremental/IncrementalService.cpp
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2020-03-07 21:47:09 +0900
committer Jooyung Han <jooyung@google.com> 2020-03-12 11:36:33 +0000
commit66c567a8c48f1fda8ed15bd59d6e49115e0eea7b (patch)
tree873911e2aec654ff38f8f634b44ed17d07d71577 /services/incremental/IncrementalService.cpp
parent97363dce3c74071830fd61a67ff1a7b5bb832f01 (diff)
Use aidl::nullable for nullable type in C++
To reduce the discrepance between old code which still uses std::unique_ptr and new code using std::optional. This might help to avoid merge-conflicts between branches. Bug: 144773267 Test: m Merged-In: Ie3196ee5cce17d77950eea9479d2cc1406e9e674 Merged-In: I33822bc76ef87637d5408849f64a0607e121792e Change-Id: I33822bc76ef87637d5408849f64a0607e121792e (cherry picked from commit ad62e8cbf5cf6083568f6f230ef7d73ad8776971) Exempt-From-Owner-Approval: cherry-pick from master with owner's approval
Diffstat (limited to 'services/incremental/IncrementalService.cpp')
-rw-r--r--services/incremental/IncrementalService.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/incremental/IncrementalService.cpp b/services/incremental/IncrementalService.cpp
index 9c9fe8c67de8..cccd01339177 100644
--- a/services/incremental/IncrementalService.cpp
+++ b/services/incremental/IncrementalService.cpp
@@ -28,6 +28,7 @@
#include <androidfw/ZipFileRO.h>
#include <androidfw/ZipUtils.h>
#include <binder/BinderService.h>
+#include <binder/Nullable.h>
#include <binder/ParcelFileDescriptor.h>
#include <binder/Status.h>
#include <sys/stat.h>
@@ -1083,7 +1084,7 @@ bool IncrementalService::prepareDataLoader(IncrementalService::IncFsMount& ifs,
return false;
}
FileSystemControlParcel fsControlParcel;
- fsControlParcel.incremental = std::make_unique<IncrementalFileSystemControlParcel>();
+ fsControlParcel.incremental = aidl::make_nullable<IncrementalFileSystemControlParcel>();
fsControlParcel.incremental->cmd.reset(base::unique_fd(::dup(ifs.control.cmd)));
fsControlParcel.incremental->pendingReads.reset(
base::unique_fd(::dup(ifs.control.pendingReads)));