Correct the expection of DeviceInfo size am: 72abbbd36d

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2513015

Change-Id: I8bdac7f84f2a4a7a7a3927a1b15be97a3da778d6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Tommy Chiu 2023-03-29 13:46:48 +00:00 committed by Automerger Merge Worker
commit 015b828def

View file

@ -473,7 +473,7 @@ ErrMsgOr<std::unique_ptr<cppbor::Map>> parseAndValidateDeviceInfo(
}
// TEE IRPC instances require all entries to be present in DeviceInfo. Non-TEE instances
// may omit `os_version`
if (!isTeeDeviceInfo(*parsed) && (parsed->size() != kNumTeeDeviceInfoEntries ||
if (!isTeeDeviceInfo(*parsed) && (parsed->size() != kNumTeeDeviceInfoEntries &&
parsed->size() != kNumTeeDeviceInfoEntries - 1)) {
error += fmt::format(
"Err: Incorrect number of device info entries. Expected {} or {} but got "