Merge "Add a method to support multi-display usages"
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index bce42b9..cbd9e28 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -65,8 +65,8 @@
* particular door, thus this property must be marked with
* VehicleArea:DOOR flag.
*
- * Other properties may not be associated with particular vehicle area,
- * these kind of properties must have VehicleArea:GLOBAL flag.
+ * Other properties may not be associated with particular vehicle area.
+ * These kinds of properties must have VehicleArea:GLOBAL flag.
*
* [Definition] Area: An area represents a unique element of an AreaType.
* For instance, if AreaType is WINDOW, then an area may be FRONT_WINDSHIELD.
@@ -79,9 +79,9 @@
* Rules for mapping a zoned property to AreaIDs:
* - A property must be mapped to an array of AreaIDs that are impacted when
* the property value changes.
- * - Each element in the array must represent an AreaID, in which, the
+ * - Each element in the array must represent an AreaID, in which the
* property value can only be changed together in all the areas within
- * an AreaID and never independently. That is, when the property value
+ * the AreaID and never independently. That is, when the property value
* changes in one of the areas in an AreaID in the array, then it must
* automatically change in all other areas in the AreaID.
* - The property value must be independently controllable in any two
@@ -140,7 +140,7 @@
* - vehicle area (VehicleArea)
*
* Vendors are allowed to extend this enum with their own properties. In this
- * case they must use VehiclePropertyGroup:VENDOR flag when property is
+ * case they must use VehiclePropertyGroup:VENDOR flag when the property is
* declared.
*
* When a property's status field is not set to AVAILABLE:
@@ -3041,26 +3041,52 @@
};
enum VehicleApPowerStateReq : int32_t {
- /** Transition Android from WAIT_FOR_VHAL to ON state */
+ /**
+ * This requests Android to enter its normal operating state.
+ * This may be sent after the AP has reported
+ * VehicleApPowerStateReport#DEEP_SLEEP_EXIT,
+ * VehicleApPowerStateReport#SHUTDOWN_CANCELLED, or
+ * VehicleApPowerStateReport#WAIT_FOR_VHAL.
+ */
ON = 0,
/**
- * The power controller has requested AP to shutdown. AP can either enter
- * sleep state or start full shutdown. AP can also request postponing
- * shutdown by sending VehicleApPowerSetState#SHUTDOWN_POSTPONE message. The
- * power controller must change power state to this state to shutdown
- * system.
+ * The power controller issues this request to shutdown the system.
+ * This may be sent after the AP has reported
+ * VehicleApPowerStateReport#DEEP_SLEEP_EXIT,
+ * VehicleApPowerStateReport#ON,
+ * VehicleApPowerStateReport#SHUTDOWN_CANCELLED,
+ * VehicleApPowerStateReport#SHUTDOWN_POSTPONE,
+ * VehicleApPowerStateReport#SHUTDOWN_PREPARE, or
+ * VehicleApPowerStateReport#WAIT_FOR_VHAL.
*
- * int32Values[1] : one of VehicleApPowerStateShutdownParam
- *
- * SHUTDOWN_PRPARE may be requested from either WAIT_FOR_VHAL or ON states.
+ * int32Values[1] : One of VehicleApPowerStateShutdownParam.
+ * This parameter indicates if the AP should shut
+ * down fully or sleep. This parameter also
+ * indicates if the shutdown should be immediate
+ * or if it can be postponed. If the shutdown can
+ * be postponed, AP requests postponing by sending
+ * VehicleApPowerStateReport#SHUTDOWN_POSTPONE.
*/
SHUTDOWN_PREPARE = 1,
- /** Cancel the shutdown and transition from SHUTDOWN_PREPARE to WAIT_FOR_VHAL state */
+ /**
+ * Cancel the shutdown.
+ * This may be sent after the AP has reported
+ * VehicleApPowerStateReport#SHUTDOWN_POSTPONE or
+ * VehicleApPowerStateReport#SHUTDOWN_PREPARE.
+ * After receiving this request, the AP will report
+ * VehicleApPowerStateReport#WAIT_FOR_VHAL in preparation to going ON.
+ */
CANCEL_SHUTDOWN = 2,
- /** VHAL is finished with shutdown procedures and ready for Android to suspend/shutdown */
+ /**
+ * Completes the shutdown process.
+ * This may be sent after the AP has reported
+ * VehicleApPowerStateReport#DEEP_SLEEP_ENTRY or
+ * VehicleApPowerStateReport#SHUTDOWN_START. The AP will not report new
+ * state information after receiving this request.
+ */
FINISHED = 3,
};
@@ -3092,61 +3118,80 @@
enum VehicleApPowerStateReport : int32_t {
/**
- * Device has booted, CarService has initialized and is ready to accept commands from VHAL.
- * Device starts in WAIT_FOR_VHAL state. The user is not logged in, and vendor apps/services
- * are expected to control the display and audio.
+ * The device has booted. CarService has initialized and is ready to accept commands
+ * from VHAL. The user is not logged in, and vendor apps and services are expected to
+ * control the display and audio.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#ON or
+ * VehicleApPowerStateReq#SHUTDOWN_PREPARE. Other power state requests are ignored.
*/
WAIT_FOR_VHAL = 0x1,
/**
- * AP is ready to suspend and has entered WAIT_FOR_FINISHED state.
+ * AP is ready to suspend.
+ * The AP will not send any more state reports after this.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#FINISHED.
+ * Other power state requests are ignored.
*
- * int32Values[1]: Time to turn on AP in secs. Power controller may turn on
- * AP after specified time so that AP can run tasks like
- * update. If it is set to 0, there is no wake up, and power
- * controller may not necessarily support wake-up.
+ * int32Values[1]: Time to turn AP back on, in seconds. Power controller should turn on
+ * AP after the specified time has elapsed, so AP can run tasks like
+ * update. If this value is 0, no wake up is requested. The power
+ * controller may not necessarily support timed wake-up.
*/
DEEP_SLEEP_ENTRY = 0x2,
/**
- * AP is exiting from deep sleep state, and is in WAIT_FOR_VHAL state.
+ * AP is exiting from deep sleep state.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#ON or
+ * VehicleApPowerStateReq#SHUTDOWN_PREPARE. Other power state requests are ignored.
*/
DEEP_SLEEP_EXIT = 0x3,
/**
- * AP remains in SHUTDOWN_PREPARE state as idle and cleanup tasks execute.
+ * AP sends this message repeatedly while cleanup and idle tasks execute.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#SHUTDOWN_PREPARE
+ * requesting immediate shutdown or VehicleApPowerStateReq#CANCEL_SHUTDOWN. Other
+ * power state requests are ignored.
*
- * int32Values[1]: Time to postpone shutdown in ms. Maximum value can be
+ * int32Values[1]: Time to postpone shutdown in ms. Maximum value is
* 5000 ms.
- * If AP needs more time, it will send another POSTPONE
+ * If AP needs more time, it will send another SHUTDOWN_POSTPONE
* message before the previous one expires.
*/
SHUTDOWN_POSTPONE = 0x4,
/**
- * AP is ready to shutdown and has entered WAIT_FOR_FINISHED state.
+ * AP is ready to shutdown.
+ * The AP will not send any more state reports after this.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#FINISHED.
+ * Other power state requests are ignored.
*
- * int32Values[1]: Time to turn on AP in secs. Power controller may turn on
- * AP after specified time so that AP can run tasks like
- * update. If it is set to 0, there is no wake up, and power
- * controller may not necessarily support wake-up.
+ * int32Values[1]: Time to turn AP back on, in seconds. Power controller should turn on
+ * AP after the specified time has elapsed so AP can run tasks like
+ * update. If this value is 0, no wake up is specified. The power
+ * controller may not necessarily support timed wake-up.
*/
SHUTDOWN_START = 0x5,
/**
- * AP has transitioned from WAIT_FOR_VHAL state to ON.
+ * AP is entering its normal operating state.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#SHUTDOWN_PREPARE.
+ * Other power state requests are ignored.
*/
ON = 0x6,
/**
- * AP has transitions to SHUTDOWN_PREPARE state. In this state, Garage Mode will execute idle
- * tasks, and other services that have registered for this state transition may execute
- * cleanup activities.
+ * AP is preparing to shut down. In this state, Garage Mode is active and idle
+ * tasks are allowed to run.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#SHUTDOWN_PREPARE
+ * requesting immediate shutdown or VehicleApPowerStateReq#CANCEL_SHUTDOWN. Other
+ * power state requests are ignored.
*/
SHUTDOWN_PREPARE = 0x7,
/**
- * AP has transitioned from SHUTDOWN_PREPARE state to WAIT_FOR_VHAL.
+ * AP has stopped preparing to shut down.
+ * After reporting this state, AP will accept VehicleApPowerStateReq#ON or
+ * VehicleApPowerStateReq#SHUTDOWN_PREPARE. Other power state requests are ignored.
*/
SHUTDOWN_CANCELLED = 0x8,
};
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 8eb7587..f8cec64 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -348,7 +348,7 @@
<instance>default</instance>
</interface>
</hal>
- <hal format="aidl" optional="true">
+ <hal format="aidl" optional="false">
<name>android.hardware.power</name>
<interface>
<name>IPower</name>
diff --git a/current.txt b/current.txt
index adffc8d..29e95fe 100644
--- a/current.txt
+++ b/current.txt
@@ -588,6 +588,7 @@
cd06a7911b9acd4a653bbf7133888878fbcb3f84be177c7a3f1becaae3d8618f android.hardware.camera.metadata@3.2::types
a05277065c28ebecd58118bd240fb8c55757361e8648c01f7c4dacdb7f2a95dc android.hardware.camera.metadata@3.3::types
9cb3df2bde2c6cd5fd96b7c41555420cacd7e276a556c684af91b7461c86460f android.hardware.gnss@1.0::IGnssCallback
+af334f1fc85c62b343f84b74d0495eed6f495f7fecedb53463db10c202310058 android.hardware.gnss.measurement_corrections@1.0::types
bceee81ec1b59324abd05932b5620fda5a6589597c9cb3953ba7f3ea02cccd3e android.hardware.camera.provider@2.4::ICameraProvider
2ce820dc4f3c6d85721b65150ed2157c6e2e2055f866fb6c6ba4790f14408d66 android.hardware.camera.provider@2.4::ICameraProviderCallback
b69a7615c508acf5c5201efd1bfa3262167874fc3594e2db5a3ff93addd8ac75 android.hardware.keymaster@4.0::IKeymasterDevice
@@ -651,15 +652,15 @@
626db710bf917ecf551a0b0b1f25be10bf52758f43e0fc808b148b6aae2ef73e android.hardware.gnss@2.1::IGnss
ba5ac712b2a656dc07c83ab4a7a2c2f3bee1bbcb752e8b8ffa9b672f3b5b0728 android.hardware.gnss@2.1::IGnssAntennaInfo
0bc3ed97cbc3f6abc89c68f4e9f4d124f9f723431997dc88c2186cf4d2ad47ee android.hardware.gnss@2.1::IGnssAntennaInfoCallback
-50c5d009af76d65b3023a9d94ee519545e72cb7c59bc7166d768d6f00923774d android.hardware.gnss@2.1::IGnssCallback
+3541d83adfeac16ee3e45d183a58dffe06012ccb5aa5bcd2e4f6eeae269f69cd android.hardware.gnss@2.1::IGnssCallback
737d750017738f0753d13ba01a3310e0161f294b8ae80b3fd63eaa227e9d9c66 android.hardware.gnss@2.1::IGnssConfiguration
7913a11206a577b12ade86a7cf3f95c2639cb514d086673f279bf99238c9917e android.hardware.gnss@2.1::IGnssMeasurement
-9999f2484f35ebfacdd433dfeae459f2a582334315959653ec8efde7699ec556 android.hardware.gnss@2.1::IGnssMeasurementCallback
+0a16e5913e94d995cfcf959a1c6f10b0b8e9dfdb5f45ac6e7244711ddd740272 android.hardware.gnss@2.1::IGnssMeasurementCallback
6670e7780803a8c696c6391fda5589a334b1b37dc7be9393792ed35035413633 android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections
-a3f439b782a6a92aaf3c0250f3526e94e8bf8844c3d578f0815e21b12c431346 android.hardware.gnss.measurement_corrections@1.1::types
+a28d6c29a7e36976acffb018208e65b3496d9152d57d864038556cdd83b35744 android.hardware.gnss.measurement_corrections@1.1::types
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
26f04510a0b57aba5167c5c0a7c2f077c2acbb98b81902a072517829fd9fd67f android.hardware.health@2.1::IHealthInfoCallback
-30e5d878099aeca710420dfc438d115bbbdcdbe84ad1b05a0f5e01debc3ef3af android.hardware.health@2.1::types
+3a4e7462a12589bd219599de59663d0ba9915313f45150774780d09f4e114f74 android.hardware.health@2.1::types
0589e410f519e36514e7ece18f283f022df0f70efd2c12821d822f67f74aba98 android.hardware.identity@1.0::types
bbeee9604128ede83ee755b67e73b5ad29e6e1dbac9ec41fea6ffe2745b0c50a android.hardware.identity@1.0::IIdentityCredential
96ce8aad80f4c476f25261f790d357c117e79e18474c7dadd850dac704bbe65e android.hardware.identity@1.0::IIdentityCredentialStore
@@ -675,7 +676,7 @@
2fa3679ad7c94b5e88724adcd560c561041068a4ca565c63830e68101988746a android.hardware.neuralnetworks@1.3::IFencedExecutionCallback
237b23b126a66f3432658020fed78cdd06ba6297459436fe6bae0ba753370833 android.hardware.neuralnetworks@1.3::IPreparedModel
0439a1fbbec7f16e5e4c653d85ac685d51bfafbae15b8f8cca530acdd7d6a8ce android.hardware.neuralnetworks@1.3::IPreparedModelCallback
-2fabd246f985d94a0172dacefb0d6cf19e2aeb2d5f17752653988ef39570a52d android.hardware.neuralnetworks@1.3::types
+5e2a14b40dc11da9d478185838f4401b652739922d14cecea0a0ce4c1359fe21 android.hardware.neuralnetworks@1.3::types
3e01d4446cd69fd1c48f8572efd97487bc179564b32bd795800b97bbe10be37b android.hardware.wifi@1.4::IWifi
c67aaf26a7a40d14ea61e70e20afacbd0bb906df1704d585ac8599fbb69dd44b android.hardware.wifi.hostapd@1.2::IHostapd
2b5a7ea572b736030c64a3b4043af244425477c4672301780fe15aba5ed393d9 android.hardware.wifi.hostapd@1.2::types
diff --git a/gnss/2.1/IGnssCallback.hal b/gnss/2.1/IGnssCallback.hal
index f7b7477..94be915 100644
--- a/gnss/2.1/IGnssCallback.hal
+++ b/gnss/2.1/IGnssCallback.hal
@@ -36,6 +36,13 @@
};
/**
+ * Callback to inform framework of the GNSS HAL implementation's capabilities.
+ *
+ * @param capabilities Capability parameter is a bit field of the Capabilities enum.
+ */
+ gnssSetCapabilitiesCb_2_1(bitfield<Capabilities> capabilities);
+
+ /**
* Extends a GnssSvInfo, adding a basebandCN0DbHz.
*/
struct GnssSvInfo {
diff --git a/gnss/2.1/IGnssMeasurementCallback.hal b/gnss/2.1/IGnssMeasurementCallback.hal
index 1aee272..0e6abbd 100644
--- a/gnss/2.1/IGnssMeasurementCallback.hal
+++ b/gnss/2.1/IGnssMeasurementCallback.hal
@@ -28,31 +28,7 @@
/**
* Flags to indicate what fields in GnssMeasurement are valid.
*/
- enum GnssMeasurementFlags : uint32_t {
- /**
- * A valid 'snr' is stored in the data structure.
- */
- HAS_SNR = 1 << 0,
- /**
- * A valid 'carrier frequency' is stored in the data structure.
- */
- HAS_CARRIER_FREQUENCY = 1 << 9,
- /**
- * A valid 'carrier cycles' is stored in the data structure.
- */
- HAS_CARRIER_CYCLES = 1 << 10,
- /**
- * A valid 'carrier phase' is stored in the data structure.
- */
- HAS_CARRIER_PHASE = 1 << 11,
- /**
- * A valid 'carrier phase uncertainty' is stored in the data structure.
- */
- HAS_CARRIER_PHASE_UNCERTAINTY = 1 << 12,
- /**
- * A valid automatic gain control is stored in the data structure.
- */
- HAS_AUTOMATIC_GAIN_CONTROL = 1 << 13,
+ enum GnssMeasurementFlags : @1.0::IGnssMeasurementCallback.GnssMeasurementFlags {
/**
* A valid receiver inter-signal bias is stored in the data structure.
*/
@@ -104,8 +80,8 @@
* The receiver inter-signal bias (ISB) in nanoseconds.
*
* This value is the estimated receiver-side inter-system (different from the constellation
- * in GnssClock.referenceSignalForIsb) bias and inter-frequency (different from the carrier
- * frequency in GnssClock.referenceSignalForIsb) bias. The reported receiver ISB
+ * in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different from the
+ * carrier frequency in GnssClock.referenceSignalTypeForIsb) bias. The reported receiver ISB
* must include signal delays caused by
*
* - Receiver inter-constellation bias
@@ -114,7 +90,7 @@
*
* The value does not include the inter-frequency Ionospheric bias.
*
- * The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
+ * The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double receiverInterSignalBiasNs;
@@ -127,8 +103,8 @@
* The satellite inter-signal bias in nanoseconds.
*
* This value is the satellite-and-control-segment-side inter-system (different from the
- * constellation in GnssClock.referenceSignalForIsb) bias and inter-frequency (different
- * from the carrier frequency in GnssClock.referenceSignalForIsb) bias, including:
+ * constellation in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different
+ * from the carrier frequency in GnssClock.referenceSignalTypeForIsb) bias, including:
*
* - Master clock bias (e.g., GPS-GAL Time Offset (GGTO), GPT-UTC Time Offset (TauGps),
* BDS-GLO Time Offset (BGTO))
@@ -136,7 +112,7 @@
* - Satellite inter-signal bias, which includes satellite inter-frequency bias (GLO only),
* and satellite inter-code bias (e.g., Differential Code Bias (DCB)).
*
- * The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
+ * The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double satelliteInterSignalBiasNs;
diff --git a/gnss/2.1/default/Gnss.cpp b/gnss/2.1/default/Gnss.cpp
index c1af103..2b327a9 100644
--- a/gnss/2.1/default/Gnss.cpp
+++ b/gnss/2.1/default/Gnss.cpp
@@ -339,7 +339,7 @@
const auto capabilities = Capabilities::MEASUREMENTS | Capabilities::MEASUREMENT_CORRECTIONS |
Capabilities::LOW_POWER_MODE | Capabilities::SATELLITE_BLACKLIST |
Capabilities::ANTENNA_INFO;
- auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_0(capabilities);
+ auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_1(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}
diff --git a/gnss/2.1/vts/functional/gnss_hal_test.cpp b/gnss/2.1/vts/functional/gnss_hal_test.cpp
index 83c4c3c..da7a62b 100644
--- a/gnss/2.1/vts/functional/gnss_hal_test.cpp
+++ b/gnss/2.1/vts/functional/gnss_hal_test.cpp
@@ -215,6 +215,12 @@
return Void();
}
+Return<void> GnssHalTest::GnssCallback::gnssSetCapabilitiesCb_2_1(uint32_t capabilities) {
+ ALOGI("Capabilities (v2.1) received %d", capabilities);
+ capabilities_cbq_.store(capabilities);
+ return Void();
+}
+
Return<void> GnssHalTest::GnssCallback::gnssNameCb(const android::hardware::hidl_string& name) {
ALOGI("Name received: %s", name.c_str());
name_cbq_.store(name);
diff --git a/gnss/2.1/vts/functional/gnss_hal_test.h b/gnss/2.1/vts/functional/gnss_hal_test.h
index 3472edb..9e6e162 100644
--- a/gnss/2.1/vts/functional/gnss_hal_test.h
+++ b/gnss/2.1/vts/functional/gnss_hal_test.h
@@ -109,6 +109,7 @@
// New in v2.1
Return<void> gnssSvStatusCb_2_1(
const hidl_vec<IGnssCallback_2_1::GnssSvInfo>& svInfoList) override;
+ Return<void> gnssSetCapabilitiesCb_2_1(uint32_t capabilities) override;
private:
Return<void> gnssLocationCbImpl(const GnssLocation_2_0& location);
diff --git a/gnss/measurement_corrections/1.0/types.hal b/gnss/measurement_corrections/1.0/types.hal
index edf26bf..3d7ab0f 100644
--- a/gnss/measurement_corrections/1.0/types.hal
+++ b/gnss/measurement_corrections/1.0/types.hal
@@ -92,16 +92,16 @@
double altitudeMeters;
/**
- * Represents the horizontal uncertainty (68% confidence) in meters on the device position at
- * which the corrections are provided.
+ * Represents the horizontal uncertainty (63% to 68% confidence) in meters on the device
+ * position at which the corrections are provided.
*
* This value is useful for example to judge how accurate the provided corrections are.
*/
double horizontalPositionUncertaintyMeters;
/**
- * Represents the vertical uncertainty (68% confidence) in meters on the device position at
- * which the corrections are provided.
+ * Represents the vertical uncertainty (63% to 68% confidence) in meters on the device position
+ * at which the corrections are provided.
*
* This value is useful for example to judge how accurate the provided corrections are.
*/
diff --git a/gnss/measurement_corrections/1.1/types.hal b/gnss/measurement_corrections/1.1/types.hal
index 40b6f52..f945c57 100644
--- a/gnss/measurement_corrections/1.1/types.hal
+++ b/gnss/measurement_corrections/1.1/types.hal
@@ -48,11 +48,20 @@
* If the road is curved in the vicinity of the user location, then
* environmentBearingUncertaintyDegrees will include the amount by which the road direction
* changes in the area of position uncertainty.
+ *
+ * hasEnvironmentBearing should be checked to verify the environment bearing is available
+ * before calling this method. The value is undefined if hasEnvironmentBearing is false.
*/
float environmentBearingDegrees;
/**
- * Bearing uncertainty [0 to 180].
+ * Environment bearing uncertainty [0 to 180]. It represents the standard deviation of the
+ * physical structure in the circle of position uncertainty. hasEnvironmentBearing becomes false
+ * as the uncertainty value passes a predefined threshold depending on the physical structure
+ * around the user.
+ *
+ * hasEnvironmentBearing should be checked to verify the environment bearing is available
+ * before calling this method. The value is undefined if hasEnvironmentBearing is false.
*/
float environmentBearingUncertaintyDegrees;
-};
\ No newline at end of file
+};
diff --git a/health/2.0/default/Health.cpp b/health/2.0/default/Health.cpp
index 4225fd8..65eada8 100644
--- a/health/2.0/default/Health.cpp
+++ b/health/2.0/default/Health.cpp
@@ -156,7 +156,7 @@
const HealthInfo_1_0& health_info = battery_monitor_->getHealthInfo_1_0();
struct BatteryProperties props;
convertFromHealthInfo(health_info, &props);
- bool log = healthd_board_battery_update(&props);
+ bool log = (healthd_board_battery_update(&props) == 0);
if (log) {
battery_monitor_->logValues();
}
diff --git a/health/2.1/types.hal b/health/2.1/types.hal
index d99f63f..be1eaf8 100644
--- a/health/2.1/types.hal
+++ b/health/2.1/types.hal
@@ -85,9 +85,10 @@
/**
* Estimated battery full charge design capacity (in microamp hours, uAh).
- * batteryFullCharge must be less than (value * 1000).
* Value must be 0 if unknown.
* Value must be positive if known.
+ * Value must be greater than 100 000 uAh.
+ * Value must be less than 100 000 000 uAh.
*/
int32_t batteryFullChargeDesignCapacityUah;
};
diff --git a/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp b/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
index ea69527..deb1a29 100644
--- a/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
+++ b/health/2.1/vts/functional/VtsHalHealthV2_1TargetTest.cpp
@@ -219,6 +219,9 @@
return AssertionFailure() << static_cast<std::underlying_type_t<T>>(value) << " is not valid";
}
+#define FULL_CHARGE_DESIGN_CAP_MIN ((long)100 * 1000)
+#define FULL_CHARGE_DESIGN_CAP_MAX ((long)100000 * 1000)
+
/*
* Tests the values returned by getHealthInfo() from interface IHealth.
*/
@@ -235,12 +238,11 @@
EXPECT_GE(value.batteryFullChargeDesignCapacityUah, 0)
<< "batteryFullChargeDesignCapacityUah should not be negative";
- // Check for extreme outliers
- const auto& legacy = value.legacy.legacy;
- if (value.batteryFullChargeDesignCapacityUah > 0) {
- EXPECT_LT((long)legacy.batteryFullCharge,
- ((long)value.batteryFullChargeDesignCapacityUah * 1000));
- }
+ EXPECT_GT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MIN)
+ << "batteryFullChargeDesignCapacityUah should be greater than 100 mAh";
+
+ EXPECT_LT((long)value.batteryFullChargeDesignCapacityUah, FULL_CHARGE_DESIGN_CAP_MAX)
+ << "batteryFullChargeDesignCapacityUah should be less than 100,000 mAh";
})));
}
diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal
index 530f984..8ee867c 100644
--- a/neuralnetworks/1.3/types.hal
+++ b/neuralnetworks/1.3/types.hal
@@ -5176,8 +5176,10 @@
/**
* The capabilities of a driver.
*
- * Performance of an operation comes from the type of its first operand.
- * This represents performance for non extension operand types.
+ * This represents performance of non-extension operations.
+ *
+ * Performance of an operation other than {@link OperationType::IF} and
+ * {@link OperationType::WHILE} comes from the type of its first operand.
*/
struct Capabilities {
/**
@@ -5200,11 +5202,32 @@
/**
* Performance by operand type. Must be sorted by OperandType.
- * If a particular OperandType is not present in operandPerformance,
+ *
+ * If a particular {@link OperandType} is not present in operandPerformance,
* its performance is treated as
* { .execTime = FLT_MAX, .powerUsage = FLT_MAX }.
+ *
+ * Performance does not apply to {@link OperandType::SUBGRAPH}, and a driver
+ * must not report operand performance for {@link OperandType::SUBGRAPH}.
*/
vec<OperandPerformance> operandPerformance;
+
+ /**
+ * Performance of an {@link OperationType::IF} operation is the sum of
+ * {@link Capabilities::ifPerformance} and the mean of performance for the
+ * two branch subgraphs, where performance for a subgraph is the sum of the
+ * performance of all operations within the subgraph.
+ */
+ PerformanceInfo ifPerformance;
+
+ /**
+ * Performance of a {@link OperationType::WHILE} operation is the sum of
+ * {@link Capabilities::whilePerformance}, performance for the condition
+ * subgraph and performance for the body subgraph, where performance for a
+ * subgraph is the sum of the performance of all operations within the
+ * subgraph.
+ */
+ PerformanceInfo whilePerformance;
};
/**
diff --git a/neuralnetworks/1.3/types.t b/neuralnetworks/1.3/types.t
index 3d0d02d..c663a60 100644
--- a/neuralnetworks/1.3/types.t
+++ b/neuralnetworks/1.3/types.t
@@ -103,8 +103,10 @@
/**
* The capabilities of a driver.
*
- * Performance of an operation comes from the type of its first operand.
- * This represents performance for non extension operand types.
+ * This represents performance of non-extension operations.
+ *
+ * Performance of an operation other than {@link OperationType::IF} and
+ * {@link OperationType::WHILE} comes from the type of its first operand.
*/
struct Capabilities {
/**
@@ -127,11 +129,32 @@
/**
* Performance by operand type. Must be sorted by OperandType.
- * If a particular OperandType is not present in operandPerformance,
+ *
+ * If a particular {@link OperandType} is not present in operandPerformance,
* its performance is treated as
* { .execTime = FLT_MAX, .powerUsage = FLT_MAX }.
+ *
+ * Performance does not apply to {@link OperandType::SUBGRAPH}, and a driver
+ * must not report operand performance for {@link OperandType::SUBGRAPH}.
*/
vec<OperandPerformance> operandPerformance;
+
+ /**
+ * Performance of an {@link OperationType::IF} operation is the sum of
+ * {@link Capabilities::ifPerformance} and the mean of performance for the
+ * two branch subgraphs, where performance for a subgraph is the sum of the
+ * performance of all operations within the subgraph.
+ */
+ PerformanceInfo ifPerformance;
+
+ /**
+ * Performance of a {@link OperationType::WHILE} operation is the sum of
+ * {@link Capabilities::whilePerformance}, performance for the condition
+ * subgraph and performance for the body subgraph, where performance for a
+ * subgraph is the sum of the performance of all operations within the
+ * subgraph.
+ */
+ PerformanceInfo whilePerformance;
};
/**
diff --git a/neuralnetworks/1.3/vts/functional/BasicTests.cpp b/neuralnetworks/1.3/vts/functional/BasicTests.cpp
index 891850c..1c25369 100644
--- a/neuralnetworks/1.3/vts/functional/BasicTests.cpp
+++ b/neuralnetworks/1.3/vts/functional/BasicTests.cpp
@@ -57,6 +57,11 @@
[](const OperandPerformance& a, const OperandPerformance& b) {
return a.type < b.type;
}));
+ EXPECT_TRUE(std::all_of(opPerf.begin(), opPerf.end(), [](const OperandPerformance& a) {
+ return a.type != OperandType::SUBGRAPH;
+ }));
+ EXPECT_TRUE(isPositive(capabilities.ifPerformance));
+ EXPECT_TRUE(isPositive(capabilities.whilePerformance));
});
EXPECT_TRUE(ret.isOk());
}
diff --git a/tv/tuner/1.0/types.hal b/tv/tuner/1.0/types.hal
index e4874f4..dd2b48f 100644
--- a/tv/tuner/1.0/types.hal
+++ b/tv/tuner/1.0/types.hal
@@ -1924,7 +1924,7 @@
};
@export
-enum Constant : uint16_t {
+enum Constant : uint32_t {
/**
* An invalid packet ID in transport stream according to ISO/IEC 13818-1.
*/
@@ -1933,6 +1933,14 @@
* An invalid Stream ID.
*/
INVALID_STREAM_ID = 0xFFFF,
+ /**
+ * An invalid Filter ID.
+ */
+ INVALID_FILTER_ID = 0xFFFFFFFF,
+ /**
+ * An invalid AV sync hardware ID.
+ */
+ INVALID_AV_SYNC_ID = 0xFFFFFFFF,
};
/**
@@ -2151,19 +2159,37 @@
*/
struct DemuxIpAddress {
safe_union SrcIpAddress {
+ /**
+ * 0.0.0.0 is invalid. should be ignored.
+ */
uint8_t[4] v4;
+ /**
+ * 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 is invalid. should be ignored.
+ */
uint8_t[16] v6;
} srcIpAddress;
safe_union DstIpAddress {
+ /**
+ * 0.0.0.0 is invalid. should be ignored.
+ */
uint8_t[4] v4;
+ /**
+ * 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 is invalid. should be ignored.
+ */
uint8_t[16] v6;
} dstIpAddress;
+ /**
+ * 0 is invalid. should be ignored.
+ */
uint16_t srcPort;
+ /**
+ * 0 is invalid. should be ignored.
+ */
uint16_t dstPort;
};