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 Change-Id: I98549c8614c9152d5d45e2f1f33f2f3c31a9bbbf
This commit is contained in:
parent
8777107734
commit
3ce0ee5363
2 changed files with 4 additions and 4 deletions
|
@ -800,7 +800,7 @@ binder::Status VoldNativeService::lockUserKey(int32_t userId) {
|
|||
return translateBool(fscrypt_lock_user_key(userId));
|
||||
}
|
||||
|
||||
binder::Status VoldNativeService::prepareUserStorage(const std::unique_ptr<std::string>& uuid,
|
||||
binder::Status VoldNativeService::prepareUserStorage(const std::optional<std::string>& uuid,
|
||||
int32_t userId, int32_t userSerial,
|
||||
int32_t flags) {
|
||||
ENFORCE_SYSTEM_OR_ROOT;
|
||||
|
@ -812,7 +812,7 @@ binder::Status VoldNativeService::prepareUserStorage(const std::unique_ptr<std::
|
|||
return translateBool(fscrypt_prepare_user_storage(uuid_, userId, userSerial, flags));
|
||||
}
|
||||
|
||||
binder::Status VoldNativeService::destroyUserStorage(const std::unique_ptr<std::string>& uuid,
|
||||
binder::Status VoldNativeService::destroyUserStorage(const std::optional<std::string>& uuid,
|
||||
int32_t userId, int32_t flags) {
|
||||
ENFORCE_SYSTEM_OR_ROOT;
|
||||
std::string empty_string = "";
|
||||
|
|
|
@ -122,9 +122,9 @@ class VoldNativeService : public BinderService<VoldNativeService>, public os::Bn
|
|||
const std::string& secret);
|
||||
binder::Status lockUserKey(int32_t userId);
|
||||
|
||||
binder::Status prepareUserStorage(const std::unique_ptr<std::string>& uuid, int32_t userId,
|
||||
binder::Status prepareUserStorage(const std::optional<std::string>& uuid, int32_t userId,
|
||||
int32_t userSerial, int32_t flags);
|
||||
binder::Status destroyUserStorage(const std::unique_ptr<std::string>& uuid, int32_t userId,
|
||||
binder::Status destroyUserStorage(const std::optional<std::string>& uuid, int32_t userId,
|
||||
int32_t flags);
|
||||
|
||||
binder::Status prepareSandboxForApp(const std::string& packageName, int32_t appId,
|
||||
|
|
Loading…
Reference in a new issue