From 57110a4752f7f48220eb51978ce9e5c8f31f1d9b Mon Sep 17 00:00:00 2001 From: Jooyung Han Date: Thu, 23 Jan 2020 13:28:36 +0900 Subject: [PATCH] Use optional for nullable types AIDL generates optional for nullable T types for C++, which is more efficient and idomatic and easy to use. Bug: 144773267 Test: build/flash/boot Merged-In: I6bf4c2017f113f4d326fddb1d76163c2fed34d50 Change-Id: I6bf4c2017f113f4d326fddb1d76163c2fed34d50 (cherry picked from commit 5f7f450fa38e752ae49ae91b1bdaf267ec9deea5) --- gatekeeperd/gatekeeperd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatekeeperd/gatekeeperd.cpp b/gatekeeperd/gatekeeperd.cpp index 1d65b1ced..c81a80ef3 100644 --- a/gatekeeperd/gatekeeperd.cpp +++ b/gatekeeperd/gatekeeperd.cpp @@ -159,8 +159,8 @@ public: #define GK_ERROR *gkResponse = GKResponse::error(), Status::ok() - Status enroll(int32_t uid, const std::unique_ptr>& currentPasswordHandle, - const std::unique_ptr>& currentPassword, + Status enroll(int32_t uid, const std::optional>& currentPasswordHandle, + const std::optional>& currentPassword, const std::vector& desiredPassword, GKResponse* gkResponse) override { IPCThreadState* ipc = IPCThreadState::self(); const int calling_pid = ipc->getCallingPid();