Merge "Fix clang-tidy performance warnings in libhardware." am: 1c1e311e06 am: 5f366ef448 am: 90383959ac
am: 31a6b95815
Change-Id: I6dcc98594a1f0861fa4af489eeb824562ad16bb4
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index ec7fd4b..3b734f7 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -147,6 +147,9 @@
/* Enable mono audio playback if 1, else should be 0. */
#define AUDIO_PARAMETER_MONO_OUTPUT "mono_output"
+/* Enable AANC */
+#define AUDIO_PARAMETER_KEY_AANC "aanc_enabled"
+
/**
* audio codec parameters
*/
diff --git a/include/hardware/fingerprint.h b/include/hardware/fingerprint.h
index 618ca7e..e7c825f 100644
--- a/include/hardware/fingerprint.h
+++ b/include/hardware/fingerprint.h
@@ -18,10 +18,12 @@
#define ANDROID_INCLUDE_HARDWARE_FINGERPRINT_H
#include <hardware/hw_auth_token.h>
+#include <hardware/hardware.h>
#define FINGERPRINT_MODULE_API_VERSION_1_0 HARDWARE_MODULE_API_VERSION(1, 0)
#define FINGERPRINT_MODULE_API_VERSION_2_0 HARDWARE_MODULE_API_VERSION(2, 0)
#define FINGERPRINT_MODULE_API_VERSION_2_1 HARDWARE_MODULE_API_VERSION(2, 1)
+#define FINGERPRINT_MODULE_API_VERSION_3_0 HARDWARE_MODULE_API_VERSION(3, 0)
#define FINGERPRINT_HARDWARE_MODULE_ID "fingerprint"
typedef enum fingerprint_msg_type {
@@ -84,14 +86,13 @@
uint64_t msg; /* Vendor specific message. Used for user guidance */
} fingerprint_enroll_t;
-typedef struct fingerprint_enumerated {
+typedef struct fingerprint_iterator {
fingerprint_finger_id_t finger;
uint32_t remaining_templates;
-} fingerprint_enumerated_t;
+} fingerprint_iterator_t;
-typedef struct fingerprint_removed {
- fingerprint_finger_id_t finger;
-} fingerprint_removed_t;
+typedef fingerprint_iterator_t fingerprint_enumerated_t;
+typedef fingerprint_iterator_t fingerprint_removed_t;
typedef struct fingerprint_acquired {
fingerprint_acquired_info_t acquired_info; /* information about the image */
@@ -206,7 +207,7 @@
/*
* Enumerate all the fingerprint templates found in the directory set by
* set_active_group()
- * For each template found notify() will be called with:
+ * For each template found a notify() will be called with:
* fingerprint_msg.type == FINGERPRINT_TEMPLATE_ENUMERATED
* fingerprint_msg.data.enumerated.finger indicating a template id
* fingerprint_msg.data.enumerated.remaining_templates indicating how many more
@@ -221,9 +222,14 @@
* Fingerprint remove request:
* Deletes a fingerprint template.
* Works only within the path set by set_active_group().
- * notify() will be called with details on the template deleted.
- * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED and
- * fingerprint_msg.data.removed.finger indicating the template id removed.
+ * The fid parameter can be used as a widcard:
+ * * fid == 0 -- delete all the templates in the group.
+ * * fid != 0 -- delete this specific template from the group.
+ * For each template found a notify() will be called with:
+ * fingerprint_msg.type == FINGERPRINT_TEMPLATE_REMOVED
+ * fingerprint_msg.data.removed.finger indicating a template id deleted
+ * fingerprint_msg.data.removed.remaining_templates indicating how many more
+ * templates will be deleted by this operation.
*
* Function return: 0 if fingerprint template(s) can be successfully deleted
* or a negative number in case of error, generally from the errno.h set.
diff --git a/include/hardware/sensors.h b/include/hardware/sensors.h
index 1d73c31..aa458a1 100644
--- a/include/hardware/sensors.h
+++ b/include/hardware/sensors.h
@@ -803,7 +803,8 @@
* system. At most one sensor of this type can be present in one sensor HAL implementation and
* presence of a sensor of this type in sensor HAL implementation indicates that this sensor HAL
* supports dynamic sensor feature. Operations, such as batch, activate and setDelay, to this
- * special purpose sensor should be treated as no-op and return successful.
+ * special purpose sensor should be treated as no-op and return successful; flush() also
+ * has to generate flush complete event as if this is a sensor that does not support batching.
*
* A dynamic sensor connection indicates connection of a physical device or instantiation of a
* virtual sensor backed by algorithm; and a dynamic sensor disconnection indicates the the
@@ -1328,7 +1329,13 @@
int sensor_handle, int64_t sampling_period_ns);
/**
- * Returns an array of sensor data.
+ * Write an array of sensor_event_t to data. The size of the
+ * available buffer is specified by count. Returns number of
+ * valid sensor_event_t.
+ *
+ * This function should block if there is no sensor event
+ * available when being called. Thus, return value should always be
+ * positive.
*/
int (*poll)(struct sensors_poll_device_t *dev,
sensors_event_t* data, int count);
diff --git a/include/hardware/vehicle.h b/include/hardware/vehicle.h
index a590fbd..da11407 100644
--- a/include/hardware/vehicle.h
+++ b/include/hardware/vehicle.h
@@ -122,7 +122,7 @@
* @data_member info_model_year
* @unit VEHICLE_UNIT_TYPE_YEAR
*/
-#define VEHICLE_PROPERTY_INFO_MODEL_YEAR (0x00000103)
+#define VEHICLE_PROPERTY_INFO_MODEL_YEAR (0x00000103)
/**
* Fuel capacity of the vehicle
@@ -253,7 +253,7 @@
- //==== HVAC Properties ====
+//==== HVAC Properties ====
/**
* Fan speed setting
@@ -293,7 +293,7 @@
/**
* HVAC current temperature.
* @value_type VEHICLE_VALUE_TYPE_ZONED_FLOAT
- * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE|VEHICLE_PROP_CHANGE_MODE_CONTINUOUS
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @zone_type VEHICLE_ZONE
* @data_member hvac.temperature_current
@@ -303,7 +303,7 @@
/**
* HVAC, target temperature set.
* @value_type VEHICLE_VALUE_TYPE_ZONED_FLOAT
- * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE|VEHICLE_PROP_CHANGE_MODE_CONTINUOUS
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @zone_type VEHICLE_ZONE
* @data_member hvac.temperature_set
@@ -373,6 +373,34 @@
#define VEHICLE_PROPERTY_HVAC_DUAL_ON (0x00000509)
/**
+ * On/off automatic mode
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_ZONE
+ * @data_member hvac.auto_on
+ */
+#define VEHICLE_PROPERTY_HVAC_AUTO_ON (0x0000050A)
+
+/**
+ * Seat temperature
+ *
+ * Negative values indicate cooling.
+ * 0 indicates off.
+ * Positive values indicate heating.
+ *
+ * Some vehicles may have multiple levels of heating and cooling. The min/max
+ * range defines the allowable range and number of steps in each direction.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_HVAC_SEAT_TEMPERATURE (0x0000050B)
+
+/**
* Represents power state for HVAC. Some HVAC properties will require matching power to be turned on
* to get out of OFF state. For non-zoned HVAC properties, VEHICLE_ALL_ZONE corresponds to
* global power state.
@@ -396,8 +424,7 @@
* @data_member outside_temperature
* @unit VEHICLE_UNIT_TYPE_CELCIUS
*/
-
-#define VEHICLE_PROPERTY_ENV_OUTSIDE_TEMPERATURE (0x00000703)
+#define VEHICLE_PROPERTY_ENV_OUTSIDE_TEMPERATURE (0x00000703)
/**
@@ -408,7 +435,7 @@
* @data_member cabin_temperature
* @unit VEHICLE_UNIT_TYPE_CELCIUS
*/
-#define VEHICLE_PROPERTY_ENV_CABIN_TEMPERATURE (0x00000704)
+#define VEHICLE_PROPERTY_ENV_CABIN_TEMPERATURE (0x00000704)
/*
@@ -434,7 +461,7 @@
* @config_flags Number of presets supported
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_RADIO_PRESET (0x0000801)
+#define VEHICLE_PROPERTY_RADIO_PRESET (0x0000801)
/**
* Constants relevant to radio.
@@ -492,7 +519,13 @@
* VEHICLE_AUDIO_EXT_FOCUS_CAR_PERMANENT when car side is playing something
* permanent.
* LOSS_TRANSIENT: always should be VEHICLE_AUDIO_EXT_FOCUS_CAR_TRANSIENT
- * int32_array[3]: should be zero.
+ * int32_array[3]: context requested by android side when responding to focus request.
+ * When car side is taking focus away, this should be zero.
+ *
+ * A focus response should be sent per each focus request even if there is no change in
+ * focus state. This can happen in case like focus request only involving context change
+ * where android side still needs matching focus response to confirm that audio module
+ * has made necessary changes.
*
* If car does not support VEHICLE_PROPERTY_AUDIO_FOCUS, focus is assumed to be granted always.
*
@@ -501,7 +534,7 @@
* @access VEHICLE_PROP_ACCESS_READ_WRITE
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_FOCUS (0x00000900)
+#define VEHICLE_PROPERTY_AUDIO_FOCUS (0x00000900)
enum vehicle_audio_focus_request {
VEHICLE_AUDIO_FOCUS_REQUEST_GAIN = 0x1,
@@ -638,13 +671,23 @@
VEHICLE_AUDIO_CONTEXT_SYSTEM_SOUND_FLAG = 0x400,
/** Radio is played */
VEHICLE_AUDIO_CONTEXT_RADIO_FLAG = 0x800,
+ /** Ext source is played. This is for tagging generic ext sources. */
+ VEHICLE_AUDIO_CONTEXT_EXT_SOURCE_FLAG = 0x1000,
};
/**
* Property to control audio volume of each audio context.
*
+ * vehicle_prop_config_t
+ * config_array[0] : bit flags of all supported audio contexts. If this is 0,
+ * audio volume is controlled per physical stream
+ * config_array[1] : flags defined in vehicle_audio_volume_capability_flag to
+ * represent audio module's capability.
+ *
* Data type looks like:
- * int32_array[0] : stream context as defined in vehicle_audio_context_flag.
+ * int32_array[0] : stream context as defined in vehicle_audio_context_flag. If only physical
+ stream is supported (config_array[0] == 0), this will represent physical
+ stream number.
* int32_array[1] : volume level, valid range is 0 to int32_max_value defined in config.
* 0 will be mute state. int32_min_value in config should be always 0.
* int32_array[2] : One of vehicle_audio_volume_state.
@@ -658,7 +701,34 @@
* @config_flags all audio contexts supported.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_VOLUME (0x00000901)
+#define VEHICLE_PROPERTY_AUDIO_VOLUME (0x00000901)
+
+
+/**
+ * flags to represent capability of audio volume property.
+ * used in config_array[1] of vehicle_prop_config_t.
+ */
+enum vehicle_audio_volume_capability_flag {
+ /**
+ * External audio module or vehicle hal has persistent storage
+ * to keep the volume level. This should be set only when per context
+ * volume level is supproted. When this is set, audio volume level per
+ * each context will be retrieved from the property when systen starts up.
+ * And external audio module is also expected to adjust volume automatically
+ * whenever there is an audio context change.
+ * When this flag is not set, android side will assume that there is no
+ * persistent storage and stored value in android side will be used to
+ * initialize the volume level. And android side will set volume level
+ * of each physical streams whenever there is an audio context change.
+ */
+ VEHICLE_AUDIO_VOLUME_CAPABILITY_PERSISTENT_STORAGE = 0x1,
+ /**
+ * When this flag is set, the H/W can support only single master volume for all streams.
+ * There is no way to set volume level differently per each stream or context.
+ */
+ VEHICLE_AUDIO_VOLUME_CAPABILITY_MASTER_VOLUME_ONLY = 0x2,
+};
+
/**
* enum to represent audio volume state.
@@ -683,8 +753,18 @@
/**
* Property for handling volume limit set by user. This limits maximum volume that can be set
- * per each context.
- * int32_array[0] : stream context as defined in vehicle_audio_context_flag.
+ * per each context or physical stream.
+ *
+ * vehicle_prop_config_t
+ * config_array[0] : bit flags of all supported audio contexts. If this is 0,
+ * audio volume is controlled per physical stream
+ * config_array[1] : flags defined in vehicle_audio_volume_capability_flag to
+ * represent audio module's capability.
+ *
+ * Data type looks like:
+ * int32_array[0] : stream context as defined in vehicle_audio_context_flag. If only physical
+ * stream is supported (config_array[0] == 0), this will represent physical
+ * stream number.
* int32_array[1] : maximum volume set to the stream. If there is no restriction, this value
* will be bigger than VEHICLE_PROPERTY_AUDIO_VOLUME's max value.
*
@@ -698,7 +778,7 @@
* @config_flags all audio contexts supported.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT (0x00000902)
+#define VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT (0x00000902)
/**
* Index in int32_array for VEHICLE_PROPERTY_AUDIO_VOLUME_LIMIT property.
@@ -727,7 +807,7 @@
* @access VEHICLE_PROP_ACCESS_WRITE
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY (0x00000903)
+#define VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY (0x00000903)
/**
* Index in int32_array for VEHICLE_PROPERTY_AUDIO_ROUTING_POLICY property.
@@ -750,7 +830,7 @@
* this.
* @data_member int32_value
*/
-#define VEHICLE_PROPERTY_AUDIO_HW_VARIANT (0x00000904)
+#define VEHICLE_PROPERTY_AUDIO_HW_VARIANT (0x00000904)
/**
* Flag to be used in vehicle_prop_config.config_flags for VEHICLE_PROPERTY_AUDIO_HW_VARIANT.
@@ -766,6 +846,70 @@
VEHICLE_AUDIO_HW_VARIANT_FLAG_INTERNAL_RADIO_FLAG = 0x1,
};
+/** audio routing for AM/FM. This should be also be the value when there is only one
+ radio module in the system. */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_AM_FM "RADIO_AM_FM"
+/** Should be added only when there is a separate radio module with HD capability. */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_AM_FM_HD "RADIO_AM_FM_HD"
+/** For digial audio broadcasting type of radio */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_DAB "RADIO_DAB"
+/** For satellite type of radio */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_RADIO_SATELLITE "RADIO_SATELLITE"
+/** For CD or DVD */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_CD_DVD "CD_DVD"
+/** For 1st auxiliary input */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_AUX_IN0 "AUX_IN0"
+/** For 2nd auxiliary input */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_AUX_IN1 "AUX_IN1"
+/** For navigation guidance from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_NAV_GUIDANCE "EXT_NAV_GUIDANCE"
+/** For voice command from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_VOICE_COMMAND "EXT_VOICE_COMMAND"
+/** For voice call from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_VOICE_CALL "EXT_VOICE_CALL"
+/** For safety alert from outside android */
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_EXT_SAFETY_ALERT "EXT_SAFETY_ALERT"
+
+/**
+* Property to pass hint on external audio routing. When android side request focus
+* with VEHICLE_AUDIO_EXT_FOCUS_CAR_PLAY_ONLY_FLAG flag, this property will be set
+* before setting AUDIO_FOCUS property as a hint for external audio source routing.
+* Note that setting this property alone should not trigger any change.
+* Audio routing should be changed only when AUDIO_FOCUS property is set. Note that
+* this property allows passing custom value as long as it is defined in config_string.
+* This allows supporting non-standard routing options through this property.
+* It is recommended to use separate name space for custom property to prevent conflict in future
+* android releases.
+* Enabling each external routing option is done by enabling each bit flag for the routing.
+* This property can support up to 128 external routings.
+* To give full flexibility, there is no standard definition for each bit flag and
+* assigning each big flag to specific routing type is decided by config_string.
+* config_string has format of each entry separated by ','
+* and each entry has format of bitFlagPositon:typeString[:physicalStreamNumber].
+* bitFlagPosition: represents which big flag will be set to enable this routing. 0 means
+* LSB in int32_array[0]. 31 will be MSB in int32_array[0]. 127 will MSB in int32_array[3].
+* typeString: string representation of external routing. Some types are already defined
+* in VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_SOURCE_* and use them first before adding something
+* custom. Applications will find each routing using this string.
+* physicalStreamNumber: This part is optional and represents physical stream to android
+* which will be disabled when this routing is enabled. If not specified, this routing
+* should not affect physical streams to android.
+* As an example, let's assume a system with two physical streams, 0 for media and 1 for
+* nav guidance. And let's assume external routing option of am fm radio, external navigation
+* guidance, satellite radio, and one custom. Let's assume that radio and satellite replaces
+* physical stream 0 and external navigation replaces physical stream 1. And bit flag will be
+* assigned in the order listed above. This configuration will look like this in config_string:
+* "0:RADIO_AM_FM:0,1:EXT_NAV_GUIDANCE:1,2:RADIO_SATELLITE:0,3:com.test.SOMETHING_CUSTOM"
+* When android requests RADIO_AM_FM, int32_array[0] will be set to 0x1.
+* When android requests RADIO_SATELLITE + EXT_NAV_GUIDANCE, int32_array[0] will be set to 0x2|0x4.
+*
+* @value_type VEHICLE_VALUE_TYPE_INT32_VEC4
+* @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+* @access VEHICLE_PROP_ACCESS_WRITE|VEHICLE_PROP_ACCESS_READ_WRITE
+* @config_string List of all avaiable external source in the system.
+* @data_member int32_array
+*/
+#define VEHICLE_PROPERTY_AUDIO_EXT_ROUTING_HINT (0x00000905)
/**
* Property to control power state of application processor.
@@ -788,7 +932,7 @@
* @config_flags Additional info on power state. Should use vehicle_ap_power_state_config_flag.
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_AP_POWER_STATE (0x00000A00)
+#define VEHICLE_PROPERTY_AP_POWER_STATE (0x00000A00)
enum vehicle_ap_power_state_config_flag {
/**
@@ -895,7 +1039,7 @@
* @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_READ_WRITE
* @data_member int32
*/
-#define VEHICLE_PROPERTY_DISPLAY_BRIGHTNESS (0x00000A01)
+#define VEHICLE_PROPERTY_DISPLAY_BRIGHTNESS (0x00000A01)
/**
@@ -999,7 +1143,7 @@
* @config_array 0:vehicle_instument_cluster_type 1:hw type
* @data_member int32_array
*/
-#define VEHICLE_PROPERTY_INSTRUMENT_CLUSTER_INFO (0x00000A20)
+#define VEHICLE_PROPERTY_INSTRUMENT_CLUSTER_INFO (0x00000A20)
/**
* Represents instrument cluster type available in system
@@ -1019,6 +1163,630 @@
};
/**
+ * Current date and time, encoded as Unix time.
+ * This value denotes the number of seconds that have elapsed since 1/1/1970.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT64
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_SET
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int64_value
+ * @unit VEHICLE_UNIT_TYPE_SECS
+ */
+#define VEHICLE_PROPERTY_UNIX_TIME (0x00000A30)
+
+/**
+ * Current time only.
+ * Some vehicles may not keep track of date. This property only affects the current time, in
+ * seconds during the day. Thus, the max value for this parameter is 86,400 (24 * 60 * 60)
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_SET
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ * @unit VEHICLE_UNIT_TYPE_SECS
+ */
+#define VEHICLE_PROPERTY_CURRENT_TIME_IN_SECONDS (0x00000A31)
+
+
+//==== Car Cabin Properties ====
+/**
+ * Most Car Cabin properties have both a MOVE and POSITION parameter associated with them.
+ *
+ * The MOVE parameter will start moving the device in the indicated direction. The magnitude
+ * indicates the relative speed. For instance, setting the WINDOW_MOVE parameter to +1 will roll
+ * the window up. Setting it to +2 (if available) will roll it up faster.
+ *
+ * The POSITION parameter will move the device to the desired position. For instance, if the
+ * WINDOW_POS has a range of 0-100, then setting this parameter to 50 will open the window halfway.
+ * Depending upon the initial position, the window may move up or down to the 50% value.
+ *
+ * OEMs may choose to implement one or both of the MOVE/POSITION parameters depending upon the
+ * capability of the hardware.
+ */
+
+// Doors
+/**
+ * Door position
+ *
+ * This is an integer in case a door may be set to a particular position. Max
+ * value indicates fully open, min value (0) indicates fully closed.
+ *
+ * Some vehicles (minivans) can open the door electronically. Hence, the ability
+ * to write this property.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_DOOR_POS (0x00000B00)
+
+/**
+ * Door move
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_DOOR_MOVE (0x00000B01)
+
+
+/**
+ * Door lock
+ *
+ * 'true' indicates door is locked
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_DOOR
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_DOOR_LOCK (0x00000B02)
+
+// Mirrors
+/**
+ * Mirror Z Position
+ *
+ * Positive value indicates tilt upwards, negative value is downwards
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Z_POS (0x00000B40)
+
+/**
+ * Mirror Z Move
+ *
+ * Positive value indicates tilt upwards, negative value is downwards
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Z_MOVE (0x00000B41)
+
+/**
+ * Mirror Y Position
+ *
+ * Positive value indicate tilt right, negative value is left
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Y_POS (0x00000B42)
+
+/**
+ * Mirror Y Move
+ *
+ * Positive value indicate tilt right, negative value is left
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_MIRROR
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_Y_MOVE (0x00000B43)
+
+/**
+ * Mirror Lock
+ *
+ * True indicates mirror positions are locked and not changeable
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_LOCK (0x00000B44)
+
+/**
+ * Mirror Heat
+ *
+ * Increase values denote higher heating levels.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_HEAT (0x00000B45)
+
+/**
+ * Mirror Fold
+ *
+ * True indicates mirrors are folded
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_MIRROR_FOLD (0x00000B46)
+
+// Seats
+/**
+ * Seat memory select
+ *
+ * This parameter selects the memory preset to use to select the seat position.
+ * The minValue is always 0, and the maxValue determines the number of seat
+ * positions available.
+ *
+ * For instance, if the driver's seat has 3 memory presets, the maxValue will be 3.
+ * When the user wants to select a preset, the desired preset number (1, 2, or 3)
+ * is set.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_MEMORY_SELECT (0x00000B80)
+
+/**
+ * Seat memory set
+ *
+ * This setting allows the user to save the current seat position settings into
+ * the selected preset slot. The maxValue for each seat position shall match
+ * the maxValue for VEHICLE_PROPERTY_SEAT_MEMORY_SELECT.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_MEMORY_SET (0x00000B81)
+
+/**
+ * Seatbelt buckled
+ *
+ * True indicates belt is buckled.
+ *
+ * Write access indicates automatic seat buckling capabilities. There are no known cars at this
+ * time, but you never know...
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_BUCKLED (0x00000B82)
+
+/**
+ * Seatbelt height position
+ *
+ * Adjusts the shoulder belt anchor point.
+ * Max value indicates highest position
+ * Min value indicates lowest position
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_POS (0x00000B83)
+
+/**
+ * Seatbelt height move
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BELT_HEIGHT_MOVE (0x00000B84)
+
+/**
+ * Seat fore/aft position
+ *
+ * Sets the seat position forward (closer to steering wheel) and backwards.
+ * Max value indicates closest to wheel, min value indicates most rearward
+ * position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_FORE_AFT_POS (0x00000B85)
+
+/**
+ * Seat fore/aft move
+ *
+ * Moves the seat position forward and aft.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_FORE_AFT_MOVE (0x00000B86)
+
+/**
+ * Seat backrest angle 1 position
+ *
+ * Backrest angle 1 is the actuator closest to the bottom of the seat.
+ * Max value indicates angling forward towards the steering wheel.
+ * Min value indicates full recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_POS (0x00000B87)
+
+/**
+ * Seat backrest angle 1 move
+ *
+ * Moves the backrest forward or recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_1_MOVE (0x00000B88)
+
+/**
+ * Seat backrest angle 2 position
+ *
+ * Backrest angle 2 is the next actuator up from the bottom of the seat.
+ * Max value indicates angling forward towards the steering wheel.
+ * Min value indicates full recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_POS (0x00000B89)
+
+/**
+ * Seat backrest angle 2 move
+ *
+ * Moves the backrest forward or recline.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_BACKREST_ANGLE_2_MOVE (0x00000B8A)
+
+/**
+ * Seat height position
+ *
+ * Sets the seat height.
+ * Max value indicates highest position.
+ * Min value indicates lowest position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEIGHT_POS (0x00000B8B)
+
+/**
+ * Seat height move
+ *
+ * Moves the seat height.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEIGHT_MOVE (0x00000B8C)
+
+/**
+ * Seat depth position
+ *
+ * Sets the seat depth, distance from back rest to front edge of seat.
+ * Max value indicates longest depth position.
+ * Min value indicates shortest position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_DEPTH_POS (0x00000B8D)
+
+/**
+ * Seat depth move
+ *
+ * Adjusts the seat depth.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_DEPTH_MOVE (0x00000B8E)
+
+/**
+ * Seat tilt position
+ *
+ * Sets the seat tilt.
+ * Max value indicates front edge of seat higher than back edge.
+ * Min value indicates front edge of seat lower than back edge.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_TILT_POS (0x00000B8F)
+
+/**
+ * Seat tilt move
+ *
+ * Tilts the seat.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_TILT_MOVE (0x00000B90)
+
+/**
+ * Lumber fore/aft position
+ *
+ * Pushes the lumbar support forward and backwards
+ * Max value indicates most forward position.
+ * Min value indicates most rearward position.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_POS (0x00000B91)
+
+/**
+ * Lumbar fore/aft move
+ *
+ * Adjusts the lumbar support.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_FORE_AFT_MOVE (0x00000B92)
+
+/**
+ * Lumbar side support position
+ *
+ * Sets the amount of lateral lumbar support.
+ * Max value indicates widest lumbar setting (i.e. least support)
+ * Min value indicates thinnest lumbar setting.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_POS (0x00000B93)
+
+/**
+ * Lumbar side support move
+ *
+ * Adjusts the amount of lateral lumbar support.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_LUMBAR_SIDE_SUPPORT_MOVE (0x00000B94)
+
+/**
+ * Headrest height position
+ *
+ * Sets the headrest height.
+ * Max value indicates tallest setting.
+ * Min value indicates shortest setting.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_POS (0x00000B95)
+
+/**
+ * Headrest heigh move
+ *
+ * Moves the headrest up and down.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_HEIGHT_MOVE (0x00000B96)
+
+/**
+ * Headrest angle position
+ *
+ * Sets the angle of the headrest.
+ * Max value indicates most upright angle.
+ * Min value indicates shallowest headrest angle.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_POS (0x00000B97)
+
+/**
+ * Headrest angle move
+ *
+ * Adjusts the angle of the headrest
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_ANGLE_MOVE (0x00000B98)
+
+/**
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_POS (0x00000B99)
+
+/**
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @zone_type VEHICLE_SEAT
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_SEAT_HEADREST_FORE_AFT_MOVE (0x00000B9A)
+
+
+// Windows
+/**
+ * Window Position
+ *
+ * Max = window up / closed
+ * Min = window down / open
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_POS (0x00000BC0)
+
+/**
+ * Window Move
+ *
+ * Max = window up / closed
+ * Min = window down / open
+ * Magnitude denotes relative speed. I.e. +2 is faster than +1 in raising the window.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_MOVE (0x00000BC1)
+
+/**
+ * Window Vent Position
+ *
+ * This feature is used to control the vent feature on a sunroof.
+ *
+ * Max = vent open
+ * Min = vent closed
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_VENT_POS (0x00000BC2)
+
+/**
+ * Window Vent Move
+ *
+ * This feature is used to control the vent feature on a sunroof.
+ *
+ * Max = vent open
+ * Min = vent closed
+ *
+ * @value_type VEHICLE_VALUE_TYPE_ZONED_INT32
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE|VEHICLE_PROP_ACCESS_WRITE
+ * @data_member int32_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_VENT_MOVE (0x00000BC3)
+
+/**
+ * Window Lock
+ *
+ * True indicates windows are locked and can't be moved.
+ *
+ * @value_type VEHICLE_VALUE_TYPE_BOOLEAN
+ * @change_mode VEHICLE_PROP_CHANGE_MODE_ON_CHANGE
+ * @access VEHICLE_PROP_ACCESS_READ_WRITE
+ * @data_member boolean_value
+ */
+#define VEHICLE_PROPERTY_WINDOW_LOCK (0x00000BC4)
+
+
+
+/**
* H/W specific, non-standard property can be added as necessary. Such property should use
* property number in range of [VEHICLE_PROPERTY_CUSTOM_START, VEHICLE_PROPERTY_CUSTOM_END].
* Definition of property in this range is completely up to each HAL implementation.
@@ -1027,20 +1795,20 @@
* include config_string of "com.XYZ.some_further_details".
* @range_start
*/
-#define VEHICLE_PROPERTY_CUSTOM_START (0x70000000)
+#define VEHICLE_PROPERTY_CUSTOM_START (0x70000000)
/** @range_end */
-#define VEHICLE_PROPERTY_CUSTOM_END (0x73ffffff)
+#define VEHICLE_PROPERTY_CUSTOM_END (0x73ffffff)
/**
* Property range allocated for system's internal usage like testing. HAL should never declare
* property in this range.
* @range_start
*/
-#define VEHICLE_PROPERTY_INTERNAL_START (0x74000000)
+#define VEHICLE_PROPERTY_INTERNAL_START (0x74000000)
/**
* @range_end
*/
-#define VEHICLE_PROPERTY_INTERNAL_END (0x74ffffff)
+#define VEHICLE_PROPERTY_INTERNAL_END (0x74ffffff)
/**
* Value types for various properties.
@@ -1091,7 +1859,7 @@
VEHICLE_UNIT_TYPE_MILLILITER = 0x00000040,
// time
VEHICLE_UNIT_TYPE_NANO_SECS = 0x00000050,
- VEHICLE_UNOT_TYPE_SECS = 0x00000053,
+ VEHICLE_UNIT_TYPE_SECS = 0x00000053,
VEHICLE_UNIT_TYPE_YEAR = 0x00000059,
};
@@ -1105,8 +1873,12 @@
*/
VEHICLE_PROP_CHANGE_MODE_STATIC = 0x00,
/**
- * Property of this type will be reported when there is a change. get should return the
- * current value.
+ * Property of this type will be reported when there is a change.
+ * get call should return the current value.
+ * Set operation for this property is assumed to be asynchronous. When the property is read
+ * (get) after set, it may still return old value until underlying H/W backing this property
+ * has actually changed the state. Once state is changed, the property will dispatch changed
+ * value as event.
*/
VEHICLE_PROP_CHANGE_MODE_ON_CHANGE = 0x01,
/**
@@ -1114,6 +1886,18 @@
* the data.
*/
VEHICLE_PROP_CHANGE_MODE_CONTINUOUS = 0x02,
+ /**
+ * Property of this type may be polled to get the current value.
+ */
+ VEHICLE_PROP_CHANGE_MODE_POLL = 0x03,
+ /**
+ * This is for property where change event should be sent only when the value is
+ * set from external component. Normal value change will not trigger event.
+ * For example, clock property can send change event only when it is set, outside android,
+ * for case like user setting time or time getting update. There is no need to send it
+ * per every value change.
+ */
+ VEHICLE_PROP_CHANGE_MODE_ON_SET = 0x04,
};
/**
@@ -1468,6 +2252,7 @@
vehicle_boolean_t max_defrost_on;
vehicle_boolean_t recirc_on;
vehicle_boolean_t dual_on;
+ vehicle_boolean_t auto_on;
vehicle_boolean_t power_on;
float temperature_current;
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index 68b0d3a..35901e4 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -119,7 +119,7 @@
static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
size_t bytes)
{
- ALOGV("out_write: bytes: %d", bytes);
+ ALOGV("out_write: bytes: %zu", bytes);
/* XXX: fake timing for audio output */
struct stub_stream_out *out = (struct stub_stream_out *)stream;
@@ -242,7 +242,7 @@
static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
size_t bytes)
{
- ALOGV("in_read: bytes %d", bytes);
+ ALOGV("in_read: bytes %zu", bytes);
/* XXX: fake timing for audio input */
struct stub_stream_in *in = (struct stub_stream_in *)stream;
diff --git a/modules/hwcomposer/hwcomposer.cpp b/modules/hwcomposer/hwcomposer.cpp
index 9d1aa34..7b2e278 100644
--- a/modules/hwcomposer/hwcomposer.cpp
+++ b/modules/hwcomposer/hwcomposer.cpp
@@ -38,18 +38,18 @@
struct hw_device_t** device);
static struct hw_module_methods_t hwc_module_methods = {
- open: hwc_device_open
+ .open = hwc_device_open
};
hwc_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 1,
- version_minor: 0,
- id: HWC_HARDWARE_MODULE_ID,
- name: "Sample hwcomposer module",
- author: "The Android Open Source Project",
- methods: &hwc_module_methods,
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 1,
+ .version_minor = 0,
+ .id = HWC_HARDWARE_MODULE_ID,
+ .name = "Sample hwcomposer module",
+ .author = "The Android Open Source Project",
+ .methods = &hwc_module_methods,
}
};
@@ -68,8 +68,8 @@
l->displayFrame.bottom);
}
-static int hwc_prepare(hwc_composer_device_1_t *dev,
- size_t numDisplays, hwc_display_contents_1_t** displays) {
+static int hwc_prepare(hwc_composer_device_1_t * /*dev*/,
+ size_t /*numDisplays*/, hwc_display_contents_1_t** displays) {
if (displays && (displays[0]->flags & HWC_GEOMETRY_CHANGED)) {
for (size_t i=0 ; i<displays[0]->numHwLayers ; i++) {
//dump_layer(&list->hwLayers[i]);
@@ -79,16 +79,16 @@
return 0;
}
-static int hwc_set(hwc_composer_device_1_t *dev,
- size_t numDisplays, hwc_display_contents_1_t** displays)
+static int hwc_set(hwc_composer_device_1_t * /*dev*/,
+ size_t /*numDisplays*/, hwc_display_contents_1_t** displays)
{
//for (size_t i=0 ; i<list->numHwLayers ; i++) {
// dump_layer(&list->hwLayers[i]);
//}
- EGLBoolean sucess = eglSwapBuffers((EGLDisplay)displays[0]->dpy,
+ EGLBoolean success = eglSwapBuffers((EGLDisplay)displays[0]->dpy,
(EGLSurface)displays[0]->sur);
- if (!sucess) {
+ if (!success) {
return HWC_EGL_ERROR;
}
return 0;
diff --git a/modules/input/evdev/InputHub.cpp b/modules/input/evdev/InputHub.cpp
index 389955d..e2c65fa 100644
--- a/modules/input/evdev/InputHub.cpp
+++ b/modules/input/evdev/InputHub.cpp
@@ -610,7 +610,7 @@
for (;;) {
ssize_t readSize = TEMP_FAILURE_RETRY(read(inputFd, ievs, sizeof(ievs)));
if (readSize == 0 || (readSize < 0 && errno == ENODEV)) {
- ALOGW("could not get event, removed? (fd: %d, size: %d errno: %d)",
+ ALOGW("could not get event, removed? (fd: %d, size: %zd errno: %d)",
inputFd, readSize, errno);
removedDeviceFds.push_back(inputFd);
@@ -621,7 +621,7 @@
}
break;
} else if (readSize % sizeof(input_event) != 0) {
- ALOGE("could not get event. wrong size=%d", readSize);
+ ALOGE("could not get event. wrong size=%zd", readSize);
break;
} else {
size_t count = static_cast<size_t>(readSize) / sizeof(struct input_event);
@@ -702,7 +702,7 @@
if (event->mask & IN_CREATE) {
auto deviceNode = openNode(path);
if (deviceNode == nullptr) {
- ALOGE("could not open device node %s. err=%d", path.c_str(), res);
+ ALOGE("could not open device node %s. err=%zd", path.c_str(), res);
} else {
mInputCallback->onDeviceAdded(deviceNode);
}
diff --git a/modules/nfc-nci/nfc_nci_example.c b/modules/nfc-nci/nfc_nci_example.c
index 758c2b7..ea5eb47 100644
--- a/modules/nfc-nci/nfc_nci_example.c
+++ b/modules/nfc-nci/nfc_nci_example.c
@@ -23,44 +23,61 @@
/*
+ * We want to silence the "unused argument" that gcc and clang give.
+ * Other compilers generating this warning will need to provide their
+ * custom attribute to silence this.
+ */
+#if defined(__GNUC__) || defined(__clang__)
+#define UNUSED_ARGUMENT __attribute((unused))
+#else
+#define UNUSED_ARGUMENT
+#endif
+
+/*
* NCI HAL method implementations. These must be overriden
*/
-static int hal_open(const struct nfc_nci_device *dev,
- nfc_stack_callback_t *p_cback, nfc_stack_data_callback_t *p_data_cback) {
+static int hal_open(const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ nfc_stack_callback_t *p_cback UNUSED_ARGUMENT,
+ nfc_stack_data_callback_t *p_data_cback UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_write(const struct nfc_nci_device *dev,
- uint16_t data_len, const uint8_t *p_data) {
+static int hal_write(const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ uint16_t data_len UNUSED_ARGUMENT,
+ const uint8_t *p_data UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_core_initialized(const struct nfc_nci_device *dev,
- uint8_t* p_core_init_rsp_params) {
+static int hal_core_initialized(
+ const struct nfc_nci_device *dev UNUSED_ARGUMENT,
+ uint8_t* p_core_init_rsp_params UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_pre_discover(const struct nfc_nci_device *dev) {
+static int hal_pre_discover(
+ const struct nfc_nci_device *dev UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_close(const struct nfc_nci_device *dev) {
+static int hal_close(const struct nfc_nci_device *dev UNUSED_ARGUMENT) {
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_control_granted (const struct nfc_nci_device *p_dev)
+static int hal_control_granted (
+ const struct nfc_nci_device *p_dev UNUSED_ARGUMENT)
{
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
}
-static int hal_power_cycle (const struct nfc_nci_device *p_dev)
+static int hal_power_cycle (
+ const struct nfc_nci_device *p_dev UNUSED_ARGUMENT)
{
ALOGE("NFC-NCI HAL: %s", __FUNCTION__);
return 0;
diff --git a/modules/sensors/multihal.cpp b/modules/sensors/multihal.cpp
index 0edbc2d..7044551 100644
--- a/modules/sensors/multihal.cpp
+++ b/modules/sensors/multihal.cpp
@@ -155,7 +155,11 @@
ALOGV("writerTask before poll() - bufferSize = %d", bufferSize);
eventsPolled = device->poll(device, buffer, bufferSize);
ALOGV("writerTask poll() got %d events.", eventsPolled);
- if (eventsPolled == 0) {
+ if (eventsPolled <= 0) {
+ if (eventsPolled < 0) {
+ ALOGV("writerTask ignored error %d from %s", eventsPolled, device->common.module->name);
+ ALOGE("ERROR: Fix %s so it does not return error from poll()", device->common.module->name);
+ }
continue;
}
pthread_mutex_lock(&queue_mutex);
diff --git a/modules/sensors/tests/SensorEventQueue_test.cpp b/modules/sensors/tests/SensorEventQueue_test.cpp
index 3218bb9..d3d75ee 100644
--- a/modules/sensors/tests/SensorEventQueue_test.cpp
+++ b/modules/sensors/tests/SensorEventQueue_test.cpp
@@ -32,7 +32,7 @@
return true;
}
-bool checkInt(char* msg, int expected, int actual) {
+bool checkInt(const char* msg, int expected, int actual) {
if (actual != expected) {
printf("%s; expected %d; actual was %d\n", msg, expected, actual);
return false;
@@ -187,7 +187,7 @@
}
-int main(int argc, char **argv) {
+int main(int argc __attribute((unused)), char **argv __attribute((unused))) {
if (testSimpleWriteSizeCounts() &&
testWrappingWriteSizeCounts() &&
testFullQueueIo()) {
diff --git a/modules/tv_input/tv_input.cpp b/modules/tv_input/tv_input.cpp
index 114e80e..ddace28 100644
--- a/modules/tv_input/tv_input.cpp
+++ b/modules/tv_input/tv_input.cpp
@@ -37,18 +37,18 @@
const char* name, struct hw_device_t** device);
static struct hw_module_methods_t tv_input_module_methods = {
- open: tv_input_device_open
+ .open = tv_input_device_open
};
tv_input_module_t HAL_MODULE_INFO_SYM = {
- common: {
- tag: HARDWARE_MODULE_TAG,
- version_major: 0,
- version_minor: 1,
- id: TV_INPUT_HARDWARE_MODULE_ID,
- name: "Sample TV input module",
- author: "The Android Open Source Project",
- methods: &tv_input_module_methods,
+ .common = {
+ .tag = HARDWARE_MODULE_TAG,
+ .version_major = 0,
+ .version_minor = 1,
+ .id = TV_INPUT_HARDWARE_MODULE_ID,
+ .name = "Sample TV input module",
+ .author = "The Android Open Source Project",
+ .methods = &tv_input_module_methods,
}
};
diff --git a/modules/vehicle/vehicle.c b/modules/vehicle/vehicle.c
index a26f27c..2d945fd 100644
--- a/modules/vehicle/vehicle.c
+++ b/modules/vehicle/vehicle.c
@@ -279,10 +279,10 @@
ALOGD("Value type: FLOAT\nValue: %f\n", data->value.float_value);
break;
case VEHICLE_VALUE_TYPE_INT32:
- ALOGD("Value type: INT32\nValue: %d\n", data->value.int32_value);
+ ALOGD("Value type: INT32\nValue: %" PRId32 "\n", data->value.int32_value);
break;
case VEHICLE_VALUE_TYPE_INT64:
- ALOGD("Value type: INT64\nValue: %lld\n", data->value.int64_value);
+ ALOGD("Value type: INT64\nValue: %" PRId64 "\n", data->value.int64_value);
break;
case VEHICLE_VALUE_TYPE_BOOLEAN:
ALOGD("Value type: BOOLEAN\nValue: %d\n", data->value.boolean_value);
@@ -331,22 +331,6 @@
event.prop = sub->prop;
event.timestamp = elapsedRealtimeNano();
switch (sub->prop) {
- case VEHICLE_PROPERTY_DRIVING_STATUS:
- event.value_type = VEHICLE_VALUE_TYPE_INT32;
- switch ((event.timestamp & 0x30000000)>>28) {
- case 0:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_UNRESTRICTED;
- break;
- case 1:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_VIDEO;
- break;
- case 2:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_KEYBOARD_INPUT;
- break;
- default:
- event.value.driving_status = VEHICLE_DRIVING_STATUS_NO_CONFIG;
- }
- break;
case VEHICLE_PROPERTY_GEAR_SELECTION:
event.value_type = VEHICLE_VALUE_TYPE_INT32;
switch ((event.timestamp & 0x30000000)>>28) {
diff --git a/tests/hardware/Android.bp b/tests/hardware/Android.bp
deleted file mode 100644
index 668e28f..0000000
--- a/tests/hardware/Android.bp
+++ /dev/null
@@ -1,15 +0,0 @@
-cc_library_static {
- name: "static-hal-check",
- srcs: [
- "struct-size.cpp",
- "struct-offset.cpp",
- "struct-last.cpp",
- ],
- shared_libs: ["libhardware"],
- cflags: [
- "-std=gnu++11",
- "-O0",
- ],
-
- include_dirs: ["system/media/camera/include"],
-}
diff --git a/tests/hardware/Android.mk b/tests/hardware/Android.mk
new file mode 100644
index 0000000..02540c9
--- /dev/null
+++ b/tests/hardware/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := static-hal-check
+LOCAL_SRC_FILES := struct-size.cpp struct-offset.cpp struct-last.cpp
+LOCAL_SHARED_LIBRARIES := libhardware
+LOCAL_CFLAGS := -std=gnu++11 -O0
+
+LOCAL_C_INCLUDES += \
+ system/media/camera/include
+
+include $(BUILD_STATIC_LIBRARY)