Merge "identity: Clarify validity period for auth keys." am: 3522198eb4 am: 8be35e964b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2475025
Change-Id: I031fc284ef5b7ce91ad6462f5c986fe92dfb84d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
index 622846a..f023fd2 100644
--- a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
+++ b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
@@ -167,7 +167,15 @@
.maxSampleRate = 10.0f,
},
.initialValue = {.floatValues = {0.0f}}},
-
+ {.config =
+ {
+ .prop = toInt(VehicleProperty::PERF_VEHICLE_SPEED_DISPLAY),
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
+ .minSampleRate = 1.0f,
+ .maxSampleRate = 10.0f,
+ },
+ .initialValue = {.floatValues = {0.0f}}},
{.config =
{
.prop = toInt(VehicleProperty::VEHICLE_SPEED_DISPLAY_UNITS),
@@ -177,7 +185,7 @@
toInt(VehicleUnit::MILES_PER_HOUR),
toInt(VehicleUnit::KILOMETERS_PER_HOUR)},
},
- .initialValue = {.int32Values = {toInt(VehicleUnit::KILOMETERS_PER_HOUR)}}},
+ .initialValue = {.int32Values = {toInt(VehicleUnit::MILES_PER_HOUR)}}},
{.config =
{
@@ -1025,7 +1033,7 @@
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
.configArray = {(int)VehicleUnit::LITER, (int)VehicleUnit::US_GALLON},
},
- .initialValue = {.int32Values = {(int)VehicleUnit::LITER}}},
+ .initialValue = {.int32Values = {(int)VehicleUnit::US_GALLON}}},
{.config =
{
diff --git a/camera/device/3.2/default/convert.cpp b/camera/device/3.2/default/convert.cpp
index 06ad7e9..2075607 100644
--- a/camera/device/3.2/default/convert.cpp
+++ b/camera/device/3.2/default/convert.cpp
@@ -16,6 +16,7 @@
#define LOG_TAG "android.hardware.camera.device@3.2-convert-impl"
#include <log/log.h>
+#include <system/camera_metadata.h>
#include "include/convert.h"
@@ -43,6 +44,13 @@
ALOGE("%s: input CameraMetadata is corrupt!", __FUNCTION__);
return false;
}
+
+ if (validate_camera_metadata_structure((camera_metadata_t*)data, /*expected_size=*/NULL) !=
+ OK) {
+ ALOGE("%s: Failed to validate the metadata structure", __FUNCTION__);
+ return false;
+ }
+
*dst = (camera_metadata_t*) data;
return true;
}