diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-12-11 05:19:40 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-12-11 05:19:40 +0000 |
commit | bab6894a087da1624a4c9bcf1312521920628cb9 (patch) | |
tree | d161abb8a7a9b413f8404938d7a772e1f5ca526b | |
parent | 8e73c9c065308f9d027c267dce6dc14c4d462677 (diff) | |
parent | 22082f2d949a4b08d807884e69c097b7db3a5748 (diff) | |
download | native-bab6894a087da1624a4c9bcf1312521920628cb9.tar.gz |
Merge "libbinder_ndk: do not rely on copyability of parcelables" am: 22082f2d94
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1918640
Change-Id: Id6470152db903d919e3c90cf18cccc0ee02f8762
-rw-r--r-- | libs/binder/ndk/include_cpp/android/binder_parcel_utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h b/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h index 67623a6556..c1487c0bd2 100644 --- a/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h +++ b/libs/binder/ndk/include_cpp/android/binder_parcel_utils.h @@ -560,7 +560,7 @@ static inline binder_status_t AParcel_readNullableParcelable(const AParcel* parc *p = std::nullopt; return STATUS_OK; } - *p = std::optional<first_template_type_t<P>>(first_template_type_t<P>{}); + p->emplace(first_template_type_t<P>()); return (*p)->readFromParcel(parcel); } else { static_assert(is_specialization_v<P, std::unique_ptr>); |