Customize vehicle property with the following attributes:
EXAMPLE_PROPERTY = (
0xXXXX
| VehiclePropertyGroup:VENDOR
| VehiclePropertyType:STRING
| VehicleArea:GLOBAL),
The custom properties can be accessed through the CarPropertyManager. We jsut have one permission defined for all the vendor properties: Car.PERMISSION_VENDOR_EXTENDSION (Android 10)
Check this https://source.android.com/devices/automotive/vhal/properties#handling-custom-properties
On Android 11, vehicle hal support customize vendor permissions feature through SUPPORT_CUSTOMIZE_VENDOR_PERMISSION
/**
* Support customize permissions for vendor properties
*
* Implement this property if vehicle hal support customize vendor permissions feature.
* VehiclePropConfig.configArray is used to indicate vendor properties and permissions
* which selected for this vendor property. The permission must be one of enum in
* VehicleVendorPermission.
* The configArray is set as follows:
* configArray[n] = propId : property ID for the vendor property
* configArray[n+1] = one of enums in VehicleVendorPermission. It indicates the permission
* for reading value of the property.
* configArray[n+2] = one of enums in VehicleVendorPermission. It indicates the permission
* for writing value of the property.
*
* For example:
* configArray = {
* vendor_prop_1, PERMISSION_VENDOR_SEAT_READ, PERMISSION_VENDOR_SEAT_WRITE,
* vendor_prop_2, PERMISSION_VENDOR_INFO, PERMISSION_NOT_ACCESSIBLE,
* }
* If vendor properties are not in this array, they will have the default vendor permission.
* If vendor chose PERMISSION_NOT_ACCESSIBLE, android will not have access to the property. In
* the example, Android can not write value for vendor_prop_2.
*
* @change_mode VehiclePropertyChangeMode:STATIC
* @access VehiclePropertyAccess:READ
*/
SUPPORT_CUSTOMIZE_VENDOR_PERMISSION = (
0x0F05
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:BOOLEAN
| VehicleArea:GLOBAL),