Snap for 11967491 from 49d05decfe
to 24Q3-release
Change-Id: I0bfbb0abe897374710613c57b22936e361bc3f18
This commit is contained in:
commit
0e2ef5aeff
41 changed files with 165 additions and 29 deletions
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Automatic Emergency Braking (AEB).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Blind Spot Warning State (BSW).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Cross Traffic Monitoring Warning system.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used to enumerate the Cruise Control (CC) commands.
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used to enumerate the current state of Cruise Control (CC).
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used to enumerate the current type of Cruise Control (CC).
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used to enumerate the current state of driver distraction monitoring.
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current warning state of the driver distraction monitoring system.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used to enumerate the current state of driver drowsiness and attention monitoring.
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle;
|
|||
/**
|
||||
* Used to enumerate the current warning state of the driver drowsiness and attention monitoring
|
||||
* system.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Electronic Stability Control (ESC).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used by ELECTRONIC_TOLL_COLLECTION_CARD_STATUS.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used by ELECTRONIC_TOLL_COLLECTION_CARD_TYPE.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used by emergency lane keep assist to enumerate state.
|
||||
*
|
||||
* This enum could be extended in future releases to include additional feature states.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle;
|
|||
/**
|
||||
* Used to enumerate the possible error states. For version 2 of this interface, ErrorState is used
|
||||
* by ADAS STATE properties, but its use may be expanded in future releases.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used by EV charging properties to enumerate the current state of the battery charging.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle;
|
|||
/**
|
||||
* Used by the regenerative braking property to enumerate the current state
|
||||
* of the regenerative braking.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -20,6 +20,9 @@ package android.hardware.automotive.vehicle;
|
|||
* Used by EV_STOPPING_MODE to enumerate the current state of the stopping mode.
|
||||
*
|
||||
* This enum may be extended to include more states in the future.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Forward Collision Warning State (FCW).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current driver state of Hands On Detection (HOD).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current warning state of Hands On Detection (HOD).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the various impact sensor locations on the car.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used by Lane Centering Assist (LCA) to enumerate commands.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Lane Centering Assist (LCA).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Lane Departure Warning (LDW).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Lane Keep Assist (LKA).
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Low Speed Automatic Emergency Braking.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the state of Low Speed Collision Warning State.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current state of VehicleProperty#TRAILER_PRESENT.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the various airbag locations per seat.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -19,6 +19,9 @@ package android.hardware.automotive.vehicle;
|
|||
/**
|
||||
* Used to enumerate the various level of automation that can be expressed by the
|
||||
* VEHICLE_DRIVING_AUTOMATION_CURRENT_LEVEL property.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Various gears which can be selected by user and chosen in system.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Bit flags for fan direction
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
package android.hardware.automotive.vehicle;
|
||||
|
||||
/**
|
||||
* Used to enumerate the different states the ignition of the vehicle can be in.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
enum VehicleIgnitionState {
|
||||
|
|
|
@ -21,6 +21,9 @@ package android.hardware.automotive.vehicle;
|
|||
*
|
||||
* Most XXX_LIGHTS_STATE properties will only report ON and OFF states. Only
|
||||
* the HEADLIGHTS_STATE property will report DAYTIME_RUNNING.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -22,6 +22,9 @@ package android.hardware.automotive.vehicle;
|
|||
* XXX_LIGHTS_SWITCH properties report the switch settings that the user
|
||||
* selects. The switch setting may be decoupled from the state reported if the
|
||||
* user selects AUTOMATIC.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current level of VehicleProperty#ENGINE_OIL_LEVEL.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used by seat occupancy to enumerate the current occupancy state of the seat.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current state of VehicleProperty#WINDSHIELD_WIPERS_STATE.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -18,6 +18,9 @@ package android.hardware.automotive.vehicle;
|
|||
|
||||
/**
|
||||
* Used to enumerate the current position of VehicleProperty#WINDSHIELD_WIPERS_SWITCH.
|
||||
*
|
||||
* Through the use of VehicleAreaConfig#supportedEnumValues, OEMs may specify they only support a
|
||||
* subset of the enums that are defined here.
|
||||
*/
|
||||
@VintfStability
|
||||
@Backing(type="int")
|
||||
|
|
|
@ -603,7 +603,16 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfoType>& sensors, b
|
|||
EventCallback callback;
|
||||
getEnvironment()->registerCallback(&callback);
|
||||
|
||||
for (const SensorInfoType& sensor : sensors) {
|
||||
// 10 sensors per group
|
||||
constexpr size_t kSensorsPerGroup = 10;
|
||||
for (size_t sensorOffset = 0; sensorOffset < sensors.size();
|
||||
sensorOffset += kSensorsPerGroup) {
|
||||
std::vector<SensorInfoType> sensorGroup(
|
||||
sensors.begin() + sensorOffset,
|
||||
sensors.begin() +
|
||||
std::min(sensorOffset + kSensorsPerGroup, sensors.size()));
|
||||
|
||||
for (const SensorInfoType& sensor : sensorGroup) {
|
||||
// Configure and activate the sensor
|
||||
batch(sensor.sensorHandle, sensor.maxDelay, 0 /* maxReportLatencyNs */);
|
||||
activate(sensor.sensorHandle, activateSensor);
|
||||
|
@ -614,7 +623,8 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfoType>& sensors, b
|
|||
<< "Flush " << i << "/" << flushCalls << ": "
|
||||
<< " handle=0x" << std::hex << std::setw(8) << std::setfill('0')
|
||||
<< sensor.sensorHandle << std::dec
|
||||
<< " type=" << static_cast<int>(sensor.type) << " name=" << sensor.name);
|
||||
<< " type=" << static_cast<int>(sensor.type)
|
||||
<< " name=" << sensor.name);
|
||||
|
||||
Result flushResult = flush(sensor.sensorHandle);
|
||||
EXPECT_EQ(flushResult, expectedResponse);
|
||||
|
@ -622,24 +632,27 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfoType>& sensors, b
|
|||
}
|
||||
|
||||
// Wait up to one second for the flush events
|
||||
callback.waitForFlushEvents(sensors, flushCalls, std::chrono::milliseconds(1000) /* timeout */);
|
||||
callback.waitForFlushEvents(sensorGroup, flushCalls,
|
||||
std::chrono::milliseconds(1000) /* timeout */);
|
||||
|
||||
// Deactivate all sensors after waiting for flush events so pending flush events are not
|
||||
// abandoned by the HAL.
|
||||
for (const SensorInfoType& sensor : sensors) {
|
||||
for (const SensorInfoType& sensor : sensorGroup) {
|
||||
activate(sensor.sensorHandle, false);
|
||||
}
|
||||
getEnvironment()->unregisterCallback();
|
||||
|
||||
// Check that the correct number of flushes are present for each sensor
|
||||
for (const SensorInfoType& sensor : sensors) {
|
||||
for (const SensorInfoType& sensor : sensorGroup) {
|
||||
SCOPED_TRACE(::testing::Message()
|
||||
<< " handle=0x" << std::hex << std::setw(8) << std::setfill('0')
|
||||
<< sensor.sensorHandle << std::dec << " type=" << static_cast<int>(sensor.type)
|
||||
<< sensor.sensorHandle << std::dec
|
||||
<< " type=" << static_cast<int>(sensor.type)
|
||||
<< " name=" << sensor.name);
|
||||
ASSERT_EQ(callback.getFlushCount(sensor.sensorHandle), expectedFlushCount);
|
||||
}
|
||||
}
|
||||
getEnvironment()->unregisterCallback();
|
||||
}
|
||||
|
||||
TEST_P(SensorsHidlTest, FlushSensor) {
|
||||
// Find a sensor that is not a one-shot sensor
|
||||
|
|
Loading…
Reference in a new issue