summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CleanSpec.mk8
-rw-r--r--audio/2.0/config/audio_policy_configuration.xsd8
-rw-r--r--audio/2.0/default/Android.mk4
-rw-r--r--audio/2.0/default/OWNERS3
-rw-r--r--audio/2.0/default/Stream.h7
-rw-r--r--audio/2.0/default/StreamIn.cpp12
-rw-r--r--audio/2.0/default/StreamOut.cpp11
-rw-r--r--audio/2.0/default/service.cpp19
-rw-r--r--audio/2.0/vts/functional/Android.bp29
-rw-r--r--audio/2.0/vts/functional/ValidateAudioConfiguration.cpp16
-rw-r--r--audio/common/2.0/default/Android.bp3
-rw-r--r--audio/common/2.0/default/OWNERS3
-rw-r--r--audio/common/test/utility/OWNERS3
-rw-r--r--audio/effect/2.0/default/OWNERS3
-rw-r--r--audio/effect/2.0/vts/functional/Android.bp24
-rw-r--r--audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp30
-rw-r--r--audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd249
-rw-r--r--automotive/Android.bp4
-rw-r--r--automotive/evs/1.0/default/Android.bp31
-rw-r--r--automotive/evs/1.0/default/Android.mk29
-rw-r--r--automotive/evs/1.0/vts/functional/Android.bp5
-rw-r--r--automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp (renamed from automotive/evs/1.0/vts/functional/VtsEvsV1_0TargetTest.cpp)11
-rw-r--r--automotive/vehicle/2.0/Android.mk608
-rw-r--r--automotive/vehicle/2.0/default/Android.bp117
-rw-r--r--automotive/vehicle/2.0/default/Android.mk198
-rw-r--r--automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h (renamed from automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h)31
-rw-r--r--automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp (renamed from automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp)51
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h74
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp217
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.h11
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp27
-rw-r--r--automotive/vehicle/2.0/types.hal1475
-rw-r--r--automotive/vehicle/2.1/Android.bp68
-rw-r--r--automotive/vehicle/2.1/Android.mk648
-rw-r--r--automotive/vehicle/2.1/IVehicle.hal31
-rw-r--r--automotive/vehicle/2.1/default/Android.mk123
-rw-r--r--automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc4
-rw-r--r--automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h90
-rw-r--r--automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.cpp263
-rw-r--r--automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.h77
-rw-r--r--automotive/vehicle/2.1/default/service.cpp104
-rw-r--r--automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp285
-rw-r--r--automotive/vehicle/2.1/types.hal653
-rw-r--r--biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp2
-rw-r--r--biometrics/fingerprint/2.1/default/BiometricsFingerprint.h1
-rw-r--r--bluetooth/1.0/default/async_fd_watcher.cc2
-rw-r--r--bluetooth/1.0/default/bluetooth_address.cc1
-rw-r--r--bluetooth/1.0/default/h4_protocol.cc1
-rw-r--r--bluetooth/1.0/default/hci_packetizer.cc1
-rw-r--r--bluetooth/1.0/default/hci_protocol.cc1
-rw-r--r--broadcastradio/1.0/default/OWNERS4
-rw-r--r--broadcastradio/1.0/types.hal33
-rw-r--r--broadcastradio/1.1/IBroadcastRadio.hal34
-rw-r--r--broadcastradio/1.1/IBroadcastRadioFactory.hal6
-rw-r--r--broadcastradio/1.1/ITuner.hal80
-rw-r--r--broadcastradio/1.1/ITunerCallback.hal40
-rw-r--r--broadcastradio/1.1/WARNING1
-rw-r--r--broadcastradio/1.1/default/Android.bp21
-rw-r--r--broadcastradio/1.1/default/BroadcastRadio.cpp232
-rw-r--r--broadcastradio/1.1/default/BroadcastRadio.h68
-rw-r--r--broadcastradio/1.1/default/BroadcastRadioFactory.cpp42
-rw-r--r--broadcastradio/1.1/default/BroadcastRadioFactory.h14
-rw-r--r--broadcastradio/1.1/default/OWNERS4
-rw-r--r--broadcastradio/1.1/default/Tuner.cpp449
-rw-r--r--broadcastradio/1.1/default/Tuner.h66
-rw-r--r--broadcastradio/1.1/default/Utils.cpp299
-rw-r--r--broadcastradio/1.1/default/Utils.h58
-rw-r--r--broadcastradio/1.1/default/VirtualProgram.cpp106
-rw-r--r--broadcastradio/1.1/default/VirtualProgram.h55
-rw-r--r--broadcastradio/1.1/default/VirtualRadio.cpp105
-rw-r--r--broadcastradio/1.1/default/VirtualRadio.h80
-rw-r--r--broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc4
-rw-r--r--broadcastradio/1.1/default/resources.h46
-rw-r--r--broadcastradio/1.1/default/service.cpp36
-rw-r--r--broadcastradio/1.1/tests/Android.bp29
-rw-r--r--broadcastradio/1.1/tests/OWNERS8
-rw-r--r--broadcastradio/1.1/tests/WorkerThread_test.cpp138
-rw-r--r--broadcastradio/1.1/types.hal246
-rw-r--r--broadcastradio/1.1/utils/Android.bp (renamed from power/1.1/default/Android.bp)33
-rw-r--r--broadcastradio/1.1/utils/OWNERS4
-rw-r--r--broadcastradio/1.1/utils/Utils.cpp234
-rw-r--r--broadcastradio/1.1/utils/WorkerThread.cpp89
-rw-r--r--broadcastradio/1.1/utils/include/broadcastradio-utils/Utils.h89
-rw-r--r--broadcastradio/1.1/utils/include/broadcastradio-utils/WorkerThread.h51
-rw-r--r--broadcastradio/1.1/vts/OWNERS8
-rw-r--r--broadcastradio/1.1/vts/functional/Android.bp19
-rw-r--r--broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp790
-rw-r--r--broadcastradio/1.1/vts/utils/Android.bp28
-rw-r--r--broadcastradio/1.1/vts/utils/call-barrier.cpp45
-rw-r--r--broadcastradio/1.1/vts/utils/include/broadcastradio-vts-utils/call-barrier.h59
-rw-r--r--broadcastradio/1.1/vts/utils/include/broadcastradio-vts-utils/mock-timeout.h111
-rw-r--r--broadcastradio/Android.bp3
-rw-r--r--camera/Android.bp2
-rw-r--r--camera/common/1.0/default/CameraParameters.cpp1
-rw-r--r--camera/device/1.0/default/Android.bp3
-rw-r--r--camera/device/1.0/default/OWNERS6
-rw-r--r--camera/device/3.2/default/CameraDevice.cpp25
-rw-r--r--camera/device/3.2/default/CameraDeviceSession.cpp21
-rw-r--r--camera/device/3.2/default/CameraDeviceSession.h82
-rw-r--r--camera/device/3.2/default/CameraDevice_3_2.h8
-rw-r--r--camera/device/3.2/default/OWNERS6
-rw-r--r--camera/device/3.3/Android.bp72
-rw-r--r--camera/device/3.3/ICameraDeviceSession.hal50
-rw-r--r--camera/device/3.3/default/Android.bp30
-rw-r--r--camera/device/3.3/default/CameraDevice.cpp67
-rw-r--r--camera/device/3.3/default/CameraDeviceSession.cpp178
-rw-r--r--camera/device/3.3/default/CameraDeviceSession.h138
-rw-r--r--camera/device/3.3/default/CameraDevice_3_3.h75
-rw-r--r--camera/device/3.3/default/OWNERS6
-rw-r--r--camera/device/3.3/default/convert.cpp65
-rw-r--r--camera/device/3.3/default/include/convert.h49
-rw-r--r--camera/device/3.3/types.hal57
-rw-r--r--camera/device/README.md13
-rw-r--r--camera/provider/2.4/default/Android.bp3
-rw-r--r--camera/provider/2.4/default/CameraProvider.cpp83
-rw-r--r--camera/provider/2.4/default/CameraProvider.h8
-rw-r--r--camera/provider/2.4/default/OWNERS6
-rw-r--r--camera/provider/2.4/vts/OWNERS11
-rw-r--r--camera/provider/2.4/vts/functional/Android.bp32
-rw-r--r--camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp3138
-rw-r--r--cas/1.0/Android.bp87
-rw-r--r--cas/1.0/CasHal.mk192
-rw-r--r--cas/1.0/ICas.hal122
-rw-r--r--cas/1.0/ICasListener.hal28
-rw-r--r--cas/1.0/IDescramblerBase.hal49
-rw-r--r--cas/1.0/IMediaCasService.hal68
-rw-r--r--cas/1.0/default/Android.bp39
-rw-r--r--cas/1.0/default/CasImpl.cpp205
-rw-r--r--cas/1.0/default/CasImpl.h103
-rw-r--r--cas/1.0/default/DescramblerImpl.cpp127
-rw-r--r--cas/1.0/default/DescramblerImpl.h69
-rw-r--r--cas/1.0/default/FactoryLoader.h229
-rw-r--r--cas/1.0/default/MediaCasService.cpp112
-rw-r--r--cas/1.0/default/MediaCasService.h64
-rw-r--r--cas/1.0/default/SharedLibrary.cpp65
-rw-r--r--cas/1.0/default/SharedLibrary.h50
-rw-r--r--cas/1.0/default/TypeConvert.cpp95
-rw-r--r--cas/1.0/default/TypeConvert.h41
-rw-r--r--cas/1.0/default/android.hardware.cas@1.0-service.rc6
-rw-r--r--cas/1.0/default/service.cpp50
-rw-r--r--cas/1.0/types.hal124
-rw-r--r--cas/1.0/vts/functional/Android.bp (renamed from configstore/1.1/vts/functional/Android.bp)24
-rw-r--r--cas/1.0/vts/functional/VtsHalCasV1_0TargetTest.cpp623
-rw-r--r--cas/Android.bp7
-rw-r--r--cas/native/1.0/Android.bp68
-rw-r--r--cas/native/1.0/IDescrambler.hal46
-rw-r--r--cas/native/1.0/types.hal88
-rw-r--r--compatibility_matrix.26.xml67
-rw-r--r--compatibility_matrix.27.xml370
-rw-r--r--compatibility_matrix.current.xml59
-rw-r--r--compatibility_matrix.legacy.xml67
-rw-r--r--configstore/1.0/default/Android.mk34
-rw-r--r--configstore/1.0/default/SurfaceFlingerConfigs.cpp (renamed from configstore/1.1/default/SurfaceFlingerConfigs.cpp)7
-rw-r--r--configstore/1.0/default/SurfaceFlingerConfigs.h (renamed from configstore/1.1/default/SurfaceFlingerConfigs.h)17
-rw-r--r--configstore/1.0/default/android.hardware.configstore@1.0-service.rc4
-rw-r--r--configstore/1.0/default/seccomp_policy/configstore@1.0-arm64.policy51
-rw-r--r--configstore/1.0/default/service.cpp (renamed from configstore/1.1/default/service.cpp)13
-rw-r--r--configstore/1.0/default/surfaceflinger.mk (renamed from configstore/1.1/default/surfaceflinger.mk)0
-rw-r--r--configstore/1.1/Android.bp170
-rw-r--r--configstore/1.1/ISurfaceFlingerConfigs.hal25
-rw-r--r--configstore/1.1/default/Android.mk23
-rw-r--r--configstore/1.1/default/android.hardware.configstore@1.1-service.rc4
-rw-r--r--configstore/1.1/vts/functional/VtsHalConfigstoreV1_1TargetTest.cpp55
-rw-r--r--configstore/Android.bp2
-rw-r--r--contexthub/1.0/default/Contexthub.cpp17
-rw-r--r--current.txt35
-rw-r--r--drm/1.0/default/Android.mk3
-rw-r--r--drm/1.0/default/CryptoFactory.h1
-rw-r--r--drm/1.0/default/CryptoPlugin.cpp15
-rw-r--r--drm/1.0/default/DrmFactory.h1
-rw-r--r--drm/1.0/vts/functional/Android.bp20
-rw-r--r--drm/1.0/vts/functional/drm_hal_clearkey_test.cpp109
-rw-r--r--drm/1.0/vts/functional/drm_hal_vendor_test.cpp22
-rw-r--r--dumpstate/1.0/vts/functional/Android.bp15
-rw-r--r--gnss/1.0/default/GnssMeasurement.cpp3
-rw-r--r--gnss/1.0/default/OWNERS3
-rw-r--r--gnss/1.0/vts/OWNERS7
-rw-r--r--graphics/allocator/2.0/Android.bp1
-rw-r--r--graphics/composer/2.1/default/Hwc.cpp2
-rw-r--r--graphics/composer/2.1/default/IComposerCommandBuffer.h17
-rw-r--r--graphics/composer/2.1/vts/functional/Android.bp28
-rw-r--r--graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp51
-rw-r--r--graphics/mapper/2.0/vts/functional/Android.bp22
-rw-r--r--health/1.0/default/Android.bp20
-rw-r--r--health/1.0/default/Android.mk18
-rw-r--r--health/1.0/default/libhealthd/Android.bp10
-rw-r--r--health/1.0/default/libhealthd/Android.mk10
-rw-r--r--health/Android.bp2
-rw-r--r--keymaster/3.0/vts/functional/Android.bp32
-rw-r--r--keymaster/3.0/vts/functional/Android.mk39
-rw-r--r--keymaster/3.0/vts/functional/keymaster_hidl_hal_test.cpp6
-rw-r--r--keymaster/Android.bp1
-rw-r--r--media/omx/1.0/IOmxStore.hal6
-rw-r--r--media/omx/1.0/vts/functional/audio/Android.bp62
-rw-r--r--media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioDecTest.cpp372
-rw-r--r--media/omx/1.0/vts/functional/audio/VtsHalMediaOmxV1_0TargetAudioEncTest.cpp114
-rw-r--r--media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.cpp4
-rw-r--r--media/omx/1.0/vts/functional/audio/media_audio_hidl_test_common.h5
-rw-r--r--[-rwxr-xr-x]media/omx/1.0/vts/functional/common/Android.bp39
-rw-r--r--[-rwxr-xr-x]media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp263
-rw-r--r--media/omx/1.0/vts/functional/common/media_hidl_test_common.h57
-rw-r--r--media/omx/1.0/vts/functional/component/Android.bp27
-rw-r--r--media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp507
-rw-r--r--media/omx/1.0/vts/functional/master/Android.bp24
-rw-r--r--media/omx/1.0/vts/functional/master/VtsHalMediaOmxV1_0TargetMasterTest.cpp7
-rw-r--r--media/omx/1.0/vts/functional/video/Android.bp69
-rw-r--r--media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp864
-rw-r--r--media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoEncTest.cpp259
-rw-r--r--media/omx/1.0/vts/functional/video/media_video_hidl_test_common.cpp1
-rw-r--r--media/omx/1.0/vts/functional/video/media_video_hidl_test_common.h6
-rw-r--r--[-rwxr-xr-x]media/res/bbb_aac_stereo_128kbps_48000hz.aacbin159216 -> 159216 bytes
-rw-r--r--[-rwxr-xr-x]media/res/bbb_aac_stereo_128kbps_48000hz.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_amrwb_1ch_14kbps_16000hz.amrwbbin20254 -> 20254 bytes
-rw-r--r--[-rwxr-xr-x]media/res/bbb_amrwb_1ch_14kbps_16000hz.info0
-rw-r--r--media/res/bbb_avc_176x144_300kbps_60fps.h264bin0 -> 37899 bytes
-rw-r--r--media/res/bbb_avc_176x144_300kbps_60fps.info62
-rw-r--r--media/res/bbb_flac_stereo_680kbps_48000hz.flacbin0 -> 840775 bytes
-rw-r--r--media/res/bbb_flac_stereo_680kbps_48000hz.info415
-rw-r--r--[-rwxr-xr-x]media/res/bbb_g711alaw_1ch_8khz.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_g711alaw_1ch_8khz.raw0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_g711mulaw_1ch_8khz.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_g711mulaw_1ch_8khz.raw0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_gsm_1ch_8khz_13kbps.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_gsm_1ch_8khz_13kbps.rawbin16120 -> 16120 bytes
-rw-r--r--media/res/bbb_hevc_176x144_176kbps_60fps.hevcbin0 -> 20503 bytes
-rw-r--r--media/res/bbb_hevc_176x144_176kbps_60fps.info61
-rw-r--r--media/res/bbb_mpeg2_352x288_1mbps_60fps.info60
-rw-r--r--media/res/bbb_mpeg2_352x288_1mbps_60fps.m2vbin0 -> 123976 bytes
-rw-r--r--[-rwxr-xr-x]media/res/bbb_opus_stereo_128kbps_48000hz.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_opus_stereo_128kbps_48000hz.opusbin163743 -> 163743 bytes
-rw-r--r--[-rwxr-xr-x]media/res/bbb_raw_1ch_8khz_s32le.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_raw_1ch_8khz_s32le.rawbin158380 -> 158380 bytes
-rw-r--r--[-rwxr-xr-x]media/res/bbb_vorbis_stereo_128kbps_48000hz.info0
-rw-r--r--[-rwxr-xr-x]media/res/bbb_vorbis_stereo_128kbps_48000hz.vorbisbin147450 -> 147450 bytes
-rw-r--r--media/res/bbb_vp8_176x144_240kbps_60fps.info60
-rw-r--r--media/res/bbb_vp8_176x144_240kbps_60fps.vp8bin0 -> 28992 bytes
-rw-r--r--media/res/bbb_vp9_176x144_285kbps_60fps.info60
-rw-r--r--media/res/bbb_vp9_176x144_285kbps_60fps.vp9bin0 -> 34848 bytes
-rw-r--r--neuralnetworks/1.0/Android.bp87
-rw-r--r--neuralnetworks/1.0/IDevice.hal126
-rw-r--r--neuralnetworks/1.0/IExecutionCallback.hal44
-rw-r--r--neuralnetworks/1.0/IPreparedModel.hal65
-rw-r--r--neuralnetworks/1.0/IPreparedModelCallback.hal53
-rw-r--r--neuralnetworks/1.0/types.hal1267
-rw-r--r--neuralnetworks/1.0/vts/OWNERS11
-rw-r--r--neuralnetworks/1.0/vts/functional/Android.bp36
-rw-r--r--neuralnetworks/1.0/vts/functional/Callbacks.cpp127
-rw-r--r--neuralnetworks/1.0/vts/functional/Callbacks.h319
-rw-r--r--neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp231
-rw-r--r--neuralnetworks/1.0/vts/functional/Models.cpp207
-rw-r--r--neuralnetworks/1.0/vts/functional/Models.h43
-rw-r--r--neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.cpp296
-rw-r--r--neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworksV1_0TargetTest.h104
-rw-r--r--neuralnetworks/Android.bp5
-rw-r--r--oemlock/1.0/vts/functional/Android.bp18
-rw-r--r--power/1.1/default/Power.cpp177
-rw-r--r--power/1.1/default/Power.h63
-rw-r--r--power/1.1/default/android.hardware.power@1.1-service.rc4
-rw-r--r--power/1.1/default/service.cpp89
-rw-r--r--power/1.1/vts/functional/Android.bp15
-rw-r--r--power/Android.bp1
-rw-r--r--radio/1.0/IRadioResponse.hal30
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_icc.cpp3
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_ims.cpp5
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_misc.cpp23
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_stk.cpp9
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_voice.cpp1
-rw-r--r--radio/1.1/IRadioResponse.hal1
-rw-r--r--renderscript/1.0/vts/functional/Android.bp18
-rw-r--r--sensors/1.0/default/Android.bp3
-rw-r--r--soundtrigger/2.0/default/OWNERS3
-rw-r--r--tetheroffload/config/1.0/vts/functional/Android.bp17
-rw-r--r--tetheroffload/config/1.0/vts/functional/VtsHalTetheroffloadConfigV1_0TargetTest.cpp61
-rw-r--r--tetheroffload/control/1.0/vts/functional/Android.bp15
-rw-r--r--tetheroffload/control/1.0/vts/functional/VtsHalTetheroffloadControlV1_0TargetTest.cpp76
-rw-r--r--thermal/1.1/Android.bp71
-rw-r--r--thermal/1.1/Android.mk65
-rw-r--r--thermal/1.1/IThermal.hal31
-rw-r--r--thermal/1.1/IThermalCallback.hal33
-rw-r--r--thermal/1.1/vts/functional/Android.bp26
-rw-r--r--thermal/1.1/vts/functional/VtsHalThermalV1_1TargetTest.cpp106
-rw-r--r--thermal/Android.bp2
-rw-r--r--usb/1.1/vts/functional/Android.bp16
-rw-r--r--vibrator/1.1/vts/functional/Android.bp14
-rw-r--r--weaver/1.0/vts/functional/Android.bp18
-rw-r--r--wifi/1.0/README-NAN.md221
-rw-r--r--wifi/1.0/types.hal4
-rw-r--r--wifi/1.1/default/OWNERS2
-rw-r--r--wifi/1.1/default/hidl_return_util.h19
-rw-r--r--wifi/1.1/default/wifi.cpp16
-rw-r--r--wifi/1.1/default/wifi.h5
-rw-r--r--wifi/1.1/default/wifi_legacy_hal.cpp24
-rw-r--r--wifi/1.1/default/wifi_legacy_hal.h8
-rw-r--r--wifi/1.1/vts/functional/Android.bp17
-rw-r--r--wifi/1.1/vts/functional/OWNERS2
-rw-r--r--wifi/Android.bp1
-rw-r--r--wifi/offload/1.0/vts/functional/Android.bp18
-rw-r--r--wifi/supplicant/1.0/vts/functional/Android.bp37
-rw-r--r--wifi/supplicant/1.0/vts/functional/Android.mk44
299 files changed, 17866 insertions, 8028 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index cad545c0..3788bc6b 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -56,4 +56,10 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/)
56$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) 56$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
57$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/) 57$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
58$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f) 58$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
59$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware.graphics.allocator*) 59$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*)
60$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*)
61$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*)
62$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*)
63$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f)
64$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*)
65$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk/android.hardware.tests*)
diff --git a/audio/2.0/config/audio_policy_configuration.xsd b/audio/2.0/config/audio_policy_configuration.xsd
index c94da80b..eb59152c 100644
--- a/audio/2.0/config/audio_policy_configuration.xsd
+++ b/audio/2.0/config/audio_policy_configuration.xsd
@@ -365,10 +365,10 @@
365 </xs:restriction> 365 </xs:restriction>
366 </xs:simpleType> 366 </xs:simpleType>
367 <xs:complexType name="profile"> 367 <xs:complexType name="profile">
368 <xs:attribute name="name" type="xs:token" use="required"/> 368 <xs:attribute name="name" type="xs:token" use="optional"/>
369 <xs:attribute name="format" type="audioFormat" use="required"/> 369 <xs:attribute name="format" type="audioFormat" use="optional"/>
370 <xs:attribute name="samplingRates" type="samplingRates" use="required"/> 370 <xs:attribute name="samplingRates" type="samplingRates" use="optional"/>
371 <xs:attribute name="channelMasks" type="channelMask" use="required"/> 371 <xs:attribute name="channelMasks" type="channelMask" use="optional"/>
372 </xs:complexType> 372 </xs:complexType>
373 <xs:simpleType name="gainMode"> 373 <xs:simpleType name="gainMode">
374 <xs:restriction base="xs:string"> 374 <xs:restriction base="xs:string">
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 621853cb..8dec4820 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -84,8 +84,4 @@ else
84LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB) 84LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
85endif 85endif
86 86
87ifeq ($(TARGET_USES_BCRADIO_FUTURE_FEATURES),true)
88LOCAL_CFLAGS += -DTARGET_USES_BCRADIO_FUTURE_FEATURES
89endif
90
91include $(BUILD_EXECUTABLE) 87include $(BUILD_EXECUTABLE)
diff --git a/audio/2.0/default/OWNERS b/audio/2.0/default/OWNERS
new file mode 100644
index 00000000..6fdc97ca
--- /dev/null
+++ b/audio/2.0/default/OWNERS
@@ -0,0 +1,3 @@
1elaurent@google.com
2krocard@google.com
3mnaganov@google.com
diff --git a/audio/2.0/default/Stream.h b/audio/2.0/default/Stream.h
index 82f05a77..e29af531 100644
--- a/audio/2.0/default/Stream.h
+++ b/audio/2.0/default/Stream.h
@@ -49,6 +49,13 @@ using ::android::sp;
49struct Stream : public IStream, public ParametersUtil { 49struct Stream : public IStream, public ParametersUtil {
50 explicit Stream(audio_stream_t* stream); 50 explicit Stream(audio_stream_t* stream);
51 51
52 /** 1GiB is the maximum buffer size the HAL client is allowed to request.
53 * This value has been chosen to be under SIZE_MAX and still big enough
54 * for all audio use case.
55 * Keep private for 2.0, put in .hal in 2.1
56 */
57 static constexpr uint32_t MAX_BUFFER_SIZE = 2 << 30 /* == 1GiB */;
58
52 // Methods from ::android::hardware::audio::V2_0::IStream follow. 59 // Methods from ::android::hardware::audio::V2_0::IStream follow.
53 Return<uint64_t> getFrameSize() override; 60 Return<uint64_t> getFrameSize() override;
54 Return<uint64_t> getFrameCount() override; 61 Return<uint64_t> getFrameCount() override;
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index b81cbb92..9c933a92 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -347,14 +347,10 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize,
347 sendError(Result::INVALID_ARGUMENTS); 347 sendError(Result::INVALID_ARGUMENTS);
348 return Void(); 348 return Void();
349 } 349 }
350 // A message queue asserts if it can not handle the requested buffer, 350
351 // thus the client has to guess the maximum size it can handle 351 if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) {
352 // Choose an arbitrary margin for the overhead of a message queue 352 ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount,
353 size_t metadataOverhead = 100000; 353 Stream::MAX_BUFFER_SIZE);
354 if (frameSize >
355 (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) {
356 ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
357 frameSize, framesCount);
358 sendError(Result::INVALID_ARGUMENTS); 354 sendError(Result::INVALID_ARGUMENTS);
359 return Void(); 355 return Void();
360 } 356 }
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 290d0b10..22dcd0c9 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -323,14 +323,9 @@ Return<void> StreamOut::prepareForWriting(uint32_t frameSize,
323 sendError(Result::INVALID_ARGUMENTS); 323 sendError(Result::INVALID_ARGUMENTS);
324 return Void(); 324 return Void();
325 } 325 }
326 // A message queue asserts if it can not handle the requested buffer, 326 if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) {
327 // thus the client has to guess the maximum size it can handle 327 ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount,
328 size_t metadataOverhead = 328 Stream::MAX_BUFFER_SIZE);
329 100000; // Arbitrary margin for the overhead of a message queue
330 if (frameSize >
331 (std::numeric_limits<size_t>::max() - metadataOverhead) / framesCount) {
332 ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
333 frameSize, framesCount);
334 sendError(Result::INVALID_ARGUMENTS); 329 sendError(Result::INVALID_ARGUMENTS);
335 return Void(); 330 return Void();
336 } 331 }
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index 7f28d7df..a215108e 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -21,8 +21,6 @@
21#include <android/hardware/audio/2.0/IDevicesFactory.h> 21#include <android/hardware/audio/2.0/IDevicesFactory.h>
22#include <android/hardware/audio/effect/2.0/IEffectsFactory.h> 22#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
23#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h> 23#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
24#include <android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h>
25#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
26 24
27using android::hardware::configureRpcThreadpool; 25using android::hardware::configureRpcThreadpool;
28using android::hardware::joinRpcThreadpool; 26using android::hardware::joinRpcThreadpool;
@@ -32,13 +30,6 @@ using android::hardware::audio::effect::V2_0::IEffectsFactory;
32using android::hardware::audio::V2_0::IDevicesFactory; 30using android::hardware::audio::V2_0::IDevicesFactory;
33using android::hardware::soundtrigger::V2_0::ISoundTriggerHw; 31using android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
34using android::hardware::registerPassthroughServiceImplementation; 32using android::hardware::registerPassthroughServiceImplementation;
35namespace broadcastradio = android::hardware::broadcastradio;
36
37#ifdef TARGET_USES_BCRADIO_FUTURE_FEATURES
38static const bool useBroadcastRadioFutureFeatures = true;
39#else
40static const bool useBroadcastRadioFutureFeatures = false;
41#endif
42 33
43using android::OK; 34using android::OK;
44 35
@@ -49,17 +40,9 @@ int main(int /* argc */, char* /* argv */ []) {
49 LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status); 40 LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status);
50 status = registerPassthroughServiceImplementation<IEffectsFactory>(); 41 status = registerPassthroughServiceImplementation<IEffectsFactory>();
51 LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status); 42 LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status);
52 // Soundtrigger and FM radio might be not present. 43 // Soundtrigger might be not present.
53 status = registerPassthroughServiceImplementation<ISoundTriggerHw>(); 44 status = registerPassthroughServiceImplementation<ISoundTriggerHw>();
54 ALOGE_IF(status != OK, "Error while registering soundtrigger service: %d", status); 45 ALOGE_IF(status != OK, "Error while registering soundtrigger service: %d", status);
55 if (useBroadcastRadioFutureFeatures) {
56 status = registerPassthroughServiceImplementation<
57 broadcastradio::V1_1::IBroadcastRadioFactory>();
58 } else {
59 status = registerPassthroughServiceImplementation<
60 broadcastradio::V1_0::IBroadcastRadioFactory>();
61 }
62 ALOGE_IF(status != OK, "Error while registering fm radio service: %d", status);
63 joinRpcThreadpool(); 46 joinRpcThreadpool();
64 return status; 47 return status;
65} 48}
diff --git a/audio/2.0/vts/functional/Android.bp b/audio/2.0/vts/functional/Android.bp
index b289709f..f3b2ca72 100644
--- a/audio/2.0/vts/functional/Android.bp
+++ b/audio/2.0/vts/functional/Android.bp
@@ -16,29 +16,18 @@
16 16
17cc_test { 17cc_test {
18 name: "VtsHalAudioV2_0TargetTest", 18 name: "VtsHalAudioV2_0TargetTest",
19 defaults: ["hidl_defaults"], 19 defaults: ["VtsHalTargetTestDefaults"],
20 srcs: ["AudioPrimaryHidlHalTest.cpp", 20 srcs: [
21 "ValidateAudioConfiguration.cpp"], 21 "AudioPrimaryHidlHalTest.cpp",
22 shared_libs: [ 22 "ValidateAudioConfiguration.cpp"
23 "libbase",
24 "liblog",
25 "libhidlbase",
26 "libhidltransport",
27 "libutils",
28 "libcutils",
29 "libxml2",
30 "android.hardware.audio@2.0",
31 "android.hardware.audio.common@2.0",
32 ], 23 ],
33 static_libs: [ 24 static_libs: [
34 "VtsHalHidlTargetTestBase",
35 "android.hardware.audio.common.test.utility", 25 "android.hardware.audio.common.test.utility",
26 "android.hardware.audio@2.0",
27 "android.hardware.audio.common@2.0",
28 "libxml2",
36 ], 29 ],
37 cflags: [ 30 shared_libs: [
38 "-O0", 31 "libicuuc",
39 "-g",
40 "-Wall",
41 "-Wextra",
42 "-Werror",
43 ], 32 ],
44} 33}
diff --git a/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp b/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
index 01324c87..ec3259a1 100644
--- a/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
+++ b/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
@@ -14,9 +14,21 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#include <string>
18#include <unistd.h>
19
17#include "utility/ValidateXml.h" 20#include "utility/ValidateXml.h"
18 21
19TEST(CheckConfig, audioPolicyConfigurationValidation) { 22TEST(CheckConfig, audioPolicyConfigurationValidation) {
20 ASSERT_VALID_XML("/vendor/etc/audio_policy_configuration.xml", 23 const char* configName = "audio_policy_configuration.xml";
21 "/data/local/tmp/audio_policy_configuration.xsd"); 24 const char* possibleConfigLocations[] = {"/odm/etc", "/vendor/etc", "/system/etc"};
25 const char* configSchemaPath = "/data/local/tmp/audio_policy_configuration.xsd";
26
27 for (std::string folder : possibleConfigLocations) {
28 const auto configPath = folder + '/' + configName;
29 if (access(configPath.c_str(), R_OK) == 0) {
30 ASSERT_VALID_XML(configPath.c_str(), configSchemaPath);
31 return; // The framework does not read past the first config file found
32 }
33 }
22} 34}
diff --git a/audio/common/2.0/default/Android.bp b/audio/common/2.0/default/Android.bp
index 7fab220f..82b38c08 100644
--- a/audio/common/2.0/default/Android.bp
+++ b/audio/common/2.0/default/Android.bp
@@ -17,6 +17,9 @@ cc_library_shared {
17 name: "android.hardware.audio.common@2.0-util", 17 name: "android.hardware.audio.common@2.0-util",
18 defaults: ["hidl_defaults"], 18 defaults: ["hidl_defaults"],
19 vendor_available: true, 19 vendor_available: true,
20 vndk: {
21 enabled: true,
22 },
20 srcs: [ 23 srcs: [
21 "EffectMap.cpp", 24 "EffectMap.cpp",
22 "HidlUtils.cpp", 25 "HidlUtils.cpp",
diff --git a/audio/common/2.0/default/OWNERS b/audio/common/2.0/default/OWNERS
new file mode 100644
index 00000000..6fdc97ca
--- /dev/null
+++ b/audio/common/2.0/default/OWNERS
@@ -0,0 +1,3 @@
1elaurent@google.com
2krocard@google.com
3mnaganov@google.com
diff --git a/audio/common/test/utility/OWNERS b/audio/common/test/utility/OWNERS
new file mode 100644
index 00000000..6fdc97ca
--- /dev/null
+++ b/audio/common/test/utility/OWNERS
@@ -0,0 +1,3 @@
1elaurent@google.com
2krocard@google.com
3mnaganov@google.com
diff --git a/audio/effect/2.0/default/OWNERS b/audio/effect/2.0/default/OWNERS
new file mode 100644
index 00000000..6fdc97ca
--- /dev/null
+++ b/audio/effect/2.0/default/OWNERS
@@ -0,0 +1,3 @@
1elaurent@google.com
2krocard@google.com
3mnaganov@google.com
diff --git a/audio/effect/2.0/vts/functional/Android.bp b/audio/effect/2.0/vts/functional/Android.bp
index 8a370cd1..7b421cb7 100644
--- a/audio/effect/2.0/vts/functional/Android.bp
+++ b/audio/effect/2.0/vts/functional/Android.bp
@@ -16,24 +16,20 @@
16 16
17cc_test { 17cc_test {
18 name: "VtsHalAudioEffectV2_0TargetTest", 18 name: "VtsHalAudioEffectV2_0TargetTest",
19 defaults: ["hidl_defaults"], 19 defaults: ["VtsHalTargetTestDefaults"],
20 srcs: ["VtsHalAudioEffectV2_0TargetTest.cpp"], 20 srcs: [
21 shared_libs: [ 21 "VtsHalAudioEffectV2_0TargetTest.cpp",
22 "libbase", 22 "ValidateAudioEffectsConfiguration.cpp"
23 "liblog", 23 ],
24 "libcutils", 24 static_libs: [
25 "libhidlbase", 25 "android.hardware.audio.common.test.utility",
26 "libhidltransport",
27 "libnativehelper",
28 "libutils",
29 "android.hardware.audio.common@2.0", 26 "android.hardware.audio.common@2.0",
30 "android.hardware.audio.effect@2.0", 27 "android.hardware.audio.effect@2.0",
31 "android.hidl.allocator@1.0", 28 "android.hidl.allocator@1.0",
32 "android.hidl.memory@1.0", 29 "android.hidl.memory@1.0",
30 "libxml2",
33 ], 31 ],
34 static_libs: ["VtsHalHidlTargetTestBase"], 32 shared_libs: [
35 cflags: [ 33 "libicuuc",
36 "-O0",
37 "-g",
38 ], 34 ],
39} 35}
diff --git a/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp b/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
new file mode 100644
index 00000000..fdc13474
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <unistd.h>
18
19#include "utility/ValidateXml.h"
20
21TEST(CheckConfig, audioEffectsConfigurationValidation) {
22 RecordProperty("description",
23 "Verify that the effects configuration file is valid according to the schema");
24 const char* xmlConfigFile = "/vendor/etc/audio_effects.xml";
25 // Not every device uses XML configuration, so only validate
26 // if the XML configuration actually exists.
27 if (access(xmlConfigFile, F_OK) == 0) {
28 ASSERT_VALID_XML(xmlConfigFile, "/data/local/tmp/audio_effects_conf_V2_0.xsd");
29 }
30}
diff --git a/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd b/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd
new file mode 100644
index 00000000..ca6a7dc6
--- /dev/null
+++ b/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd
@@ -0,0 +1,249 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2017 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
17 targetNamespace="http://schemas.android.com/audio/audio_effects_conf/v2_0"
18 xmlns:aec="http://schemas.android.com/audio/audio_effects_conf/v2_0"
19 elementFormDefault="qualified">
20
21 <!-- Simple types -->
22 <xs:simpleType name="versionType">
23 <xs:restriction base="xs:decimal">
24 <xs:enumeration value="2.0"/>
25 </xs:restriction>
26 </xs:simpleType>
27 <xs:simpleType name="uuidType">
28 <xs:restriction base="xs:string">
29 <xs:pattern value="[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}"/>
30 </xs:restriction>
31 </xs:simpleType>
32 <xs:simpleType name="streamInputType">
33 <xs:restriction base="xs:string">
34 <xs:enumeration value="mic"/>
35 <xs:enumeration value="voice_uplink"/>
36 <xs:enumeration value="voice_downlink"/>
37 <xs:enumeration value="voice_call"/>
38 <xs:enumeration value="camcorder"/>
39 <xs:enumeration value="voice_recognition"/>
40 <xs:enumeration value="voice_communication"/>
41 <xs:enumeration value="unprocessed"/>
42 </xs:restriction>
43 </xs:simpleType>
44 <xs:simpleType name="streamOutputType">
45 <xs:restriction base="xs:string">
46 <xs:enumeration value="voice_call"/>
47 <xs:enumeration value="system"/>
48 <xs:enumeration value="ring"/>
49 <xs:enumeration value="music"/>
50 <xs:enumeration value="alarm"/>
51 <xs:enumeration value="notification"/>
52 <xs:enumeration value="bluetooth_sco"/>
53 <xs:enumeration value="enforced_audible"/>
54 <xs:enumeration value="dtmf"/>
55 <xs:enumeration value="tts"/>
56 </xs:restriction>
57 </xs:simpleType>
58 <xs:simpleType name="relativePathType">
59 <xs:restriction base="xs:string">
60 <xs:pattern value="[^/].*"/>
61 </xs:restriction>
62 </xs:simpleType>
63
64 <!-- Complex types -->
65 <xs:complexType name="librariesType">
66 <xs:annotation>
67 <xs:documentation xml:lang="en">
68 List of effect libraries to load. Each library element must have "name" and
69 "path" attributes. The latter is giving the path of the library .so file
70 relative to the standard effect folders: /(vendor|odm|system)/lib(64)?/soundfx/
71
72 Example for a library in "/vendor/lib/soundfx/lib.so":
73 <library name="name" path="lib.so"/>
74
75 </xs:documentation>
76 </xs:annotation>
77 <xs:sequence>
78 <xs:element name="library" minOccurs="0" maxOccurs="unbounded">
79 <xs:complexType>
80 <xs:attribute name="name" type="xs:string" use="required"/>
81 <xs:attribute name="path" type="aec:relativePathType" use="required"/>
82 </xs:complexType>
83 </xs:element>
84 </xs:sequence>
85 </xs:complexType>
86 <xs:complexType name="effectImplType">
87 <xs:attribute name="library" type="xs:string" use="required"/>
88 <xs:attribute name="uuid" type="aec:uuidType" use="required"/>
89 </xs:complexType>
90 <xs:complexType name="effectType">
91 <xs:complexContent>
92 <xs:extension base="aec:effectImplType">
93 <xs:attribute name="name" type="xs:string" use="required"/>
94 </xs:extension>
95 </xs:complexContent>
96 </xs:complexType>
97 <xs:complexType name="effectProxyType">
98 <xs:complexContent>
99 <xs:extension base="aec:effectType">
100 <xs:sequence>
101 <xs:element name="libsw" type="aec:effectImplType"/>
102 <xs:element name="libhw" type="aec:effectImplType"/>
103 </xs:sequence>
104 </xs:extension>
105 </xs:complexContent>
106 </xs:complexType>
107 <xs:complexType name="effectsType">
108 <xs:annotation>
109 <xs:documentation xml:lang="en">
110 List of effects to load. Each effect element must contain "name",
111 "library", and "uuid" attrs. The value of the "library" attr must
112 correspond to the name of a "library" element. The name of the effect
113 element is indicative, only the value of the "uuid" element designates
114 the effect for the audio framework. The uuid is the implementation
115 specific UUID as specified by the effect vendor. This is not the generic
116 effect type UUID.
117
118 For effect proxy implementations, SW and HW implemetations of the effect
119 can be specified.
120
121 Example:
122
123 <effect name="name" library="lib" uuid="uuuu"/>
124 <effectProxy name="proxied" library="proxy" uuid="xxxx">
125 <libsw library="sw_bundle" uuid="yyyy"/>
126 <libhw library="offload_bundle" uuid="zzzz"/>
127 </effectProxy>
128
129 </xs:documentation>
130 </xs:annotation>
131 <xs:choice maxOccurs="unbounded">
132 <xs:element name="effect" type="aec:effectType" minOccurs="0" maxOccurs="unbounded"/>
133 <xs:element name="effectProxy" type="aec:effectProxyType" minOccurs="0" maxOccurs="unbounded"/>
134 </xs:choice>
135 </xs:complexType>
136 <xs:complexType name="streamProcessingType">
137 <xs:sequence>
138 <xs:element name="apply" minOccurs="0" maxOccurs="unbounded">
139 <xs:complexType>
140 <xs:attribute name="effect" type="xs:string" use="required"/>
141 </xs:complexType>
142 </xs:element>
143 </xs:sequence>
144 </xs:complexType>
145 <xs:complexType name="streamPreprocessType">
146 <xs:annotation>
147 <xs:documentation xml:lang="en">
148 Audio preprocessing configuration. The processing configuration consists
149 of a list of elements each describing processing settings for a given
150 input stream. Valid input stream types are listed in "streamInputType".
151
152 Each stream element contains a list of "apply" elements. The value of the
153 "effect" attr must correspond to the name of an "effect" element.
154
155 Example:
156
157 <stream type="voice_communication">
158 <apply effect="effect1"/>
159 <apply effect="effect2"/>
160 </stream>
161
162 </xs:documentation>
163 </xs:annotation>
164 <xs:complexContent>
165 <xs:extension base="aec:streamProcessingType">
166 <xs:attribute name="type" type="aec:streamInputType" use="required"/>
167 </xs:extension>
168 </xs:complexContent>
169 </xs:complexType>
170 <xs:complexType name="streamPostprocessType">
171 <xs:annotation>
172 <xs:documentation xml:lang="en">
173 Audio postprocessing configuration. The processing configuration consists
174 of a list of elements each describing processing settings for a given
175 output stream. Valid output stream types are listed in "streamOutputType".
176
177 Each stream element contains a list of "apply" elements. The value of the
178 "effect" attr must correspond to the name of an "effect" element.
179
180 Example:
181
182 <stream type="music">
183 <apply effect="effect1"/>
184 </stream>
185
186 </xs:documentation>
187 </xs:annotation>
188 <xs:complexContent>
189 <xs:extension base="aec:streamProcessingType">
190 <xs:attribute name="type" type="aec:streamOutputType" use="required"/>
191 </xs:extension>
192 </xs:complexContent>
193 </xs:complexType>
194
195 <!-- Root element -->
196 <xs:element name="audio_effects_conf">
197 <xs:complexType>
198 <xs:sequence>
199 <xs:element name="libraries" type="aec:librariesType"/>
200 <xs:element name="effects" type="aec:effectsType"/>
201 <xs:element name="postprocess" minOccurs="0" maxOccurs="1">
202 <xs:complexType>
203 <xs:sequence>
204 <xs:element name="stream" type="aec:streamPostprocessType" minOccurs="0" maxOccurs="unbounded"/>
205 </xs:sequence>
206 </xs:complexType>
207 </xs:element>
208 <xs:element name="preprocess" minOccurs="0" maxOccurs="1">
209 <xs:complexType>
210 <xs:sequence>
211 <xs:element name="stream" type="aec:streamPreprocessType" minOccurs="0" maxOccurs="unbounded"/>
212 </xs:sequence>
213 </xs:complexType>
214 </xs:element>
215 </xs:sequence>
216 <xs:attribute name="version" type="aec:versionType" use="required"/>
217 </xs:complexType>
218
219 <!-- Keys and references -->
220 <xs:key name="libraryName">
221 <xs:selector xpath="aec:libraries/aec:library"/>
222 <xs:field xpath="@name"/>
223 </xs:key>
224 <xs:keyref name="libraryNameRef1" refer="aec:libraryName">
225 <xs:selector xpath="aec:effects/aec:effect"/>
226 <xs:field xpath="@library"/>
227 </xs:keyref>
228 <xs:keyref name="libraryNameRef2" refer="aec:libraryName">
229 <xs:selector xpath="aec:effects/aec:effect/aec:libsw"/>
230 <xs:field xpath="@library"/>
231 </xs:keyref>
232 <xs:keyref name="libraryNameRef3" refer="aec:libraryName">
233 <xs:selector xpath="aec:effects/aec:effect/aec:libhw"/>
234 <xs:field xpath="@library"/>
235 </xs:keyref>
236 <xs:key name="effectName">
237 <xs:selector xpath="aec:effects/aec:effect"/>
238 <xs:field xpath="@name"/>
239 </xs:key>
240 <xs:keyref name="effectNamePreRef" refer="aec:effectName">
241 <xs:selector xpath="aec:preprocess/aec:stream/aec:apply"/>
242 <xs:field xpath="@effect"/>
243 </xs:keyref>
244 <xs:keyref name="effectNamePostRef" refer="aec:effectName">
245 <xs:selector xpath="aec:postprocess/aec:stream/aec:apply"/>
246 <xs:field xpath="@effect"/>
247 </xs:keyref>
248 </xs:element>
249</xs:schema>
diff --git a/automotive/Android.bp b/automotive/Android.bp
index be588299..8cde817d 100644
--- a/automotive/Android.bp
+++ b/automotive/Android.bp
@@ -1,7 +1,9 @@
1// This is an autogenerated file, do not edit. 1// This is an autogenerated file, do not edit.
2subdirs = [ 2subdirs = [
3 "evs/1.0", 3 "evs/1.0",
4 "evs/1.0/default",
4 "evs/1.0/vts/functional", 5 "evs/1.0/vts/functional",
5 "vehicle/2.0", 6 "vehicle/2.0",
6 "vehicle/2.1", 7 "vehicle/2.0/default",
8 "vehicle/2.0/default/impl/vhal_v2_0/proto",
7] 9]
diff --git a/automotive/evs/1.0/default/Android.bp b/automotive/evs/1.0/default/Android.bp
new file mode 100644
index 00000000..2574e860
--- /dev/null
+++ b/automotive/evs/1.0/default/Android.bp
@@ -0,0 +1,31 @@
1cc_binary {
2 name: "android.hardware.automotive.evs@1.0-service",
3 defaults: ["hidl_defaults"],
4 proprietary: true,
5 relative_install_path: "hw",
6 srcs: [
7 "service.cpp",
8 "EvsCamera.cpp",
9 "EvsEnumerator.cpp",
10 "EvsDisplay.cpp"
11 ],
12 init_rc: ["android.hardware.automotive.evs@1.0-service.rc"],
13
14 shared_libs: [
15 "android.hardware.automotive.evs@1.0",
16 "libui",
17 "libbase",
18 "libbinder",
19 "libcutils",
20 "libhardware",
21 "libhidlbase",
22 "libhidltransport",
23 "liblog",
24 "libutils",
25 ],
26
27 cflags: [
28 "-O0",
29 "-g",
30 ],
31}
diff --git a/automotive/evs/1.0/default/Android.mk b/automotive/evs/1.0/default/Android.mk
deleted file mode 100644
index 0ee70711..00000000
--- a/automotive/evs/1.0/default/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
1LOCAL_PATH:=$(call my-dir)
2
3include $(CLEAR_VARS)
4LOCAL_MODULE := android.hardware.automotive.evs@1.0-service
5LOCAL_INIT_RC := android.hardware.automotive.evs@1.0-service.rc
6LOCAL_MODULE_RELATIVE_PATH := hw
7LOCAL_VENDOR_MODULE := true
8
9LOCAL_SRC_FILES := \
10 service.cpp \
11 EvsCamera.cpp \
12 EvsEnumerator.cpp \
13 EvsDisplay.cpp \
14
15LOCAL_SHARED_LIBRARIES := \
16 android.hardware.automotive.evs@1.0 \
17 libui \
18 libbase \
19 libbinder \
20 libcutils \
21 libhardware \
22 libhidlbase \
23 libhidltransport \
24 liblog \
25 libutils \
26
27LOCAL_CFLAGS := -O0 -g
28
29include $(BUILD_EXECUTABLE)
diff --git a/automotive/evs/1.0/vts/functional/Android.bp b/automotive/evs/1.0/vts/functional/Android.bp
index e86e9bcd..555ff5bc 100644
--- a/automotive/evs/1.0/vts/functional/Android.bp
+++ b/automotive/evs/1.0/vts/functional/Android.bp
@@ -15,10 +15,10 @@
15// 15//
16 16
17cc_test { 17cc_test {
18 name: "VtsEvsV1_0Target", 18 name: "VtsHalEvsV1_0Target",
19 19
20 srcs: [ 20 srcs: [
21 "VtsEvsV1_0TargetTest.cpp", 21 "VtsHalEvsV1_0TargetTest.cpp",
22 "FrameHandler.cpp", 22 "FrameHandler.cpp",
23 "FormatConvert.cpp" 23 "FormatConvert.cpp"
24 ], 24 ],
@@ -43,4 +43,3 @@ cc_test {
43 "-g", 43 "-g",
44 ], 44 ],
45} 45}
46
diff --git a/automotive/evs/1.0/vts/functional/VtsEvsV1_0TargetTest.cpp b/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp
index 2e80afe8..57050d75 100644
--- a/automotive/evs/1.0/vts/functional/VtsEvsV1_0TargetTest.cpp
+++ b/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp
@@ -17,8 +17,13 @@
17#define LOG_TAG "VtsHalEvsTest" 17#define LOG_TAG "VtsHalEvsTest"
18 18
19 19
20// TODO: How should we configure these values to target appropriate hardware? 20// Note: We have't got a great way to indicate which target
21const static char kEnumeratorName[] = "EvsEnumeratorHw-Mock"; 21// should be tested, so we'll leave the interface served by the
22// default (mock) EVS driver here for easy reference. All
23// actual EVS drivers should serve on the EvsEnumeratorHw name,
24// however, so the code is checked in that way.
25//const static char kEnumeratorName[] = "EvsEnumeratorHw-Mock";
26const static char kEnumeratorName[] = "EvsEnumeratorHw";
22 27
23 28
24// These values are called out in the EVS design doc (as of Mar 8, 2017) 29// These values are called out in the EVS design doc (as of Mar 8, 2017)
@@ -474,4 +479,4 @@ TEST_F(EvsHidlTest, CameraToDisplayRoundTrip) {
474 479
475 // Explicitly release the display 480 // Explicitly release the display
476 pEnumerator->closeDisplay(pDisplay); 481 pEnumerator->closeDisplay(pDisplay);
477} \ No newline at end of file 482}
diff --git a/automotive/vehicle/2.0/Android.mk b/automotive/vehicle/2.0/Android.mk
index eb05f35e..59194874 100644
--- a/automotive/vehicle/2.0/Android.mk
+++ b/automotive/vehicle/2.0/Android.mk
@@ -17,6 +17,177 @@ LOCAL_JAVA_LIBRARIES := \
17 17
18 18
19# 19#
20# Build types.hal (DiagnosticFloatSensorIndex)
21#
22GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticFloatSensorIndex.java
23$(GEN): $(HIDL)
24$(GEN): PRIVATE_HIDL := $(HIDL)
25$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
26$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
27$(GEN): PRIVATE_CUSTOM_TOOL = \
28 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
29 -Ljava \
30 -randroid.hardware:hardware/interfaces \
31 -randroid.hidl:system/libhidl/transport \
32 android.hardware.automotive.vehicle@2.0::types.DiagnosticFloatSensorIndex
33
34$(GEN): $(LOCAL_PATH)/types.hal
35 $(transform-generated-source)
36LOCAL_GENERATED_SOURCES += $(GEN)
37
38#
39# Build types.hal (DiagnosticIntegerSensorIndex)
40#
41GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticIntegerSensorIndex.java
42$(GEN): $(HIDL)
43$(GEN): PRIVATE_HIDL := $(HIDL)
44$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
45$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
46$(GEN): PRIVATE_CUSTOM_TOOL = \
47 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
48 -Ljava \
49 -randroid.hardware:hardware/interfaces \
50 -randroid.hidl:system/libhidl/transport \
51 android.hardware.automotive.vehicle@2.0::types.DiagnosticIntegerSensorIndex
52
53$(GEN): $(LOCAL_PATH)/types.hal
54 $(transform-generated-source)
55LOCAL_GENERATED_SOURCES += $(GEN)
56
57#
58# Build types.hal (Obd2CommonIgnitionMonitors)
59#
60GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CommonIgnitionMonitors.java
61$(GEN): $(HIDL)
62$(GEN): PRIVATE_HIDL := $(HIDL)
63$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
64$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
65$(GEN): PRIVATE_CUSTOM_TOOL = \
66 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
67 -Ljava \
68 -randroid.hardware:hardware/interfaces \
69 -randroid.hidl:system/libhidl/transport \
70 android.hardware.automotive.vehicle@2.0::types.Obd2CommonIgnitionMonitors
71
72$(GEN): $(LOCAL_PATH)/types.hal
73 $(transform-generated-source)
74LOCAL_GENERATED_SOURCES += $(GEN)
75
76#
77# Build types.hal (Obd2CompressionIgnitionMonitors)
78#
79GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CompressionIgnitionMonitors.java
80$(GEN): $(HIDL)
81$(GEN): PRIVATE_HIDL := $(HIDL)
82$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
83$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
84$(GEN): PRIVATE_CUSTOM_TOOL = \
85 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
86 -Ljava \
87 -randroid.hardware:hardware/interfaces \
88 -randroid.hidl:system/libhidl/transport \
89 android.hardware.automotive.vehicle@2.0::types.Obd2CompressionIgnitionMonitors
90
91$(GEN): $(LOCAL_PATH)/types.hal
92 $(transform-generated-source)
93LOCAL_GENERATED_SOURCES += $(GEN)
94
95#
96# Build types.hal (Obd2FuelSystemStatus)
97#
98GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelSystemStatus.java
99$(GEN): $(HIDL)
100$(GEN): PRIVATE_HIDL := $(HIDL)
101$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
102$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
103$(GEN): PRIVATE_CUSTOM_TOOL = \
104 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
105 -Ljava \
106 -randroid.hardware:hardware/interfaces \
107 -randroid.hidl:system/libhidl/transport \
108 android.hardware.automotive.vehicle@2.0::types.Obd2FuelSystemStatus
109
110$(GEN): $(LOCAL_PATH)/types.hal
111 $(transform-generated-source)
112LOCAL_GENERATED_SOURCES += $(GEN)
113
114#
115# Build types.hal (Obd2FuelType)
116#
117GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelType.java
118$(GEN): $(HIDL)
119$(GEN): PRIVATE_HIDL := $(HIDL)
120$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
121$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
122$(GEN): PRIVATE_CUSTOM_TOOL = \
123 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
124 -Ljava \
125 -randroid.hardware:hardware/interfaces \
126 -randroid.hidl:system/libhidl/transport \
127 android.hardware.automotive.vehicle@2.0::types.Obd2FuelType
128
129$(GEN): $(LOCAL_PATH)/types.hal
130 $(transform-generated-source)
131LOCAL_GENERATED_SOURCES += $(GEN)
132
133#
134# Build types.hal (Obd2IgnitionMonitorKind)
135#
136GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2IgnitionMonitorKind.java
137$(GEN): $(HIDL)
138$(GEN): PRIVATE_HIDL := $(HIDL)
139$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
140$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
141$(GEN): PRIVATE_CUSTOM_TOOL = \
142 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
143 -Ljava \
144 -randroid.hardware:hardware/interfaces \
145 -randroid.hidl:system/libhidl/transport \
146 android.hardware.automotive.vehicle@2.0::types.Obd2IgnitionMonitorKind
147
148$(GEN): $(LOCAL_PATH)/types.hal
149 $(transform-generated-source)
150LOCAL_GENERATED_SOURCES += $(GEN)
151
152#
153# Build types.hal (Obd2SecondaryAirStatus)
154#
155GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SecondaryAirStatus.java
156$(GEN): $(HIDL)
157$(GEN): PRIVATE_HIDL := $(HIDL)
158$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
159$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
160$(GEN): PRIVATE_CUSTOM_TOOL = \
161 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
162 -Ljava \
163 -randroid.hardware:hardware/interfaces \
164 -randroid.hidl:system/libhidl/transport \
165 android.hardware.automotive.vehicle@2.0::types.Obd2SecondaryAirStatus
166
167$(GEN): $(LOCAL_PATH)/types.hal
168 $(transform-generated-source)
169LOCAL_GENERATED_SOURCES += $(GEN)
170
171#
172# Build types.hal (Obd2SparkIgnitionMonitors)
173#
174GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SparkIgnitionMonitors.java
175$(GEN): $(HIDL)
176$(GEN): PRIVATE_HIDL := $(HIDL)
177$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
178$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
179$(GEN): PRIVATE_CUSTOM_TOOL = \
180 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
181 -Ljava \
182 -randroid.hardware:hardware/interfaces \
183 -randroid.hidl:system/libhidl/transport \
184 android.hardware.automotive.vehicle@2.0::types.Obd2SparkIgnitionMonitors
185
186$(GEN): $(LOCAL_PATH)/types.hal
187 $(transform-generated-source)
188LOCAL_GENERATED_SOURCES += $(GEN)
189
190#
20# Build types.hal (StatusCode) 191# Build types.hal (StatusCode)
21# 192#
22GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java 193GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
@@ -910,6 +1081,139 @@ $(GEN): $(LOCAL_PATH)/types.hal
910LOCAL_GENERATED_SOURCES += $(GEN) 1081LOCAL_GENERATED_SOURCES += $(GEN)
911 1082
912# 1083#
1084# Build types.hal (VmsAvailabilityStateIntegerValuesIndex)
1085#
1086GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsAvailabilityStateIntegerValuesIndex.java
1087$(GEN): $(HIDL)
1088$(GEN): PRIVATE_HIDL := $(HIDL)
1089$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1090$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1091$(GEN): PRIVATE_CUSTOM_TOOL = \
1092 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1093 -Ljava \
1094 -randroid.hardware:hardware/interfaces \
1095 -randroid.hidl:system/libhidl/transport \
1096 android.hardware.automotive.vehicle@2.0::types.VmsAvailabilityStateIntegerValuesIndex
1097
1098$(GEN): $(LOCAL_PATH)/types.hal
1099 $(transform-generated-source)
1100LOCAL_GENERATED_SOURCES += $(GEN)
1101
1102#
1103# Build types.hal (VmsBaseMessageIntegerValuesIndex)
1104#
1105GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsBaseMessageIntegerValuesIndex.java
1106$(GEN): $(HIDL)
1107$(GEN): PRIVATE_HIDL := $(HIDL)
1108$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1109$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1110$(GEN): PRIVATE_CUSTOM_TOOL = \
1111 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1112 -Ljava \
1113 -randroid.hardware:hardware/interfaces \
1114 -randroid.hidl:system/libhidl/transport \
1115 android.hardware.automotive.vehicle@2.0::types.VmsBaseMessageIntegerValuesIndex
1116
1117$(GEN): $(LOCAL_PATH)/types.hal
1118 $(transform-generated-source)
1119LOCAL_GENERATED_SOURCES += $(GEN)
1120
1121#
1122# Build types.hal (VmsMessageType)
1123#
1124GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageType.java
1125$(GEN): $(HIDL)
1126$(GEN): PRIVATE_HIDL := $(HIDL)
1127$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1128$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1129$(GEN): PRIVATE_CUSTOM_TOOL = \
1130 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1131 -Ljava \
1132 -randroid.hardware:hardware/interfaces \
1133 -randroid.hidl:system/libhidl/transport \
1134 android.hardware.automotive.vehicle@2.0::types.VmsMessageType
1135
1136$(GEN): $(LOCAL_PATH)/types.hal
1137 $(transform-generated-source)
1138LOCAL_GENERATED_SOURCES += $(GEN)
1139
1140#
1141# Build types.hal (VmsMessageWithLayerAndPublisherIdIntegerValuesIndex)
1142#
1143GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.java
1144$(GEN): $(HIDL)
1145$(GEN): PRIVATE_HIDL := $(HIDL)
1146$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1147$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1148$(GEN): PRIVATE_CUSTOM_TOOL = \
1149 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1150 -Ljava \
1151 -randroid.hardware:hardware/interfaces \
1152 -randroid.hidl:system/libhidl/transport \
1153 android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerAndPublisherIdIntegerValuesIndex
1154
1155$(GEN): $(LOCAL_PATH)/types.hal
1156 $(transform-generated-source)
1157LOCAL_GENERATED_SOURCES += $(GEN)
1158
1159#
1160# Build types.hal (VmsMessageWithLayerIntegerValuesIndex)
1161#
1162GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerIntegerValuesIndex.java
1163$(GEN): $(HIDL)
1164$(GEN): PRIVATE_HIDL := $(HIDL)
1165$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1166$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1167$(GEN): PRIVATE_CUSTOM_TOOL = \
1168 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1169 -Ljava \
1170 -randroid.hardware:hardware/interfaces \
1171 -randroid.hidl:system/libhidl/transport \
1172 android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerIntegerValuesIndex
1173
1174$(GEN): $(LOCAL_PATH)/types.hal
1175 $(transform-generated-source)
1176LOCAL_GENERATED_SOURCES += $(GEN)
1177
1178#
1179# Build types.hal (VmsOfferingMessageIntegerValuesIndex)
1180#
1181GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsOfferingMessageIntegerValuesIndex.java
1182$(GEN): $(HIDL)
1183$(GEN): PRIVATE_HIDL := $(HIDL)
1184$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1185$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1186$(GEN): PRIVATE_CUSTOM_TOOL = \
1187 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1188 -Ljava \
1189 -randroid.hardware:hardware/interfaces \
1190 -randroid.hidl:system/libhidl/transport \
1191 android.hardware.automotive.vehicle@2.0::types.VmsOfferingMessageIntegerValuesIndex
1192
1193$(GEN): $(LOCAL_PATH)/types.hal
1194 $(transform-generated-source)
1195LOCAL_GENERATED_SOURCES += $(GEN)
1196
1197#
1198# Build types.hal (VmsSubscriptionsStateIntegerValuesIndex)
1199#
1200GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsSubscriptionsStateIntegerValuesIndex.java
1201$(GEN): $(HIDL)
1202$(GEN): PRIVATE_HIDL := $(HIDL)
1203$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1204$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1205$(GEN): PRIVATE_CUSTOM_TOOL = \
1206 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1207 -Ljava \
1208 -randroid.hardware:hardware/interfaces \
1209 -randroid.hidl:system/libhidl/transport \
1210 android.hardware.automotive.vehicle@2.0::types.VmsSubscriptionsStateIntegerValuesIndex
1211
1212$(GEN): $(LOCAL_PATH)/types.hal
1213 $(transform-generated-source)
1214LOCAL_GENERATED_SOURCES += $(GEN)
1215
1216#
913# Build types.hal (Wheel) 1217# Build types.hal (Wheel)
914# 1218#
915GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java 1219GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java
@@ -989,6 +1293,177 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
989 1293
990 1294
991# 1295#
1296# Build types.hal (DiagnosticFloatSensorIndex)
1297#
1298GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticFloatSensorIndex.java
1299$(GEN): $(HIDL)
1300$(GEN): PRIVATE_HIDL := $(HIDL)
1301$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1302$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1303$(GEN): PRIVATE_CUSTOM_TOOL = \
1304 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1305 -Ljava \
1306 -randroid.hardware:hardware/interfaces \
1307 -randroid.hidl:system/libhidl/transport \
1308 android.hardware.automotive.vehicle@2.0::types.DiagnosticFloatSensorIndex
1309
1310$(GEN): $(LOCAL_PATH)/types.hal
1311 $(transform-generated-source)
1312LOCAL_GENERATED_SOURCES += $(GEN)
1313
1314#
1315# Build types.hal (DiagnosticIntegerSensorIndex)
1316#
1317GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticIntegerSensorIndex.java
1318$(GEN): $(HIDL)
1319$(GEN): PRIVATE_HIDL := $(HIDL)
1320$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1321$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1322$(GEN): PRIVATE_CUSTOM_TOOL = \
1323 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1324 -Ljava \
1325 -randroid.hardware:hardware/interfaces \
1326 -randroid.hidl:system/libhidl/transport \
1327 android.hardware.automotive.vehicle@2.0::types.DiagnosticIntegerSensorIndex
1328
1329$(GEN): $(LOCAL_PATH)/types.hal
1330 $(transform-generated-source)
1331LOCAL_GENERATED_SOURCES += $(GEN)
1332
1333#
1334# Build types.hal (Obd2CommonIgnitionMonitors)
1335#
1336GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CommonIgnitionMonitors.java
1337$(GEN): $(HIDL)
1338$(GEN): PRIVATE_HIDL := $(HIDL)
1339$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1340$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1341$(GEN): PRIVATE_CUSTOM_TOOL = \
1342 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1343 -Ljava \
1344 -randroid.hardware:hardware/interfaces \
1345 -randroid.hidl:system/libhidl/transport \
1346 android.hardware.automotive.vehicle@2.0::types.Obd2CommonIgnitionMonitors
1347
1348$(GEN): $(LOCAL_PATH)/types.hal
1349 $(transform-generated-source)
1350LOCAL_GENERATED_SOURCES += $(GEN)
1351
1352#
1353# Build types.hal (Obd2CompressionIgnitionMonitors)
1354#
1355GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CompressionIgnitionMonitors.java
1356$(GEN): $(HIDL)
1357$(GEN): PRIVATE_HIDL := $(HIDL)
1358$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1359$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1360$(GEN): PRIVATE_CUSTOM_TOOL = \
1361 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1362 -Ljava \
1363 -randroid.hardware:hardware/interfaces \
1364 -randroid.hidl:system/libhidl/transport \
1365 android.hardware.automotive.vehicle@2.0::types.Obd2CompressionIgnitionMonitors
1366
1367$(GEN): $(LOCAL_PATH)/types.hal
1368 $(transform-generated-source)
1369LOCAL_GENERATED_SOURCES += $(GEN)
1370
1371#
1372# Build types.hal (Obd2FuelSystemStatus)
1373#
1374GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelSystemStatus.java
1375$(GEN): $(HIDL)
1376$(GEN): PRIVATE_HIDL := $(HIDL)
1377$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1378$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1379$(GEN): PRIVATE_CUSTOM_TOOL = \
1380 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1381 -Ljava \
1382 -randroid.hardware:hardware/interfaces \
1383 -randroid.hidl:system/libhidl/transport \
1384 android.hardware.automotive.vehicle@2.0::types.Obd2FuelSystemStatus
1385
1386$(GEN): $(LOCAL_PATH)/types.hal
1387 $(transform-generated-source)
1388LOCAL_GENERATED_SOURCES += $(GEN)
1389
1390#
1391# Build types.hal (Obd2FuelType)
1392#
1393GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelType.java
1394$(GEN): $(HIDL)
1395$(GEN): PRIVATE_HIDL := $(HIDL)
1396$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1397$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1398$(GEN): PRIVATE_CUSTOM_TOOL = \
1399 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1400 -Ljava \
1401 -randroid.hardware:hardware/interfaces \
1402 -randroid.hidl:system/libhidl/transport \
1403 android.hardware.automotive.vehicle@2.0::types.Obd2FuelType
1404
1405$(GEN): $(LOCAL_PATH)/types.hal
1406 $(transform-generated-source)
1407LOCAL_GENERATED_SOURCES += $(GEN)
1408
1409#
1410# Build types.hal (Obd2IgnitionMonitorKind)
1411#
1412GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2IgnitionMonitorKind.java
1413$(GEN): $(HIDL)
1414$(GEN): PRIVATE_HIDL := $(HIDL)
1415$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1416$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1417$(GEN): PRIVATE_CUSTOM_TOOL = \
1418 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1419 -Ljava \
1420 -randroid.hardware:hardware/interfaces \
1421 -randroid.hidl:system/libhidl/transport \
1422 android.hardware.automotive.vehicle@2.0::types.Obd2IgnitionMonitorKind
1423
1424$(GEN): $(LOCAL_PATH)/types.hal
1425 $(transform-generated-source)
1426LOCAL_GENERATED_SOURCES += $(GEN)
1427
1428#
1429# Build types.hal (Obd2SecondaryAirStatus)
1430#
1431GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SecondaryAirStatus.java
1432$(GEN): $(HIDL)
1433$(GEN): PRIVATE_HIDL := $(HIDL)
1434$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1435$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1436$(GEN): PRIVATE_CUSTOM_TOOL = \
1437 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1438 -Ljava \
1439 -randroid.hardware:hardware/interfaces \
1440 -randroid.hidl:system/libhidl/transport \
1441 android.hardware.automotive.vehicle@2.0::types.Obd2SecondaryAirStatus
1442
1443$(GEN): $(LOCAL_PATH)/types.hal
1444 $(transform-generated-source)
1445LOCAL_GENERATED_SOURCES += $(GEN)
1446
1447#
1448# Build types.hal (Obd2SparkIgnitionMonitors)
1449#
1450GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SparkIgnitionMonitors.java
1451$(GEN): $(HIDL)
1452$(GEN): PRIVATE_HIDL := $(HIDL)
1453$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
1454$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
1455$(GEN): PRIVATE_CUSTOM_TOOL = \
1456 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
1457 -Ljava \
1458 -randroid.hardware:hardware/interfaces \
1459 -randroid.hidl:system/libhidl/transport \
1460 android.hardware.automotive.vehicle@2.0::types.Obd2SparkIgnitionMonitors
1461
1462$(GEN): $(LOCAL_PATH)/types.hal
1463 $(transform-generated-source)
1464LOCAL_GENERATED_SOURCES += $(GEN)
1465
1466#
992# Build types.hal (StatusCode) 1467# Build types.hal (StatusCode)
993# 1468#
994GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java 1469GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
@@ -1882,6 +2357,139 @@ $(GEN): $(LOCAL_PATH)/types.hal
1882LOCAL_GENERATED_SOURCES += $(GEN) 2357LOCAL_GENERATED_SOURCES += $(GEN)
1883 2358
1884# 2359#
2360# Build types.hal (VmsAvailabilityStateIntegerValuesIndex)
2361#
2362GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsAvailabilityStateIntegerValuesIndex.java
2363$(GEN): $(HIDL)
2364$(GEN): PRIVATE_HIDL := $(HIDL)
2365$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2366$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2367$(GEN): PRIVATE_CUSTOM_TOOL = \
2368 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2369 -Ljava \
2370 -randroid.hardware:hardware/interfaces \
2371 -randroid.hidl:system/libhidl/transport \
2372 android.hardware.automotive.vehicle@2.0::types.VmsAvailabilityStateIntegerValuesIndex
2373
2374$(GEN): $(LOCAL_PATH)/types.hal
2375 $(transform-generated-source)
2376LOCAL_GENERATED_SOURCES += $(GEN)
2377
2378#
2379# Build types.hal (VmsBaseMessageIntegerValuesIndex)
2380#
2381GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsBaseMessageIntegerValuesIndex.java
2382$(GEN): $(HIDL)
2383$(GEN): PRIVATE_HIDL := $(HIDL)
2384$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2385$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2386$(GEN): PRIVATE_CUSTOM_TOOL = \
2387 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2388 -Ljava \
2389 -randroid.hardware:hardware/interfaces \
2390 -randroid.hidl:system/libhidl/transport \
2391 android.hardware.automotive.vehicle@2.0::types.VmsBaseMessageIntegerValuesIndex
2392
2393$(GEN): $(LOCAL_PATH)/types.hal
2394 $(transform-generated-source)
2395LOCAL_GENERATED_SOURCES += $(GEN)
2396
2397#
2398# Build types.hal (VmsMessageType)
2399#
2400GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageType.java
2401$(GEN): $(HIDL)
2402$(GEN): PRIVATE_HIDL := $(HIDL)
2403$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2404$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2405$(GEN): PRIVATE_CUSTOM_TOOL = \
2406 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2407 -Ljava \
2408 -randroid.hardware:hardware/interfaces \
2409 -randroid.hidl:system/libhidl/transport \
2410 android.hardware.automotive.vehicle@2.0::types.VmsMessageType
2411
2412$(GEN): $(LOCAL_PATH)/types.hal
2413 $(transform-generated-source)
2414LOCAL_GENERATED_SOURCES += $(GEN)
2415
2416#
2417# Build types.hal (VmsMessageWithLayerAndPublisherIdIntegerValuesIndex)
2418#
2419GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.java
2420$(GEN): $(HIDL)
2421$(GEN): PRIVATE_HIDL := $(HIDL)
2422$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2423$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2424$(GEN): PRIVATE_CUSTOM_TOOL = \
2425 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2426 -Ljava \
2427 -randroid.hardware:hardware/interfaces \
2428 -randroid.hidl:system/libhidl/transport \
2429 android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerAndPublisherIdIntegerValuesIndex
2430
2431$(GEN): $(LOCAL_PATH)/types.hal
2432 $(transform-generated-source)
2433LOCAL_GENERATED_SOURCES += $(GEN)
2434
2435#
2436# Build types.hal (VmsMessageWithLayerIntegerValuesIndex)
2437#
2438GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerIntegerValuesIndex.java
2439$(GEN): $(HIDL)
2440$(GEN): PRIVATE_HIDL := $(HIDL)
2441$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2442$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2443$(GEN): PRIVATE_CUSTOM_TOOL = \
2444 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2445 -Ljava \
2446 -randroid.hardware:hardware/interfaces \
2447 -randroid.hidl:system/libhidl/transport \
2448 android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerIntegerValuesIndex
2449
2450$(GEN): $(LOCAL_PATH)/types.hal
2451 $(transform-generated-source)
2452LOCAL_GENERATED_SOURCES += $(GEN)
2453
2454#
2455# Build types.hal (VmsOfferingMessageIntegerValuesIndex)
2456#
2457GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsOfferingMessageIntegerValuesIndex.java
2458$(GEN): $(HIDL)
2459$(GEN): PRIVATE_HIDL := $(HIDL)
2460$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2461$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2462$(GEN): PRIVATE_CUSTOM_TOOL = \
2463 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2464 -Ljava \
2465 -randroid.hardware:hardware/interfaces \
2466 -randroid.hidl:system/libhidl/transport \
2467 android.hardware.automotive.vehicle@2.0::types.VmsOfferingMessageIntegerValuesIndex
2468
2469$(GEN): $(LOCAL_PATH)/types.hal
2470 $(transform-generated-source)
2471LOCAL_GENERATED_SOURCES += $(GEN)
2472
2473#
2474# Build types.hal (VmsSubscriptionsStateIntegerValuesIndex)
2475#
2476GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsSubscriptionsStateIntegerValuesIndex.java
2477$(GEN): $(HIDL)
2478$(GEN): PRIVATE_HIDL := $(HIDL)
2479$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
2480$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
2481$(GEN): PRIVATE_CUSTOM_TOOL = \
2482 $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
2483 -Ljava \
2484 -randroid.hardware:hardware/interfaces \
2485 -randroid.hidl:system/libhidl/transport \
2486 android.hardware.automotive.vehicle@2.0::types.VmsSubscriptionsStateIntegerValuesIndex
2487
2488$(GEN): $(LOCAL_PATH)/types.hal
2489 $(transform-generated-source)
2490LOCAL_GENERATED_SOURCES += $(GEN)
2491
2492#
1885# Build types.hal (Wheel) 2493# Build types.hal (Wheel)
1886# 2494#
1887GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java 2495GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
new file mode 100644
index 00000000..1690163d
--- /dev/null
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -0,0 +1,117 @@
1// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15cc_defaults {
16 name: "vhal_v2_0_defaults",
17 shared_libs: [
18 "libhidlbase",
19 "libhidltransport",
20 "liblog",
21 "libutils",
22 "android.hardware.automotive.vehicle@2.0",
23 ],
24 cflags: [
25 "-Wall",
26 "-Wextra",
27 "-Werror",
28 ],
29}
30
31cc_library_headers {
32 name: "vhal_v2_0_common_headers",
33 vendor: true,
34 export_include_dirs: ["common/include/vhal_v2_0"],
35}
36
37// Vehicle reference implementation lib
38cc_library_static {
39 name: "android.hardware.automotive.vehicle@2.0-manager-lib",
40 vendor: true,
41 defaults: ["vhal_v2_0_defaults"],
42 srcs: [
43 "common/src/Obd2SensorStore.cpp",
44 "common/src/SubscriptionManager.cpp",
45 "common/src/VehicleHalManager.cpp",
46 "common/src/VehicleObjectPool.cpp",
47 "common/src/VehiclePropertyStore.cpp",
48 "common/src/VehicleUtils.cpp",
49 ],
50 local_include_dirs: ["common/include/vhal_v2_0"],
51 export_include_dirs: ["common/include"],
52}
53
54cc_library_shared {
55 name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
56 vendor: true,
57 static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
58 export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
59}
60
61// Vehicle default VehicleHAL implementation
62cc_library_static {
63 name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
64 vendor: true,
65 defaults: ["vhal_v2_0_defaults"],
66 srcs: [
67 "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
68 "impl/vhal_v2_0/VehicleEmulator.cpp",
69 "impl/vhal_v2_0/PipeComm.cpp",
70 "impl/vhal_v2_0/SocketComm.cpp",
71 ],
72 local_include_dirs: ["common/include/vhal_v2_0"],
73 export_include_dirs: ["impl"],
74 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
75 shared_libs: [
76 "libbase",
77 "libprotobuf-cpp-lite",
78 ],
79 static_libs: [
80 "libqemu_pipe",
81 "android.hardware.automotive.vehicle@2.0-libproto-native",
82 ],
83}
84
85cc_test {
86 name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
87 vendor: true,
88 defaults: ["vhal_v2_0_defaults"],
89 whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
90 srcs: [
91 "tests/RecurrentTimer_test.cpp",
92 "tests/SubscriptionManager_test.cpp",
93 "tests/VehicleHalManager_test.cpp",
94 "tests/VehicleObjectPool_test.cpp",
95 "tests/VehiclePropConfigIndex_test.cpp",
96 ],
97 header_libs: ["libbase_headers"],
98}
99
100cc_binary {
101 name: "android.hardware.automotive.vehicle@2.0-service",
102 defaults: ["vhal_v2_0_defaults"],
103 init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
104 vendor: true,
105 relative_install_path: "hw",
106 srcs: ["VehicleService.cpp"],
107 shared_libs: [
108 "libbase",
109 "libprotobuf-cpp-lite",
110 ],
111 static_libs: [
112 "android.hardware.automotive.vehicle@2.0-manager-lib",
113 "android.hardware.automotive.vehicle@2.0-default-impl-lib",
114 "android.hardware.automotive.vehicle@2.0-libproto-native",
115 "libqemu_pipe",
116 ],
117}
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
deleted file mode 100644
index ebc565dc..00000000
--- a/automotive/vehicle/2.0/default/Android.mk
+++ /dev/null
@@ -1,198 +0,0 @@
1# Copyright (C) 2016 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16
17vhal_v2_0 = android.hardware.automotive.vehicle@2.0
18
19###############################################################################
20# Vehicle reference implementation lib
21###############################################################################
22include $(CLEAR_VARS)
23LOCAL_MODULE := $(vhal_v2_0)-manager-lib
24LOCAL_SRC_FILES := \
25 common/src/SubscriptionManager.cpp \
26 common/src/VehicleHalManager.cpp \
27 common/src/VehicleObjectPool.cpp \
28 common/src/VehiclePropertyStore.cpp \
29 common/src/VehicleUtils.cpp \
30
31LOCAL_CFLAGS := -Wall -Werror
32
33LOCAL_C_INCLUDES := \
34 $(LOCAL_PATH)/common/include/vhal_v2_0
35
36LOCAL_EXPORT_C_INCLUDE_DIRS := \
37 $(LOCAL_PATH)/common/include
38
39LOCAL_SHARED_LIBRARIES := \
40 libhidlbase \
41 libhidltransport \
42 liblog \
43 libutils \
44 $(vhal_v2_0) \
45
46include $(BUILD_STATIC_LIBRARY)
47
48
49include $(CLEAR_VARS)
50LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared
51LOCAL_SRC_FILES := \
52 common/src/SubscriptionManager.cpp \
53 common/src/VehicleHalManager.cpp \
54 common/src/VehicleObjectPool.cpp \
55 common/src/VehiclePropertyStore.cpp \
56 common/src/VehicleUtils.cpp \
57
58LOCAL_CFLAGS := -Wall -Werror
59
60LOCAL_C_INCLUDES := \
61 $(LOCAL_PATH)/common/include/vhal_v2_0
62
63LOCAL_EXPORT_C_INCLUDE_DIRS := \
64 $(LOCAL_PATH)/common/include
65
66LOCAL_SHARED_LIBRARIES := \
67 libhidlbase \
68 libhidltransport \
69 liblog \
70 libutils \
71 $(vhal_v2_0) \
72
73include $(BUILD_SHARED_LIBRARY)
74
75###############################################################################
76# Vehicle HAL Protobuf library
77###############################################################################
78include $(CLEAR_VARS)
79LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
80
81LOCAL_PROTOC_OPTIMIZE_TYPE := nano
82
83LOCAL_MODULE := $(vhal_v2_0)-libproto-native
84LOCAL_MODULE_CLASS := STATIC_LIBRARIES
85
86LOCAL_MODULE_TAGS := optional
87
88LOCAL_STRIP_MODULE := keep_symbols
89
90generated_sources_dir := $(call local-generated-sources-dir)
91LOCAL_EXPORT_C_INCLUDE_DIRS := \
92 $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
93
94include $(BUILD_STATIC_LIBRARY)
95
96
97###############################################################################
98# Vehicle default VehicleHAL implementation
99###############################################################################
100include $(CLEAR_VARS)
101
102LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
103LOCAL_SRC_FILES:= \
104 impl/vhal_v2_0/EmulatedVehicleHal.cpp \
105 impl/vhal_v2_0/VehicleEmulator.cpp \
106 impl/vhal_v2_0/PipeComm.cpp \
107 impl/vhal_v2_0/SocketComm.cpp \
108
109LOCAL_C_INCLUDES := \
110 $(LOCAL_PATH)/impl/vhal_v2_0
111
112LOCAL_EXPORT_C_INCLUDE_DIRS := \
113 $(LOCAL_PATH)/impl
114
115LOCAL_WHOLE_STATIC_LIBRARIES := \
116 $(vhal_v2_0)-manager-lib \
117
118LOCAL_SHARED_LIBRARIES := \
119 libbase \
120 libhidlbase \
121 libhidltransport \
122 liblog \
123 libprotobuf-cpp-lite \
124 libutils \
125 $(vhal_v2_0) \
126
127LOCAL_STATIC_LIBRARIES := \
128 libqemu_pipe \
129 $(vhal_v2_0)-libproto-native \
130
131LOCAL_CFLAGS += -Wall -Wextra -Werror
132
133include $(BUILD_STATIC_LIBRARY)
134
135
136###############################################################################
137# Vehicle reference implementation unit tests
138###############################################################################
139include $(CLEAR_VARS)
140
141LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
142
143LOCAL_WHOLE_STATIC_LIBRARIES := \
144 $(vhal_v2_0)-manager-lib \
145
146LOCAL_SRC_FILES:= \
147 tests/RecurrentTimer_test.cpp \
148 tests/SubscriptionManager_test.cpp \
149 tests/VehicleHalManager_test.cpp \
150 tests/VehicleObjectPool_test.cpp \
151 tests/VehiclePropConfigIndex_test.cpp \
152
153LOCAL_HEADER_LIBRARIES := \
154 libbase_headers
155
156LOCAL_SHARED_LIBRARIES := \
157 libhidlbase \
158 libhidltransport \
159 liblog \
160 libutils \
161 $(vhal_v2_0) \
162
163LOCAL_CFLAGS += -Wall -Wextra -Werror
164LOCAL_MODULE_TAGS := tests
165
166include $(BUILD_NATIVE_TEST)
167
168
169###############################################################################
170# Vehicle HAL service
171###############################################################################
172include $(CLEAR_VARS)
173LOCAL_MODULE := $(vhal_v2_0)-service
174LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
175LOCAL_PROPRIETARY_MODULE := true
176LOCAL_MODULE_RELATIVE_PATH := hw
177
178LOCAL_SRC_FILES := \
179 VehicleService.cpp
180
181LOCAL_SHARED_LIBRARIES := \
182 libbase \
183 libhidlbase \
184 libhidltransport \
185 liblog \
186 libprotobuf-cpp-lite \
187 libutils \
188 $(vhal_v2_0) \
189
190LOCAL_STATIC_LIBRARIES := \
191 $(vhal_v2_0)-manager-lib \
192 $(vhal_v2_0)-default-impl-lib \
193 $(vhal_v2_0)-libproto-native \
194 libqemu_pipe \
195
196LOCAL_CFLAGS += -Wall -Wextra -Werror
197
198include $(BUILD_EXECUTABLE)
diff --git a/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
index 6c44626d..191a565c 100644
--- a/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
+++ b/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
@@ -14,38 +14,37 @@
14 * limitations under the License. 14 * limitations under the License.
15 */ 15 */
16 16
17#ifndef android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_ 17#ifndef android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
18#define android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_ 18#define android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
19 19
20#include <vector> 20#include <vector>
21 21
22#include <android/hardware/automotive/vehicle/2.1/types.h> 22#include <android/hardware/automotive/vehicle/2.0/types.h>
23 23
24namespace android { 24namespace android {
25namespace hardware { 25namespace hardware {
26namespace automotive { 26namespace automotive {
27namespace vehicle { 27namespace vehicle {
28namespace V2_1 { 28namespace V2_0 {
29 29
30// This class wraps all the logic required to create an OBD2 frame. 30// This class wraps all the logic required to create an OBD2 frame.
31// It allows storing sensor values, setting appropriate bitmasks as needed, 31// It allows storing sensor values, setting appropriate bitmasks as needed,
32// and returning appropriately laid out storage of sensor values suitable 32// and returning appropriately laid out storage of sensor values suitable
33// for being returned via a VehicleHal implementation. 33// for being returned via a VehicleHal implementation.
34class Obd2SensorStore { 34class Obd2SensorStore {
35public: 35 public:
36 // Creates a sensor storage with a given number of vendor-specific sensors. 36 // Creates a sensor storage with a given number of vendor-specific sensors.
37 Obd2SensorStore(size_t numVendorIntegerSensors, 37 Obd2SensorStore(size_t numVendorIntegerSensors, size_t numVendorFloatSensors);
38 size_t numVendorFloatSensors);
39 38
40 // Stores an integer-valued sensor. 39 // Stores an integer-valued sensor.
41 V2_0::StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value); 40 StatusCode setIntegerSensor(DiagnosticIntegerSensorIndex index, int32_t value);
42 // Stores an integer-valued sensor. 41 // Stores an integer-valued sensor.
43 V2_0::StatusCode setIntegerSensor(size_t index, int32_t value); 42 StatusCode setIntegerSensor(size_t index, int32_t value);
44 43
45 // Stores a float-valued sensor. 44 // Stores a float-valued sensor.
46 V2_0::StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value); 45 StatusCode setFloatSensor(DiagnosticFloatSensorIndex index, float value);
47 // Stores a float-valued sensor. 46 // Stores a float-valued sensor.
48 V2_0::StatusCode setFloatSensor(size_t index, float value); 47 StatusCode setFloatSensor(size_t index, float value);
49 48
50 // Returns a vector that contains all integer sensors stored. 49 // Returns a vector that contains all integer sensors stored.
51 const std::vector<int32_t>& getIntegerSensors() const; 50 const std::vector<int32_t>& getIntegerSensors() const;
@@ -55,11 +54,11 @@ public:
55 const std::vector<uint8_t>& getSensorsBitmask() const; 54 const std::vector<uint8_t>& getSensorsBitmask() const;
56 55
57 // Given a stringValue, fill in a VehiclePropValue 56 // Given a stringValue, fill in a VehiclePropValue
58 void fillPropValue(const std::string& dtc, V2_0::VehiclePropValue *propValue) const; 57 void fillPropValue(const std::string& dtc, VehiclePropValue* propValue) const;
59 58
60private: 59 private:
61 class BitmaskInVector { 60 class BitmaskInVector {
62 public: 61 public:
63 BitmaskInVector(size_t numBits = 0); 62 BitmaskInVector(size_t numBits = 0);
64 void resize(size_t numBits); 63 void resize(size_t numBits);
65 bool get(size_t index) const; 64 bool get(size_t index) const;
@@ -67,7 +66,7 @@ private:
67 66
68 const std::vector<uint8_t>& getBitmask() const; 67 const std::vector<uint8_t>& getBitmask() const;
69 68
70 private: 69 private:
71 std::vector<uint8_t> mStorage; 70 std::vector<uint8_t> mStorage;
72 }; 71 };
73 72
@@ -76,7 +75,7 @@ private:
76 BitmaskInVector mSensorsBitmask; 75 BitmaskInVector mSensorsBitmask;
77}; 76};
78 77
79} // namespace V2_1 78} // namespace V2_0
80} // namespace vehicle 79} // namespace vehicle
81} // namespace automotive 80} // namespace automotive
82} // namespace hardware 81} // namespace hardware
diff --git a/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp b/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
index f4c63a95..65174f7a 100644
--- a/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
+++ b/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
@@ -23,23 +23,21 @@ namespace android {
23namespace hardware { 23namespace hardware {
24namespace automotive { 24namespace automotive {
25namespace vehicle { 25namespace vehicle {
26namespace V2_1 { 26namespace V2_0 {
27 27
28Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits) 28Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits) {
29{
30 resize(numBits); 29 resize(numBits);
31} 30}
32 31
33void Obd2SensorStore::BitmaskInVector::resize(size_t numBits) { 32void Obd2SensorStore::BitmaskInVector::resize(size_t numBits) {
34 mStorage = std::vector<uint8_t>((numBits+7)/8, 0); 33 mStorage = std::vector<uint8_t>((numBits + 7) / 8, 0);
35} 34}
36 35
37void Obd2SensorStore::BitmaskInVector::set(size_t index, bool value) { 36void Obd2SensorStore::BitmaskInVector::set(size_t index, bool value) {
38 const size_t byteIndex = index / 8; 37 const size_t byteIndex = index / 8;
39 const size_t bitIndex = index % 8; 38 const size_t bitIndex = index % 8;
40 const uint8_t byte = mStorage[byteIndex]; 39 const uint8_t byte = mStorage[byteIndex];
41 uint8_t newValue = value ? (byte | (1 << bitIndex)) : 40 uint8_t newValue = value ? (byte | (1 << bitIndex)) : (byte & ~(1 << bitIndex));
42 (byte & ~(1 << bitIndex));
43 mStorage[byteIndex] = newValue; 41 mStorage[byteIndex] = newValue;
44} 42}
45 43
@@ -54,37 +52,33 @@ const std::vector<uint8_t>& Obd2SensorStore::BitmaskInVector::getBitmask() const
54 return mStorage; 52 return mStorage;
55} 53}
56 54
57Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors, 55Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors, size_t numVendorFloatSensors) {
58 size_t numVendorFloatSensors) { 56 // because the last index is valid *inclusive*
59 // because the last index is valid *inclusive* 57 const size_t numSystemIntegerSensors =
60 const size_t numSystemIntegerSensors = V2_0::toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)+1; 58 toInt(DiagnosticIntegerSensorIndex::LAST_SYSTEM_INDEX) + 1;
61 const size_t numSystemFloatSensors = V2_0::toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)+1; 59 const size_t numSystemFloatSensors = toInt(DiagnosticFloatSensorIndex::LAST_SYSTEM_INDEX) + 1;
62 mIntegerSensors = std::vector<int32_t>( 60 mIntegerSensors = std::vector<int32_t>(numSystemIntegerSensors + numVendorIntegerSensors, 0);
63 numSystemIntegerSensors+numVendorIntegerSensors, 0); 61 mFloatSensors = std::vector<float>(numSystemFloatSensors + numVendorFloatSensors, 0);
64 mFloatSensors = std::vector<float>( 62 mSensorsBitmask.resize(mIntegerSensors.size() + mFloatSensors.size());
65 numSystemFloatSensors+numVendorFloatSensors, 0);
66 mSensorsBitmask.resize(mIntegerSensors.size()+mFloatSensors.size());
67} 63}
68 64
69V2_0::StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index, 65StatusCode Obd2SensorStore::setIntegerSensor(DiagnosticIntegerSensorIndex index, int32_t value) {
70 int32_t value) { 66 return setIntegerSensor(toInt(index), value);
71 return setIntegerSensor(V2_0::toInt(index), value);
72} 67}
73V2_0::StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index, 68StatusCode Obd2SensorStore::setFloatSensor(DiagnosticFloatSensorIndex index, float value) {
74 float value) { 69 return setFloatSensor(toInt(index), value);
75 return setFloatSensor(V2_0::toInt(index), value);
76} 70}
77 71
78V2_0::StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) { 72StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
79 mIntegerSensors[index] = value; 73 mIntegerSensors[index] = value;
80 mSensorsBitmask.set(index, true); 74 mSensorsBitmask.set(index, true);
81 return V2_0::StatusCode::OK; 75 return StatusCode::OK;
82} 76}
83 77
84V2_0::StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) { 78StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
85 mFloatSensors[index] = value; 79 mFloatSensors[index] = value;
86 mSensorsBitmask.set(index + mIntegerSensors.size(), true); 80 mSensorsBitmask.set(index + mIntegerSensors.size(), true);
87 return V2_0::StatusCode::OK; 81 return StatusCode::OK;
88} 82}
89 83
90const std::vector<int32_t>& Obd2SensorStore::getIntegerSensors() const { 84const std::vector<int32_t>& Obd2SensorStore::getIntegerSensors() const {
@@ -99,8 +93,7 @@ const std::vector<uint8_t>& Obd2SensorStore::getSensorsBitmask() const {
99 return mSensorsBitmask.getBitmask(); 93 return mSensorsBitmask.getBitmask();
100} 94}
101 95
102void Obd2SensorStore::fillPropValue(const std::string& dtc, 96void Obd2SensorStore::fillPropValue(const std::string& dtc, VehiclePropValue* propValue) const {
103 V2_0::VehiclePropValue *propValue) const {
104 propValue->timestamp = elapsedRealtimeNano(); 97 propValue->timestamp = elapsedRealtimeNano();
105 propValue->value.int32Values = getIntegerSensors(); 98 propValue->value.int32Values = getIntegerSensors();
106 propValue->value.floatValues = getFloatSensors(); 99 propValue->value.floatValues = getFloatSensors();
@@ -108,8 +101,6 @@ void Obd2SensorStore::fillPropValue(const std::string& dtc,
108 propValue->value.stringValue = dtc; 101 propValue->value.stringValue = dtc;
109} 102}
110 103
111
112
113} // namespace V2_0 104} // namespace V2_0
114} // namespace vehicle 105} // namespace vehicle
115} // namespace automotive 106} // namespace automotive
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
index fb63e364..08d3d794 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultConfig.h
@@ -27,6 +27,18 @@ namespace vehicle {
27namespace V2_0 { 27namespace V2_0 {
28 28
29namespace impl { 29namespace impl {
30//
31// Some handy constants to avoid conversions from enum to int.
32constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE;
33constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME;
34constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME;
35constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO;
36constexpr int OBD2_FREEZE_FRAME_CLEAR = (int)VehicleProperty::OBD2_FREEZE_FRAME_CLEAR;
37constexpr int TRACTION_CONTROL_ACTIVE = (int)VehicleProperty::TRACTION_CONTROL_ACTIVE;
38constexpr int VEHICLE_MAP_SERVICE = (int)VehicleProperty::VEHICLE_MAP_SERVICE;
39constexpr int WHEEL_TICK = (int)VehicleProperty::WHEEL_TICK;
40constexpr int ALL_WHEELS =
41 (int)(Wheel::LEFT_FRONT | Wheel::RIGHT_FRONT | Wheel::LEFT_REAR | Wheel::RIGHT_REAR);
30 42
31/* 43/*
32 * This property is used for test purpose to generate fake events. 44 * This property is used for test purpose to generate fake events.
@@ -283,8 +295,68 @@ const ConfigDeclaration kVehicleProperties[]{
283 .access = VehiclePropertyAccess::READ, 295 .access = VehiclePropertyAccess::READ,
284 .changeMode = VehiclePropertyChangeMode::ON_CHANGE, 296 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
285 }, 297 },
286 .initialValue = {.int32Values = {1}}} 298 .initialValue = {.int32Values = {1}}},
299
300 {
301 .config =
302 {
303 .prop = WHEEL_TICK,
304 .access = VehiclePropertyAccess::READ,
305 .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
306 .configArray = {ALL_WHEELS, 50000, 50000, 50000, 50000},
307 .minSampleRate = 1.0f,
308 .maxSampleRate = 100.0f,
309 },
310 },
311
312 {
313 .config =
314 {
315 .prop = ABS_ACTIVE,
316 .access = VehiclePropertyAccess::READ,
317 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
318 },
319 },
320
321 {
322 .config =
323 {
324 .prop = TRACTION_CONTROL_ACTIVE,
325 .access = VehiclePropertyAccess::READ,
326 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
327 },
328 },
287 329
330 {
331 .config = {.prop = OBD2_LIVE_FRAME,
332 .access = VehiclePropertyAccess::READ,
333 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
334 .configArray = {0, 0}},
335 },
336
337 {
338 .config = {.prop = OBD2_FREEZE_FRAME,
339 .access = VehiclePropertyAccess::READ,
340 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
341 .configArray = {0, 0}},
342 },
343
344 {
345 .config = {.prop = OBD2_FREEZE_FRAME_INFO,
346 .access = VehiclePropertyAccess::READ,
347 .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
348 },
349
350 {
351 .config = {.prop = OBD2_FREEZE_FRAME_CLEAR,
352 .access = VehiclePropertyAccess::WRITE,
353 .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
354 .configArray = {1}},
355 },
356
357 {.config = {.prop = VEHICLE_MAP_SERVICE,
358 .access = VehiclePropertyAccess::READ_WRITE,
359 .changeMode = VehiclePropertyChangeMode::ON_CHANGE}},
288}; 360};
289 361
290} // impl 362} // impl
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
index fe34a3f6..6bc05224 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
@@ -19,6 +19,7 @@
19#include <android-base/macros.h> 19#include <android-base/macros.h>
20 20
21#include "EmulatedVehicleHal.h" 21#include "EmulatedVehicleHal.h"
22#include "Obd2SensorStore.h"
22 23
23namespace android { 24namespace android {
24namespace hardware { 25namespace hardware {
@@ -28,6 +29,62 @@ namespace V2_0 {
28 29
29namespace impl { 30namespace impl {
30 31
32static std::unique_ptr<Obd2SensorStore> fillDefaultObd2Frame(size_t numVendorIntegerSensors,
33 size_t numVendorFloatSensors) {
34 std::unique_ptr<Obd2SensorStore> sensorStore(
35 new Obd2SensorStore(numVendorIntegerSensors, numVendorFloatSensors));
36
37 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::FUEL_SYSTEM_STATUS,
38 toInt(Obd2FuelSystemStatus::CLOSED_LOOP));
39 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
40 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
41 toInt(Obd2IgnitionMonitorKind::SPARK));
42 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::IGNITION_SPECIFIC_MONITORS,
43 Obd2CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
44 Obd2CommonIgnitionMonitors::MISFIRE_AVAILABLE |
45 Obd2SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
46 Obd2SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE);
47 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::INTAKE_AIR_TEMPERATURE, 35);
48 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::COMMANDED_SECONDARY_AIR_STATUS,
49 toInt(Obd2SecondaryAirStatus::FROM_OUTSIDE_OR_OFF));
50 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::NUM_OXYGEN_SENSORS_PRESENT, 1);
51 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::RUNTIME_SINCE_ENGINE_START, 500);
52 sensorStore->setIntegerSensor(
53 DiagnosticIntegerSensorIndex::DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON, 0);
54 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::WARMUPS_SINCE_CODES_CLEARED, 51);
55 sensorStore->setIntegerSensor(
56 DiagnosticIntegerSensorIndex::DISTANCE_TRAVELED_SINCE_CODES_CLEARED, 365);
57 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE, 30);
58 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::CONTROL_MODULE_VOLTAGE, 12);
59 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::AMBIENT_AIR_TEMPERATURE, 18);
60 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::MAX_FUEL_AIR_EQUIVALENCE_RATIO, 1);
61 sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::FUEL_TYPE,
62 toInt(Obd2FuelType::GASOLINE));
63 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::CALCULATED_ENGINE_LOAD, 0.153);
64 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK1, -0.16);
65 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK1, -0.16);
66 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK2, -0.16);
67 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK2, -0.16);
68 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::INTAKE_MANIFOLD_ABSOLUTE_PRESSURE, 7.5);
69 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ENGINE_RPM, 1250.);
70 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::VEHICLE_SPEED, 40.);
71 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::TIMING_ADVANCE, 2.5);
72 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::THROTTLE_POSITION, 19.75);
73 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::OXYGEN_SENSOR1_VOLTAGE, 0.265);
74 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::FUEL_TANK_LEVEL_INPUT, 0.824);
75 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::EVAPORATION_SYSTEM_VAPOR_PRESSURE,
76 -0.373);
77 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::CATALYST_TEMPERATURE_BANK1_SENSOR1,
78 190.);
79 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::RELATIVE_THROTTLE_POSITION, 3.);
80 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ABSOLUTE_THROTTLE_POSITION_B, 0.306);
81 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ACCELERATOR_PEDAL_POSITION_D, 0.188);
82 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ACCELERATOR_PEDAL_POSITION_E, 0.094);
83 sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::COMMANDED_THROTTLE_ACTUATOR, 0.024);
84
85 return sensorStore;
86}
87
31enum class FakeDataCommand : int32_t { 88enum class FakeDataCommand : int32_t {
32 Stop = 0, 89 Stop = 0,
33 Start = 1, 90 Start = 1,
@@ -40,7 +97,7 @@ EmulatedVehicleHal::EmulatedVehicleHal(VehiclePropertyStore* propStore)
40 this, std::placeholders::_1)), 97 this, std::placeholders::_1)),
41 mFakeValueGenerator(std::bind(&EmulatedVehicleHal::onFakeValueGenerated, 98 mFakeValueGenerator(std::bind(&EmulatedVehicleHal::onFakeValueGenerated,
42 this, std::placeholders::_1, std::placeholders::_2)) { 99 this, std::placeholders::_1, std::placeholders::_2)) {
43 100 initStaticConfig();
44 for (size_t i = 0; i < arraysize(kVehicleProperties); i++) { 101 for (size_t i = 0; i < arraysize(kVehicleProperties); i++) {
45 mPropStore->registerProperty(kVehicleProperties[i].config); 102 mPropStore->registerProperty(kVehicleProperties[i].config);
46 } 103 }
@@ -48,23 +105,39 @@ EmulatedVehicleHal::EmulatedVehicleHal(VehiclePropertyStore* propStore)
48 105
49VehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get( 106VehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get(
50 const VehiclePropValue& requestedPropValue, StatusCode* outStatus) { 107 const VehiclePropValue& requestedPropValue, StatusCode* outStatus) {
108 auto propId = requestedPropValue.prop;
109 auto& pool = *getValuePool();
51 VehiclePropValuePtr v = nullptr; 110 VehiclePropValuePtr v = nullptr;
52 111
53 auto internalPropValue = mPropStore->readValueOrNull(requestedPropValue); 112 switch (propId) {
54 if (internalPropValue != nullptr) { 113 case OBD2_FREEZE_FRAME:
55 v = getValuePool()->obtain(*internalPropValue); 114 v = pool.obtainComplex();
115 *outStatus = fillObd2FreezeFrame(requestedPropValue, v.get());
116 break;
117 case OBD2_FREEZE_FRAME_INFO:
118 v = pool.obtainComplex();
119 *outStatus = fillObd2DtcInfo(v.get());
120 break;
121 default:
122 auto internalPropValue = mPropStore->readValueOrNull(requestedPropValue);
123 if (internalPropValue != nullptr) {
124 v = getValuePool()->obtain(*internalPropValue);
125 }
126
127 *outStatus = v != nullptr ? StatusCode::OK : StatusCode::INVALID_ARG;
128 break;
56 } 129 }
57 130
58 *outStatus = v != nullptr ? StatusCode::OK : StatusCode::INVALID_ARG;
59 return v; 131 return v;
60} 132}
61 133
62StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) { 134StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
63 if (propValue.prop == kGenerateFakeDataControllingProperty) { 135 if (propValue.prop == kGenerateFakeDataControllingProperty) {
64 return handleGenerateFakeDataRequest(propValue); 136 StatusCode status = handleGenerateFakeDataRequest(propValue);
65 }; 137 if (status != StatusCode::OK) {
66 138 return status;
67 if (mHvacPowerProps.count(propValue.prop)) { 139 }
140 } else if (mHvacPowerProps.count(propValue.prop)) {
68 auto hvacPowerOn = mPropStore->readValueOrNull(toInt(VehicleProperty::HVAC_POWER_ON), 141 auto hvacPowerOn = mPropStore->readValueOrNull(toInt(VehicleProperty::HVAC_POWER_ON),
69 toInt(VehicleAreaZone::ROW_1)); 142 toInt(VehicleAreaZone::ROW_1));
70 143
@@ -72,6 +145,12 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
72 && hvacPowerOn->value.int32Values[0] == 0) { 145 && hvacPowerOn->value.int32Values[0] == 0) {
73 return StatusCode::NOT_AVAILABLE; 146 return StatusCode::NOT_AVAILABLE;
74 } 147 }
148 } else if (propValue.prop == OBD2_FREEZE_FRAME_CLEAR) {
149 return clearObd2FreezeFrames(propValue);
150 } else if (propValue.prop == VEHICLE_MAP_SERVICE) {
151 // Placeholder for future implementation of VMS property in the default hal. For now, just
152 // returns OK; otherwise, hal clients crash with property not supported.
153 return StatusCode::OK;
75 } 154 }
76 155
77 if (!mPropStore->writeValue(propValue)) { 156 if (!mPropStore->writeValue(propValue)) {
@@ -83,12 +162,29 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
83 return StatusCode::OK; 162 return StatusCode::OK;
84} 163}
85 164
165static bool isDiagnosticProperty(VehiclePropConfig propConfig) {
166 switch (propConfig.prop) {
167 case OBD2_LIVE_FRAME:
168 case OBD2_FREEZE_FRAME:
169 case OBD2_FREEZE_FRAME_CLEAR:
170 case OBD2_FREEZE_FRAME_INFO:
171 return true;
172 }
173 return false;
174}
175
86// Parse supported properties list and generate vector of property values to hold current values. 176// Parse supported properties list and generate vector of property values to hold current values.
87void EmulatedVehicleHal::onCreate() { 177void EmulatedVehicleHal::onCreate() {
88 for (auto& it : kVehicleProperties) { 178 for (auto& it : kVehicleProperties) {
89 VehiclePropConfig cfg = it.config; 179 VehiclePropConfig cfg = it.config;
90 int32_t supportedAreas = cfg.supportedAreas; 180 int32_t supportedAreas = cfg.supportedAreas;
91 181
182 if (isDiagnosticProperty(cfg)) {
183 // do not write an initial empty value for the diagnostic properties
184 // as we will initialize those separately.
185 continue;
186 }
187
92 // A global property will have supportedAreas = 0 188 // A global property will have supportedAreas = 0
93 if (isGlobalProp(cfg.prop)) { 189 if (isGlobalProp(cfg.prop)) {
94 supportedAreas = 0; 190 supportedAreas = 0;
@@ -120,6 +216,8 @@ void EmulatedVehicleHal::onCreate() {
120 216
121 } while (supportedAreas != 0); 217 } while (supportedAreas != 0);
122 } 218 }
219 initObd2LiveFrame(*mPropStore->getConfigOrDie(OBD2_LIVE_FRAME));
220 initObd2FreezeFrame(*mPropStore->getConfigOrDie(OBD2_FREEZE_FRAME));
123} 221}
124 222
125std::vector<VehiclePropConfig> EmulatedVehicleHal::listProperties() { 223std::vector<VehiclePropConfig> EmulatedVehicleHal::listProperties() {
@@ -176,6 +274,13 @@ bool EmulatedVehicleHal::isContinuousProperty(int32_t propId) const {
176} 274}
177 275
178bool EmulatedVehicleHal::setPropertyFromVehicle(const VehiclePropValue& propValue) { 276bool EmulatedVehicleHal::setPropertyFromVehicle(const VehiclePropValue& propValue) {
277 if (propValue.prop == kGenerateFakeDataControllingProperty) {
278 StatusCode status = handleGenerateFakeDataRequest(propValue);
279 if (status != StatusCode::OK) {
280 return false;
281 }
282 }
283
179 if (mPropStore->writeValue(propValue)) { 284 if (mPropStore->writeValue(propValue)) {
180 doHalEvent(getValuePool()->obtain(propValue)); 285 doHalEvent(getValuePool()->obtain(propValue));
181 return true; 286 return true;
@@ -263,6 +368,100 @@ void EmulatedVehicleHal::onFakeValueGenerated(int32_t propId, float value) {
263 } 368 }
264} 369}
265 370
371void EmulatedVehicleHal::initStaticConfig() {
372 for (auto&& it = std::begin(kVehicleProperties); it != std::end(kVehicleProperties); ++it) {
373 const auto& cfg = it->config;
374 VehiclePropertyStore::TokenFunction tokenFunction = nullptr;
375
376 switch (cfg.prop) {
377 case OBD2_FREEZE_FRAME: {
378 tokenFunction = [](const VehiclePropValue& propValue) {
379 return propValue.timestamp;
380 };
381 break;
382 }
383 default:
384 break;
385 }
386
387 mPropStore->registerProperty(cfg, tokenFunction);
388 }
389}
390
391void EmulatedVehicleHal::initObd2LiveFrame(const VehiclePropConfig& propConfig) {
392 auto liveObd2Frame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
393 auto sensorStore = fillDefaultObd2Frame(static_cast<size_t>(propConfig.configArray[0]),
394 static_cast<size_t>(propConfig.configArray[1]));
395 sensorStore->fillPropValue("", liveObd2Frame.get());
396 liveObd2Frame->prop = OBD2_LIVE_FRAME;
397
398 mPropStore->writeValue(*liveObd2Frame);
399}
400
401void EmulatedVehicleHal::initObd2FreezeFrame(const VehiclePropConfig& propConfig) {
402 auto sensorStore = fillDefaultObd2Frame(static_cast<size_t>(propConfig.configArray[0]),
403 static_cast<size_t>(propConfig.configArray[1]));
404
405 static std::vector<std::string> sampleDtcs = {"P0070",
406 "P0102"
407 "P0123"};
408 for (auto&& dtc : sampleDtcs) {
409 auto freezeFrame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
410 sensorStore->fillPropValue(dtc, freezeFrame.get());
411 freezeFrame->prop = OBD2_FREEZE_FRAME;
412
413 mPropStore->writeValue(*freezeFrame);
414 }
415}
416
417StatusCode EmulatedVehicleHal::fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
418 VehiclePropValue* outValue) {
419 if (requestedPropValue.value.int64Values.size() != 1) {
420 ALOGE("asked for OBD2_FREEZE_FRAME without valid timestamp");
421 return StatusCode::INVALID_ARG;
422 }
423 auto timestamp = requestedPropValue.value.int64Values[0];
424 auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
425 if (freezeFrame == nullptr) {
426 ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
427 return StatusCode::INVALID_ARG;
428 }
429 outValue->prop = OBD2_FREEZE_FRAME;
430 outValue->value.int32Values = freezeFrame->value.int32Values;
431 outValue->value.floatValues = freezeFrame->value.floatValues;
432 outValue->value.bytes = freezeFrame->value.bytes;
433 outValue->value.stringValue = freezeFrame->value.stringValue;
434 outValue->timestamp = freezeFrame->timestamp;
435 return StatusCode::OK;
436}
437
438StatusCode EmulatedVehicleHal::clearObd2FreezeFrames(const VehiclePropValue& propValue) {
439 if (propValue.value.int64Values.size() == 0) {
440 mPropStore->removeValuesForProperty(OBD2_FREEZE_FRAME);
441 return StatusCode::OK;
442 } else {
443 for (int64_t timestamp : propValue.value.int64Values) {
444 auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
445 if (freezeFrame == nullptr) {
446 ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
447 return StatusCode::INVALID_ARG;
448 }
449 mPropStore->removeValue(*freezeFrame);
450 }
451 }
452 return StatusCode::OK;
453}
454
455StatusCode EmulatedVehicleHal::fillObd2DtcInfo(VehiclePropValue* outValue) {
456 std::vector<int64_t> timestamps;
457 for (const auto& freezeFrame : mPropStore->readValuesForProperty(OBD2_FREEZE_FRAME)) {
458 timestamps.push_back(freezeFrame.timestamp);
459 }
460 outValue->value.int64Values = timestamps;
461 outValue->prop = OBD2_FREEZE_FRAME_INFO;
462 return StatusCode::OK;
463}
464
266} // impl 465} // impl
267 466
268} // namespace V2_0 467} // namespace V2_0
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.h
index c25e0838..99d7edbc 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.h
@@ -70,8 +70,15 @@ private:
70 70
71 void onContinuousPropertyTimer(const std::vector<int32_t>& properties); 71 void onContinuousPropertyTimer(const std::vector<int32_t>& properties);
72 bool isContinuousProperty(int32_t propId) const; 72 bool isContinuousProperty(int32_t propId) const;
73 73 void initStaticConfig();
74private: 74 void initObd2LiveFrame(const VehiclePropConfig& propConfig);
75 void initObd2FreezeFrame(const VehiclePropConfig& propConfig);
76 StatusCode fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
77 VehiclePropValue* outValue);
78 StatusCode fillObd2DtcInfo(VehiclePropValue* outValue);
79 StatusCode clearObd2FreezeFrames(const VehiclePropValue& propValue);
80
81 /* Private members */
75 VehiclePropertyStore* mPropStore; 82 VehiclePropertyStore* mPropStore;
76 std::unordered_set<int32_t> mHvacPowerProps; 83 std::unordered_set<int32_t> mHvacPowerProps;
77 RecurrentTimer mRecurrentTimer; 84 RecurrentTimer mRecurrentTimer;
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
new file mode 100644
index 00000000..ec352000
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
@@ -0,0 +1,27 @@
1// Copyright (C) 2017 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// Vehicle HAL Protobuf library
16cc_library_static {
17 name: "android.hardware.automotive.vehicle@2.0-libproto-native",
18 vendor: true,
19 proto: {
20 export_proto_headers: true,
21 type: "lite",
22 },
23 strip: {
24 keep_symbols: true,
25 },
26 srcs: ["VehicleHalProto.proto"]
27}
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index f1fb6bf2..7c08b4a0 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -226,6 +226,50 @@ enum VehicleProperty: int32_t {
226 | VehicleArea:GLOBAL), 226 | VehicleArea:GLOBAL),
227 227
228 /** 228 /**
229 * Reports wheel ticks
230 *
231 * The first four elements represent ticks for individual wheels in the
232 * following order: front left, front right, rear right, rear left. All
233 * tick counts are cumulative. Tick counts increment when the vehicle
234 * moves forward, and decrement when vehicles moves in reverse. The ticks
235 * should be reset to 0 when the vehicle is started by the user.
236 *
237 * The next element in the vector is a reset count. A reset indicates
238 * previous tick counts are not comparable with this and future ones. Some
239 * sort of discontinuity in tick counting has occurred.
240 *
241 * int64Values[0] = reset count
242 * int64Values[1] = front left ticks
243 * int64Values[2] = front right ticks
244 * int64Values[3] = rear right ticks
245 * int64Values[4] = rear left ticks
246 *
247 * configArray is used to indicate the micrometers-per-wheel-tick value as well as
248 * which wheels are supported. configArray is set as follows:
249 *
250 * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel.
251 * configArray[1] = micrometers per front left wheel tick
252 * configArray[2] = micrometers per front right wheel tick
253 * configArray[3] = micrometers per rear right wheel tick
254 * configArray[4] = micrometers per rear left wheel tick
255 *
256 * NOTE: If a wheel is not supported, its value shall always be set to 0.
257 *
258 * VehiclePropValue.timestamp must be correctly filled in.
259 *
260 * @change_mode VehiclePropertyChangeMode:CONTINUOUS
261 * @access VehiclePropertyAccess:READ
262 *
263 * @since o.mr1
264 */
265 WHEEL_TICK = (
266 0x0306
267 | VehiclePropertyGroup:SYSTEM
268 | VehiclePropertyType:COMPLEX
269 | VehicleArea:GLOBAL),
270
271
272 /**
229 * Currently selected gear 273 * Currently selected gear
230 * 274 *
231 * @change_mode VehiclePropertyChangeMode:ON_CHANGE 275 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
@@ -328,6 +372,34 @@ enum VehicleProperty: int32_t {
328 | VehicleArea:GLOBAL), 372 | VehicleArea:GLOBAL),
329 373
330 /** 374 /**
375 * ABS is active. Set to true whenever ABS is activated. Reset to false when ABS is off.
376 *
377 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
378 * @access VehiclePropertyAccess:READ
379 *
380 * @since o.mr1
381 */
382 ABS_ACTIVE = (
383 0x040A
384 | VehiclePropertyGroup:SYSTEM
385 | VehiclePropertyType:BOOLEAN
386 | VehicleArea:GLOBAL),
387
388 /**
389 * Traction Control is active.
390 *
391 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
392 * @access VehiclePropertyAccess:READ
393 *
394 * @since o.mr1
395 */
396 TRACTION_CONTROL_ACTIVE = (
397 0x040B
398 | VehiclePropertyGroup:SYSTEM
399 | VehiclePropertyType:BOOLEAN
400 | VehicleArea:GLOBAL),
401
402 /**
331 * Fan speed setting 403 * Fan speed setting
332 * 404 *
333 * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not 405 * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
@@ -604,6 +676,24 @@ enum VehicleProperty: int32_t {
604 | VehicleArea:ZONE), 676 | VehicleArea:ZONE),
605 677
606 /** 678 /**
679 * Represents power state for HVAC. Some HVAC properties must require
680 * matching power to be turned on to get out of OFF state. For non-zoned
681 * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state.
682 *
683 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
684 * @access VehiclePropertyAccess:READ_WRITE
685 * @config_string list of HVAC properties whose power is controlled by this
686 * property. Format is hexa-decimal number (0x...) separated
687 * by comma like "0x500,0x503". All zones defined in these
688 * affected properties must be available in the property.
689 */
690 HVAC_POWER_ON = (
691 0x0510
692 | VehiclePropertyGroup:SYSTEM
693 | VehiclePropertyType:BOOLEAN
694 | VehicleArea:ZONE),
695
696 /**
607 * Fan Positions Available 697 * Fan Positions Available
608 * 698 *
609 * This is a bit mask of fan positions available for the zone. Each entry in 699 * This is a bit mask of fan positions available for the zone. Each entry in
@@ -623,19 +713,18 @@ enum VehicleProperty: int32_t {
623 | VehicleArea:ZONE), 713 | VehicleArea:ZONE),
624 714
625 /** 715 /**
626 * Represents power state for HVAC. Some HVAC properties must require 716 * Automatic re-circulation on/off
627 * matching power to be turned on to get out of OFF state. For non-zoned 717 *
628 * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state. 718 * IVehicle#set and IVehicle#get must return StatusCode::NOT_AVAILABLE when HVAC unit is off.
719 * See HVAC_POWER_ON property for details.
629 * 720 *
630 * @change_mode VehiclePropertyChangeMode:ON_CHANGE 721 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
631 * @access VehiclePropertyAccess:READ_WRITE 722 * @access VehiclePropertyAccess:READ_WRITE
632 * @config_string list of HVAC properties whose power is controlled by this 723 *
633 * property. Format is hexa-decimal number (0x...) separated 724 * @since o.mr1
634 * by comma like "0x500,0x503". All zones defined in these
635 * affected properties must be available in the property.
636 */ 725 */
637 HVAC_POWER_ON = ( 726 HVAC_AUTO_RECIRC_ON = (
638 0x0510 727 0x0512
639 | VehiclePropertyGroup:SYSTEM 728 | VehiclePropertyGroup:SYSTEM
640 | VehiclePropertyType:BOOLEAN 729 | VehiclePropertyType:BOOLEAN
641 | VehicleArea:ZONE), 730 | VehicleArea:ZONE),
@@ -696,7 +785,8 @@ enum VehicleProperty: int32_t {
696 * requested by Android side. The focus has both per stream characteristics 785 * requested by Android side. The focus has both per stream characteristics
697 * and global characteristics. 786 * and global characteristics.
698 * 787 *
699 * Focus request (get of this property) must take the following form: 788 * Focus request (get of this property) must take the following form with indices defined
789 * by VehicleAudioFocusIndex:
700 * int32Values[0]: VehicleAudioFocusRequest type 790 * int32Values[0]: VehicleAudioFocusRequest type
701 * int32Values[1]: bit flags of streams requested by this focus request. 791 * int32Values[1]: bit flags of streams requested by this focus request.
702 * There can be up to 32 streams. 792 * There can be up to 32 streams.
@@ -714,7 +804,7 @@ enum VehicleProperty: int32_t {
714 * REQUEST_RELEASE). In that case, audio module must 804 * REQUEST_RELEASE). In that case, audio module must
715 * maintain mute state until user's explicit action to 805 * maintain mute state until user's explicit action to
716 * play some media. 806 * play some media.
717 * int32Values[3]: Currently active audio contexts. Use combination of 807 * int32Values[3]: Audio contexts wishing to be active. Use combination of
718 * flags from VehicleAudioContextFlag. 808 * flags from VehicleAudioContextFlag.
719 * This can be used as a hint to adjust audio policy or 809 * This can be used as a hint to adjust audio policy or
720 * other policy decision. 810 * other policy decision.
@@ -729,7 +819,7 @@ enum VehicleProperty: int32_t {
729 * request. 819 * request.
730 * 820 *
731 * Focus response (set and subscription callback for this property) must 821 * Focus response (set and subscription callback for this property) must
732 * take the following form: 822 * take the following form with indices defined by VehicleAudioFocusIndex:
733 * int32Values[0]: VehicleAudioFocusState type 823 * int32Values[0]: VehicleAudioFocusState type
734 * int32Values[1]: bit flags of streams allowed. 824 * int32Values[1]: bit flags of streams allowed.
735 * int32Values[2]: External focus state: bit flags of currently active 825 * int32Values[2]: External focus state: bit flags of currently active
@@ -742,22 +832,26 @@ enum VehicleProperty: int32_t {
742 * 0 means no active audio focus holder outside Android. 832 * 0 means no active audio focus holder outside Android.
743 * The state must have following values for each 833 * The state must have following values for each
744 * VehicleAudioFocusState: 834 * VehicleAudioFocusState:
745 * GAIN: 0 or VehicleAudioExtFocusFlag#PLAY_ONLY_FLAG 835 * GAIN: VehicleAudioExtFocusFlag#PLAY_ONLY_FLAG
746 * when radio is active in Android side. 836 * when radio is active in Android side. Otherwise,
747 * GAIN_TRANSIENT: 0. Can be 837 * VehicleAudioExtFocusFlag#NONE_FLAG.
838 * GAIN_TRANSIENT: Can be
748 * VehicleAudioExtFocusFlag#PERMANENT_FLAG or 839 * VehicleAudioExtFocusFlag#PERMANENT_FLAG or
749 * VehicleAudioExtFocusFlag#TRANSIENT_FLAG if android 840 * VehicleAudioExtFocusFlag#TRANSIENT_FLAG if android
750 * side has requested 841 * side has requested
751 * REQUEST_GAIN_TRANSIENT_MAY_DUCK and car side is 842 * REQUEST_GAIN_TRANSIENT_MAY_DUCK and car side is
752 * ducking. 843 * ducking. Otherwise
753 * LOSS: 0 when no focus is audio is active in car side. 844 * VehicleAudioExtFocusFlag#NONE_FLAG.
845 * LOSS: VehicleAudioExtFocusFlag#NONE_FLAG when no focus
846 * is active in car side.
754 * VehicleAudioExtFocusFlag#PERMANENT_FLAG when car 847 * VehicleAudioExtFocusFlag#PERMANENT_FLAG when car
755 * side is playing something permanent. 848 * side is playing something permanent.
756 * LOSS_TRANSIENT: always must be 849 * LOSS_TRANSIENT: must always be
757 * VehicleAudioExtFocusFlag#PERMANENT_FLAG 850 * VehicleAudioExtFocusFlag#PERMANENT_FLAG
758 * int32Values[3]: context requested by android side when responding to 851 * int32Values[3]: Audio context(s) allowed to be active. When responding positively to a
759 * focus request. When car side is taking focus away, 852 * focus request from Android, the request's original context must be
760 * this must be zero. 853 * repeated here. When taking focus away, or denying a request, the
854 * rejected or stopped context would have its corresponding bit cleared.
761 * 855 *
762 * A focus response must be sent per each focus request even if there is 856 * A focus response must be sent per each focus request even if there is
763 * no change in focus state. This can happen in case like focus request 857 * no change in focus state. This can happen in case like focus request
@@ -798,8 +892,8 @@ enum VehicleProperty: int32_t {
798 * 892 *
799 * VehiclePropConfig 893 * VehiclePropConfig
800 * configArray[0] : bit flags of all supported audio contexts from 894 * configArray[0] : bit flags of all supported audio contexts from
801 * VehicleAudioContextFlag. If this is 0, audio volume is 895 * VehicleAudioContextFlag. If this is 0, audio volume
802 * controlled per physical stream. 896 * is controlled per physical stream.
803 * configArray[1] : flags defined in VehicleAudioVolumeCapabilityFlag to 897 * configArray[1] : flags defined in VehicleAudioVolumeCapabilityFlag to
804 * represent audio module's capability. 898 * represent audio module's capability.
805 * configArray[2..3] : reserved 899 * configArray[2..3] : reserved
@@ -809,7 +903,7 @@ enum VehicleProperty: int32_t {
809 * indicates mute state. 903 * indicates mute state.
810 * 904 *
811 * Data type looks like: 905 * Data type looks like:
812 * int32Values[0] : stream context as defined in VehicleAudioContextFlag. 906 * int32Values[0] : audio context as defined in VehicleAudioContextFlag.
813 * If only physical stream is supported 907 * If only physical stream is supported
814 * (configArray[0] == 0), this must represent physical 908 * (configArray[0] == 0), this must represent physical
815 * stream number. 909 * stream number.
@@ -817,8 +911,8 @@ enum VehicleProperty: int32_t {
817 * defined in the config. 911 * defined in the config.
818 * int32Values[2] : One of VehicleAudioVolumeState. 912 * int32Values[2] : One of VehicleAudioVolumeState.
819 * 913 *
820 * This property requires per stream based get. HAL implementation must 914 * HAL implementations must check the incoming value of audio context
821 * check stream number in get call to return the right volume. 915 * field in get call to return the right volume.
822 * 916 *
823 * @change_mode VehiclePropertyChangeMode:ON_CHANGE 917 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
824 * @access VehiclePropertyAccess:READ_WRITE 918 * @access VehiclePropertyAccess:READ_WRITE
@@ -857,18 +951,18 @@ enum VehicleProperty: int32_t {
857 * to represent audio module's capability. 951 * to represent audio module's capability.
858 * 952 *
859 * Data type looks like: 953 * Data type looks like:
860 * int32Values[0] : stream context as defined in VehicleAudioFocusFlag. 954 * int32Values[0] : audio context as defined in VehicleAudioContextFlag.
861 * If only physical stream is supported 955 * If only physical stream is supported
862 * (configArray[0] == 0), this must represent physical 956 * (configArray[0] == 0), this must represent physical
863 * stream number. 957 * stream number.
864 * int32Values[1] : maximum volume set to the stream. If there is no 958 * int32Values[1] : maximum volume set to the stream. If there is no
865 * restriction, this value must be bigger than 959 * restriction, this value must be equal to
866 * AUDIO_VOLUME's max value. 960 * AUDIO_VOLUME's max value.
867 * 961 *
868 * If car does not support this feature, this property must not be 962 * If car does not support this feature, this property must not be
869 * populated by HAL. 963 * populated by HAL.
870 * This property requires per stream based get. HAL implementation must 964 * HAL implementations must check the incoming value of audio context
871 * check stream number in get call to return the right volume. 965 * field in get call to return the right volume.
872 * 966 *
873 * @change_mode VehiclePropertyChangeMode:ON_CHANGE 967 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
874 * @access VehiclePropertyAccess:READ_WRITE 968 * @access VehiclePropertyAccess:READ_WRITE
@@ -882,10 +976,8 @@ enum VehicleProperty: int32_t {
882 976
883 /** 977 /**
884 * Property to share audio routing policy of android side. This property is 978 * Property to share audio routing policy of android side. This property is
885 * set at the beginning to pass audio policy in android side down to 979 * set at startup to pass audio policy in android side down to
886 * vehicle HAL and car audio module. 980 * vehicle HAL and car audio module.
887 * This can be used as a hint to adjust audio policy or other policy
888 * decision.
889 * 981 *
890 * int32Values[0] : audio stream where the audio for the application 982 * int32Values[0] : audio stream where the audio for the application
891 * context must be routed by default. Note that this is 983 * context must be routed by default. Note that this is
@@ -893,7 +985,7 @@ enum VehicleProperty: int32_t {
893 * still use different audio stream for whatever reason. 985 * still use different audio stream for whatever reason.
894 * int32Values[1] : All audio contexts that must be sent through the 986 * int32Values[1] : All audio contexts that must be sent through the
895 * physical stream. Flag is defined in 987 * physical stream. Flag is defined in
896 * VehicleAudioFocusFlag. 988 * VehicleAudioContextFlag.
897 989
898 * Setting of this property must be done for all available physical streams 990 * Setting of this property must be done for all available physical streams
899 * based on audio H/W variant information acquired from AUDIO_HW_VARIANT 991 * based on audio H/W variant information acquired from AUDIO_HW_VARIANT
@@ -909,11 +1001,11 @@ enum VehicleProperty: int32_t {
909 | VehicleArea:GLOBAL), 1001 | VehicleArea:GLOBAL),
910 1002
911 /** 1003 /**
912 * Property to return audio H/W variant type used in this car. This allows 1004 * Property to return audio H/W variant type used in this car. This is a
913 * android side to support different audio policy based on H/W variant used. 1005 * zero based index into the set of audio routing policies defined in
914 * Note that other components like CarService may need overlay update to 1006 * R.array.audioRoutingPolicy on CarService, which may be overlaid to
915 * support additional variants. If this property does not 1007 * support multiple variants. If this property does not exist, the default
916 * exist, default audio policy must be used. 1008 * audio policy must be used.
917 * 1009 *
918 * @change_mode VehiclePropertyChangeMode:STATIC 1010 * @change_mode VehiclePropertyChangeMode:STATIC
919 * @access VehiclePropertyAccess:READ 1011 * @access VehiclePropertyAccess:READ
@@ -942,14 +1034,13 @@ enum VehicleProperty: int32_t {
942 * for the routing. 1034 * for the routing.
943 * This property can support up to 128 external routings. 1035 * This property can support up to 128 external routings.
944 * To give full flexibility, there is no standard definition for each bit 1036 * To give full flexibility, there is no standard definition for each bit
945 * flag and assigning each big flag to specific routing type is decided by 1037 * flag and assigning each bit flag to specific routing type is decided by
946 * VehiclePropConfig#configString. VehiclePropConfig#configString has 1038 * VehiclePropConfig#configString. VehiclePropConfig#configString has
947 * format of each entry separated by ',' and each entry has format of 1039 * format of each entry separated by ',' and each entry has format of
948 * bitFlagPositon:typeString[:physicalStreamNumber]. 1040 * bitFlagPositon:typeString[:physicalStreamNumber].
949 * bitFlagPosition: represents which big flag will be set to enable this 1041 * bitFlagPosition: represents which bit flag will be set to enable this
950 * routing. 0 means 1042 * routing. 0 means LSB in int32Values[0]. 31 will be MSB in
951 * LSB in int32Values[0]. 31 will be MSB in int32Values[0]. 127 will MSB 1043 * int32Values[0]. 127 will MSB in int32Values[3].
952 * in int32Values[3].
953 * typeString: string representation of external routing. Some types are 1044 * typeString: string representation of external routing. Some types are
954 * already defined in AUDIO_EXT_ROUTING_SOURCE_* and use them first 1045 * already defined in AUDIO_EXT_ROUTING_SOURCE_* and use them first
955 * before adding something custom. Applications will find each routing 1046 * before adding something custom. Applications will find each routing
@@ -1126,10 +1217,11 @@ enum VehicleProperty: int32_t {
1126 * change. Instrument cluster still needs to send 1217 * change. Instrument cluster still needs to send
1127 * event with new mode to trigger actual mode change. 1218 * event with new mode to trigger actual mode change.
1128 * int32Values[1] : The current app context relevant for instrument 1219 * int32Values[1] : The current app context relevant for instrument
1129 * cluster. Use the same flag with VehicleAudioFocusFlag 1220 * cluster. Use the same flag with
1130 * but this context represents active apps, not 1221 * VehicleAudioContextFlag but this context represents
1131 * active audio. Instrument cluster side may change mode 1222 * active apps, not active audio. Instrument cluster
1132 * depending on the currently active contexts. 1223 * side may change mode depending on the currently
1224 * active contexts.
1133 * When system boots up, Android side will write {0, 0, 0, 0} when it is 1225 * When system boots up, Android side will write {0, 0, 0, 0} when it is
1134 * ready to render to instrument cluster. Before this message, rendering 1226 * ready to render to instrument cluster. Before this message, rendering
1135 * from android must not be visible in the cluster. 1227 * from android must not be visible in the cluster.
@@ -1790,85 +1882,240 @@ enum VehicleProperty: int32_t {
1790 | VehiclePropertyGroup:SYSTEM 1882 | VehiclePropertyGroup:SYSTEM
1791 | VehiclePropertyType:BOOLEAN 1883 | VehiclePropertyType:BOOLEAN
1792 | VehicleArea:GLOBAL), 1884 | VehicleArea:GLOBAL),
1885
1886
1887 /**
1888 * Vehicle Maps Service (VMS) message
1889 *
1890 * This property uses COMPLEX data to communicate vms messages.
1891 *
1892 * Its contents are to be interpreted as follows:
1893 * the indices defined in VmsMessageIntegerValuesIndex are to be used to
1894 * read from int32Values;
1895 * bytes is a serialized VMS message as defined in the vms protocol
1896 * which is opaque to the framework;
1897 *
1898 * IVehicle#get must always return StatusCode::NOT_AVAILABLE.
1899 *
1900 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
1901 * @access VehiclePropertyAccess:READ_WRITE
1902 *
1903 * @since o.mr1
1904 */
1905 VEHICLE_MAP_SERVICE = (
1906 0x0C00
1907 | VehiclePropertyGroup:SYSTEM
1908 | VehiclePropertyType:COMPLEX
1909 | VehicleArea:GLOBAL),
1910
1911 /**
1912 * OBD2 Live Sensor Data
1913 *
1914 * Reports a snapshot of the current (live) values of the OBD2 sensors available.
1915 *
1916 * The configArray is set as follows:
1917 * configArray[0] = number of vendor-specific integer-valued sensors
1918 * configArray[1] = number of vendor-specific float-valued sensors
1919 *
1920 * The values of this property are to be interpreted as in the following example.
1921 * Considering a configArray = {2,3}
1922 * int32Values must be a vector containing Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + 2
1923 * elements (that is, 33 elements);
1924 * floatValues must be a vector containing Obd2FloatSensorIndex.LAST_SYSTEM_INDEX + 3
1925 * elements (that is, 73 elements);
1926 *
1927 * It is possible for each frame to contain a different subset of sensor values, both system
1928 * provided sensors, and vendor-specific ones. In order to support that, the bytes element
1929 * of the property value is used as a bitmask,.
1930 *
1931 * bytes must have a sufficient number of bytes to represent the total number of possible
1932 * sensors (in this case, 14 bytes to represent 106 possible values); it is to be read as
1933 * a contiguous bitmask such that each bit indicates the presence or absence of a sensor
1934 * from the frame, starting with as many bits as the size of int32Values, immediately
1935 * followed by as many bits as the size of floatValues.
1936 *
1937 * For example, should bytes[0] = 0x4C (0b01001100) it would mean that:
1938 * int32Values[0 and 1] are not valid sensor values
1939 * int32Values[2 and 3] are valid sensor values
1940 * int32Values[4 and 5] are not valid sensor values
1941 * int32Values[6] is a valid sensor value
1942 * int32Values[7] is not a valid sensor value
1943 * Should bytes[5] = 0x61 (0b01100001) it would mean that:
1944 * int32Values[32] is a valid sensor value
1945 * floatValues[0 thru 3] are not valid sensor values
1946 * floatValues[4 and 5] are valid sensor values
1947 * floatValues[6] is not a valid sensor value
1948 *
1949 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
1950 * @access VehiclePropertyAccess:READ
1951 *
1952 * @since o.mr1
1953 */
1954 OBD2_LIVE_FRAME = (
1955 0x0D00
1956 | VehiclePropertyGroup:SYSTEM
1957 | VehiclePropertyType:COMPLEX
1958 | VehicleArea:GLOBAL),
1959
1960 /**
1961 * OBD2 Freeze Frame Sensor Data
1962 *
1963 * Reports a snapshot of the value of the OBD2 sensors available at the time that a fault
1964 * occurred and was detected.
1965 *
1966 * A configArray must be provided with the same meaning as defined for OBD2_LIVE_FRAME.
1967 *
1968 * The values of this property are to be interpreted in a similar fashion as those for
1969 * OBD2_LIVE_FRAME, with the exception that the stringValue field may contain a non-empty
1970 * diagnostic troubleshooting code (DTC).
1971 *
1972 * A IVehicle#get request of this property must provide a value for int64Values[0].
1973 * This will be interpreted as the timestamp of the freeze frame to retrieve. A list of
1974 * timestamps can be obtained by a IVehicle#get of OBD2_FREEZE_FRAME_INFO.
1975 *
1976 * Should no freeze frame be available at the given timestamp, a response of NOT_AVAILABLE
1977 * must be returned by the implementation. Because vehicles may have limited storage for
1978 * freeze frames, it is possible for a frame request to respond with NOT_AVAILABLE even if
1979 * the associated timestamp has been recently obtained via OBD2_FREEZE_FRAME_INFO.
1980 *
1981 * @change_mode VehiclePropertyChangeMode:ON_CHANGE
1982 * @access VehiclePropertyAccess:READ
1983 *
1984 * @since o.mr1
1985 */
1986 OBD2_FREEZE_FRAME = (
1987 0x0D01
1988 | VehiclePropertyGroup:SYSTEM
1989 | VehiclePropertyType:COMPLEX
1990 | VehicleArea:GLOBAL),
1991
1992 /**
1993 * OBD2 Freeze Frame Information
1994 *
1995 * This property describes the current freeze frames stored in vehicle
1996 * memory and available for retrieval via OBD2_FREEZE_FRAME.