commit | 13499e5a9a1e7270c439361ece924f1b61451965 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Thu Nov 05 17:06:22 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu Nov 05 17:06:22 2020 +0000 |
tree | 134f0bf128c85f459bcd918cfe7df8c7b6abc8c8 | |
parent | 60924e19d92d41a0b3a70e7e6106209bca8c05e7 [diff] | |
parent | b7c14e4cd8885a7247ce5c130516368328f5b7b2 [diff] |
Merge "no use readString16Inplace" am: b7c14e4cd8 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1486503 Change-Id: If3f07ce0bf93c3a3773831a3cec1fdc895d4c11d
diff --git a/camera/camera2/CaptureRequest.cpp b/camera/camera2/CaptureRequest.cpp index 1843ec4..ebc09d7 100644 --- a/camera/camera2/CaptureRequest.cpp +++ b/camera/camera2/CaptureRequest.cpp
@@ -94,12 +94,12 @@ // Do not distinguish null arrays from 0-sized arrays. for (int32_t i = 0; i < size; ++i) { // Parcel.writeParcelableArray - size_t len; - const char16_t* className = parcel->readString16Inplace(&len); + std::optional<std::string> className; + parcel->readUtf8FromUtf16(&className); ALOGV("%s: Read surface class = %s", __FUNCTION__, - className != NULL ? String8(className).string() : "<null>"); + className.value_or("<null>").c_str()); - if (className == NULL) { + if (className == std::nullopt) { continue; }