Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57110a47 authored by Jooyung Han's avatar Jooyung Han
Browse files

Use optional for nullable types

AIDL generates optional<T> 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)
parent b9c95f8e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -159,8 +159,8 @@ public:

#define GK_ERROR *gkResponse = GKResponse::error(), Status::ok()

    Status enroll(int32_t uid, const std::unique_ptr<std::vector<uint8_t>>& currentPasswordHandle,
                  const std::unique_ptr<std::vector<uint8_t>>& currentPassword,
    Status enroll(int32_t uid, const std::optional<std::vector<uint8_t>>& currentPasswordHandle,
                  const std::optional<std::vector<uint8_t>>& currentPassword,
                  const std::vector<uint8_t>& desiredPassword, GKResponse* gkResponse) override {
        IPCThreadState* ipc = IPCThreadState::self();
        const int calling_pid = ipc->getCallingPid();