Как обрабатывать пользовательские свойства автомобиля в VHAL android Automotive? - PullRequest
0 голосов
/ 18 февраля 2020

Как создать пользовательские свойства автомобиля в android Automotive VHAL?

Как я могу сгенерировать PropertyID и как получить к нему доступ из CarPropertyManager?

Я нашел ссылку ниже, но мне не ясно это:

https://source.android.com/devices/automotive/properties#prop_custom] [1]

1 Ответ

0 голосов
/ 28 февраля 2020

Отметьте это https://android.googlesource.com/platform/hardware/interfaces/+/refs/tags/android-9.0.0_r51/automotive/vehicle/2.0/types.hal

с примечанием

  Vendors are allowed to extend this enum with their own properties 
  In this case they must use VehiclePropertyGroup:VENDOR flag when property is
  declared.

Вы должны расширить enum VehicleProperty, а затем сделать его доступным через CarPropertyManager и получить значение через CarPropertyValue

...