diff --git a/CleanSpec.mk b/CleanSpec.mk
index cad545c0e3..3788bc6baa 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -56,4 +56,10 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/)
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
-$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-sp/android.hardware.graphics.allocator*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*)
+$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore\@1\.1*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.tests*)
+$(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 c94da80bfa..eb59152c91 100644
--- a/audio/2.0/config/audio_policy_configuration.xsd
+++ b/audio/2.0/config/audio_policy_configuration.xsd
@@ -365,10 +365,10 @@
-
-
-
-
+
+
+
+
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 70fa75056d..aa25077898 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -88,8 +88,4 @@ else
LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
endif
-ifeq ($(TARGET_USES_BCRADIO_FUTURE_FEATURES),true)
-LOCAL_CFLAGS += -DTARGET_USES_BCRADIO_FUTURE_FEATURES
-endif
-
include $(BUILD_EXECUTABLE)
diff --git a/audio/2.0/default/Stream.h b/audio/2.0/default/Stream.h
index 82f05a77b4..e29af53184 100644
--- a/audio/2.0/default/Stream.h
+++ b/audio/2.0/default/Stream.h
@@ -49,6 +49,13 @@ using ::android::sp;
struct Stream : public IStream, public ParametersUtil {
explicit Stream(audio_stream_t* stream);
+ /** 1GiB is the maximum buffer size the HAL client is allowed to request.
+ * This value has been chosen to be under SIZE_MAX and still big enough
+ * for all audio use case.
+ * Keep private for 2.0, put in .hal in 2.1
+ */
+ static constexpr uint32_t MAX_BUFFER_SIZE = 2 << 30 /* == 1GiB */;
+
// Methods from ::android::hardware::audio::V2_0::IStream follow.
Return getFrameSize() override;
Return getFrameCount() override;
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 3ed55a3aaf..61d5d8ea4d 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -346,14 +346,10 @@ Return StreamIn::prepareForReading(uint32_t frameSize,
sendError(Result::INVALID_ARGUMENTS);
return Void();
}
- // A message queue asserts if it can not handle the requested buffer,
- // thus the client has to guess the maximum size it can handle
- // Choose an arbitrary margin for the overhead of a message queue
- size_t metadataOverhead = 100000;
- if (frameSize >
- (std::numeric_limits::max() - metadataOverhead) / framesCount) {
- ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
- frameSize, framesCount);
+
+ if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) {
+ ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount,
+ Stream::MAX_BUFFER_SIZE);
sendError(Result::INVALID_ARGUMENTS);
return Void();
}
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 242e8fc5c7..0bedc74b62 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -323,14 +323,9 @@ Return StreamOut::prepareForWriting(uint32_t frameSize,
sendError(Result::INVALID_ARGUMENTS);
return Void();
}
- // A message queue asserts if it can not handle the requested buffer,
- // thus the client has to guess the maximum size it can handle
- size_t metadataOverhead =
- 100000; // Arbitrary margin for the overhead of a message queue
- if (frameSize >
- (std::numeric_limits::max() - metadataOverhead) / framesCount) {
- ALOGE("Buffer too big: %u*%u bytes can not fit in a message queue",
- frameSize, framesCount);
+ if (frameSize > Stream::MAX_BUFFER_SIZE / framesCount) {
+ ALOGE("Buffer too big: %u*%u bytes > MAX_BUFFER_SIZE (%u)", frameSize, framesCount,
+ Stream::MAX_BUFFER_SIZE);
sendError(Result::INVALID_ARGUMENTS);
return Void();
}
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index 7f28d7df84..a215108e95 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -21,8 +21,6 @@
#include
#include
#include
-#include
-#include
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
@@ -32,13 +30,6 @@ using android::hardware::audio::effect::V2_0::IEffectsFactory;
using android::hardware::audio::V2_0::IDevicesFactory;
using android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
using android::hardware::registerPassthroughServiceImplementation;
-namespace broadcastradio = android::hardware::broadcastradio;
-
-#ifdef TARGET_USES_BCRADIO_FUTURE_FEATURES
-static const bool useBroadcastRadioFutureFeatures = true;
-#else
-static const bool useBroadcastRadioFutureFeatures = false;
-#endif
using android::OK;
@@ -49,17 +40,9 @@ int main(int /* argc */, char* /* argv */ []) {
LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status);
status = registerPassthroughServiceImplementation();
LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status);
- // Soundtrigger and FM radio might be not present.
+ // Soundtrigger might be not present.
status = registerPassthroughServiceImplementation();
ALOGE_IF(status != OK, "Error while registering soundtrigger service: %d", status);
- if (useBroadcastRadioFutureFeatures) {
- status = registerPassthroughServiceImplementation<
- broadcastradio::V1_1::IBroadcastRadioFactory>();
- } else {
- status = registerPassthroughServiceImplementation<
- broadcastradio::V1_0::IBroadcastRadioFactory>();
- }
- ALOGE_IF(status != OK, "Error while registering fm radio service: %d", status);
joinRpcThreadpool();
return status;
}
diff --git a/audio/2.0/vts/functional/Android.bp b/audio/2.0/vts/functional/Android.bp
index b289709fda..f3b2ca72cd 100644
--- a/audio/2.0/vts/functional/Android.bp
+++ b/audio/2.0/vts/functional/Android.bp
@@ -16,29 +16,18 @@
cc_test {
name: "VtsHalAudioV2_0TargetTest",
- defaults: ["hidl_defaults"],
- srcs: ["AudioPrimaryHidlHalTest.cpp",
- "ValidateAudioConfiguration.cpp"],
- shared_libs: [
- "libbase",
- "liblog",
- "libhidlbase",
- "libhidltransport",
- "libutils",
- "libcutils",
- "libxml2",
- "android.hardware.audio@2.0",
- "android.hardware.audio.common@2.0",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: [
+ "AudioPrimaryHidlHalTest.cpp",
+ "ValidateAudioConfiguration.cpp"
],
static_libs: [
- "VtsHalHidlTargetTestBase",
"android.hardware.audio.common.test.utility",
+ "android.hardware.audio@2.0",
+ "android.hardware.audio.common@2.0",
+ "libxml2",
],
- cflags: [
- "-O0",
- "-g",
- "-Wall",
- "-Wextra",
- "-Werror",
+ shared_libs: [
+ "libicuuc",
],
}
diff --git a/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp b/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
index 01324c87d3..ec3259a1e3 100644
--- a/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
+++ b/audio/2.0/vts/functional/ValidateAudioConfiguration.cpp
@@ -14,9 +14,21 @@
* limitations under the License.
*/
+#include
+#include
+
#include "utility/ValidateXml.h"
TEST(CheckConfig, audioPolicyConfigurationValidation) {
- ASSERT_VALID_XML("/vendor/etc/audio_policy_configuration.xml",
- "/data/local/tmp/audio_policy_configuration.xsd");
+ const char* configName = "audio_policy_configuration.xml";
+ const char* possibleConfigLocations[] = {"/odm/etc", "/vendor/etc", "/system/etc"};
+ const char* configSchemaPath = "/data/local/tmp/audio_policy_configuration.xsd";
+
+ for (std::string folder : possibleConfigLocations) {
+ const auto configPath = folder + '/' + configName;
+ if (access(configPath.c_str(), R_OK) == 0) {
+ ASSERT_VALID_XML(configPath.c_str(), configSchemaPath);
+ return; // The framework does not read past the first config file found
+ }
+ }
}
diff --git a/audio/common/2.0/default/Android.bp b/audio/common/2.0/default/Android.bp
index 7fab220fcf..82b38c0877 100644
--- a/audio/common/2.0/default/Android.bp
+++ b/audio/common/2.0/default/Android.bp
@@ -17,6 +17,9 @@ cc_library_shared {
name: "android.hardware.audio.common@2.0-util",
defaults: ["hidl_defaults"],
vendor_available: true,
+ vndk: {
+ enabled: true,
+ },
srcs: [
"EffectMap.cpp",
"HidlUtils.cpp",
diff --git a/audio/effect/2.0/vts/functional/Android.bp b/audio/effect/2.0/vts/functional/Android.bp
index 8a370cd12d..7b421cb7e7 100644
--- a/audio/effect/2.0/vts/functional/Android.bp
+++ b/audio/effect/2.0/vts/functional/Android.bp
@@ -16,24 +16,20 @@
cc_test {
name: "VtsHalAudioEffectV2_0TargetTest",
- defaults: ["hidl_defaults"],
- srcs: ["VtsHalAudioEffectV2_0TargetTest.cpp"],
- shared_libs: [
- "libbase",
- "liblog",
- "libcutils",
- "libhidlbase",
- "libhidltransport",
- "libnativehelper",
- "libutils",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: [
+ "VtsHalAudioEffectV2_0TargetTest.cpp",
+ "ValidateAudioEffectsConfiguration.cpp"
+ ],
+ static_libs: [
+ "android.hardware.audio.common.test.utility",
"android.hardware.audio.common@2.0",
"android.hardware.audio.effect@2.0",
"android.hidl.allocator@1.0",
"android.hidl.memory@1.0",
+ "libxml2",
],
- static_libs: ["VtsHalHidlTargetTestBase"],
- cflags: [
- "-O0",
- "-g",
+ shared_libs: [
+ "libicuuc",
],
}
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 0000000000..fdc1347497
--- /dev/null
+++ b/audio/effect/2.0/vts/functional/ValidateAudioEffectsConfiguration.cpp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include
+
+#include "utility/ValidateXml.h"
+
+TEST(CheckConfig, audioEffectsConfigurationValidation) {
+ RecordProperty("description",
+ "Verify that the effects configuration file is valid according to the schema");
+ const char* xmlConfigFile = "/vendor/etc/audio_effects.xml";
+ // Not every device uses XML configuration, so only validate
+ // if the XML configuration actually exists.
+ if (access(xmlConfigFile, F_OK) == 0) {
+ ASSERT_VALID_XML(xmlConfigFile, "/data/local/tmp/audio_effects_conf_V2_0.xsd");
+ }
+}
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 0000000000..ca6a7dc65b
--- /dev/null
+++ b/audio/effect/2.0/xml/audio_effects_conf_V2_0.xsd
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ List of effect libraries to load. Each library element must have "name" and
+ "path" attributes. The latter is giving the path of the library .so file
+ relative to the standard effect folders: /(vendor|odm|system)/lib(64)?/soundfx/
+
+ Example for a library in "/vendor/lib/soundfx/lib.so":
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ List of effects to load. Each effect element must contain "name",
+ "library", and "uuid" attrs. The value of the "library" attr must
+ correspond to the name of a "library" element. The name of the effect
+ element is indicative, only the value of the "uuid" element designates
+ the effect for the audio framework. The uuid is the implementation
+ specific UUID as specified by the effect vendor. This is not the generic
+ effect type UUID.
+
+ For effect proxy implementations, SW and HW implemetations of the effect
+ can be specified.
+
+ Example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Audio preprocessing configuration. The processing configuration consists
+ of a list of elements each describing processing settings for a given
+ input stream. Valid input stream types are listed in "streamInputType".
+
+ Each stream element contains a list of "apply" elements. The value of the
+ "effect" attr must correspond to the name of an "effect" element.
+
+ Example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Audio postprocessing configuration. The processing configuration consists
+ of a list of elements each describing processing settings for a given
+ output stream. Valid output stream types are listed in "streamOutputType".
+
+ Each stream element contains a list of "apply" elements. The value of the
+ "effect" attr must correspond to the name of an "effect" element.
+
+ Example:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index da68c2a519..4bc40686bd 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -1,7 +1,11 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
-filegroup {
- name: "android.hardware.automotive.evs@1.0_hal",
+hidl_interface {
+ name: "android.hardware.automotive.evs@1.0",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
srcs: [
"types.hal",
"IEvsCamera.hal",
@@ -9,160 +13,16 @@ filegroup {
"IEvsDisplay.hal",
"IEvsEnumerator.hal",
],
+ interfaces: [
+ "android.hidl.base@1.0",
+ ],
+ types: [
+ "BufferDesc",
+ "CameraDesc",
+ "DisplayDesc",
+ "DisplayState",
+ "EvsResult",
+ ],
+ gen_java: false,
}
-genrule {
- name: "android.hardware.automotive.evs@1.0_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
- srcs: [
- ":android.hardware.automotive.evs@1.0_hal",
- ],
- out: [
- "android/hardware/automotive/evs/1.0/types.cpp",
- "android/hardware/automotive/evs/1.0/EvsCameraAll.cpp",
- "android/hardware/automotive/evs/1.0/EvsCameraStreamAll.cpp",
- "android/hardware/automotive/evs/1.0/EvsDisplayAll.cpp",
- "android/hardware/automotive/evs/1.0/EvsEnumeratorAll.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.evs@1.0_genc++_headers",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
- srcs: [
- ":android.hardware.automotive.evs@1.0_hal",
- ],
- out: [
- "android/hardware/automotive/evs/1.0/types.h",
- "android/hardware/automotive/evs/1.0/hwtypes.h",
- "android/hardware/automotive/evs/1.0/IEvsCamera.h",
- "android/hardware/automotive/evs/1.0/IHwEvsCamera.h",
- "android/hardware/automotive/evs/1.0/BnHwEvsCamera.h",
- "android/hardware/automotive/evs/1.0/BpHwEvsCamera.h",
- "android/hardware/automotive/evs/1.0/BsEvsCamera.h",
- "android/hardware/automotive/evs/1.0/IEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/IHwEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/BnHwEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/BpHwEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/BsEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/IEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/IHwEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/BnHwEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/BpHwEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/BsEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/IEvsEnumerator.h",
- "android/hardware/automotive/evs/1.0/IHwEvsEnumerator.h",
- "android/hardware/automotive/evs/1.0/BnHwEvsEnumerator.h",
- "android/hardware/automotive/evs/1.0/BpHwEvsEnumerator.h",
- "android/hardware/automotive/evs/1.0/BsEvsEnumerator.h",
- ],
-}
-
-cc_library {
- name: "android.hardware.automotive.evs@1.0",
- defaults: ["hidl-module-defaults"],
- generated_sources: ["android.hardware.automotive.evs@1.0_genc++"],
- generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
- export_generated_headers: ["android.hardware.automotive.evs@1.0_genc++_headers"],
- vendor_available: true,
- vndk: {
- enabled: true,
- },
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.evs@1.0-adapter-helper_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
- srcs: [
- ":android.hardware.automotive.evs@1.0_hal",
- ],
- out: [
- "android/hardware/automotive/evs/1.0/AEvsCamera.cpp",
- "android/hardware/automotive/evs/1.0/AEvsCameraStream.cpp",
- "android/hardware/automotive/evs/1.0/AEvsDisplay.cpp",
- "android/hardware/automotive/evs/1.0/AEvsEnumerator.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
- srcs: [
- ":android.hardware.automotive.evs@1.0_hal",
- ],
- out: [
- "android/hardware/automotive/evs/1.0/AEvsCamera.h",
- "android/hardware/automotive/evs/1.0/AEvsCameraStream.h",
- "android/hardware/automotive/evs/1.0/AEvsDisplay.h",
- "android/hardware/automotive/evs/1.0/AEvsEnumerator.h",
- ],
-}
-
-
-cc_library {
- name: "android.hardware.automotive.evs@1.0-adapter-helper",
- defaults: ["hidl-module-defaults"],
- generated_sources: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++"],
- generated_headers: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers"],
- export_generated_headers: ["android.hardware.automotive.evs@1.0-adapter-helper_genc++_headers"],
- vendor_available: true,
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- "libhidladapter",
- "android.hardware.automotive.evs@1.0",
- "android.hidl.base@1.0-adapter-helper",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- "libhidladapter",
- "android.hardware.automotive.evs@1.0",
- "android.hidl.base@1.0-adapter-helper",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.evs@1.0-adapter_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.evs@1.0",
- out: ["main.cpp"]
-}
-
-cc_test {
- name: "android.hardware.automotive.evs@1.0-adapter",
- defaults: ["hidl-module-defaults"],
- shared_libs: [
- "libhidladapter",
- "libhidlbase",
- "libhidltransport",
- "libutils",
- "android.hardware.automotive.evs@1.0",
- "android.hardware.automotive.evs@1.0-adapter-helper",
- ],
- generated_sources: ["android.hardware.automotive.evs@1.0-adapter_genc++"],
-}
diff --git a/automotive/evs/1.0/default/Android.bp b/automotive/evs/1.0/default/Android.bp
new file mode 100644
index 0000000000..2574e860b2
--- /dev/null
+++ b/automotive/evs/1.0/default/Android.bp
@@ -0,0 +1,31 @@
+cc_binary {
+ name: "android.hardware.automotive.evs@1.0-service",
+ defaults: ["hidl_defaults"],
+ proprietary: true,
+ relative_install_path: "hw",
+ srcs: [
+ "service.cpp",
+ "EvsCamera.cpp",
+ "EvsEnumerator.cpp",
+ "EvsDisplay.cpp"
+ ],
+ init_rc: ["android.hardware.automotive.evs@1.0-service.rc"],
+
+ shared_libs: [
+ "android.hardware.automotive.evs@1.0",
+ "libui",
+ "libbase",
+ "libbinder",
+ "libcutils",
+ "libhardware",
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libutils",
+ ],
+
+ cflags: [
+ "-O0",
+ "-g",
+ ],
+}
diff --git a/automotive/evs/1.0/default/Android.mk b/automotive/evs/1.0/default/Android.mk
deleted file mode 100644
index 28abe6c41d..0000000000
--- a/automotive/evs/1.0/default/Android.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-LOCAL_PATH:=$(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.automotive.evs@1.0-service
-LOCAL_INIT_RC := android.hardware.automotive.evs@1.0-service.rc
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_VENDOR_MODULE := true
-
-LOCAL_SRC_FILES := \
- service.cpp \
- EvsCamera.cpp \
- EvsEnumerator.cpp \
- EvsDisplay.cpp \
-
-LOCAL_SHARED_LIBRARIES := \
- android.hardware.automotive.evs@1.0 \
- libui \
- libbase \
- libbinder \
- libcutils \
- libhardware \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
-
-LOCAL_CFLAGS := -O0 -g -Wall -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/automotive/evs/1.0/vts/functional/Android.bp b/automotive/evs/1.0/vts/functional/Android.bp
index e86e9bcdd8..555ff5bc42 100644
--- a/automotive/evs/1.0/vts/functional/Android.bp
+++ b/automotive/evs/1.0/vts/functional/Android.bp
@@ -15,10 +15,10 @@
//
cc_test {
- name: "VtsEvsV1_0Target",
+ name: "VtsHalEvsV1_0Target",
srcs: [
- "VtsEvsV1_0TargetTest.cpp",
+ "VtsHalEvsV1_0TargetTest.cpp",
"FrameHandler.cpp",
"FormatConvert.cpp"
],
@@ -43,4 +43,3 @@ cc_test {
"-g",
],
}
-
diff --git a/automotive/evs/1.0/vts/functional/VtsEvsV1_0TargetTest.cpp b/automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp
similarity index 97%
rename from automotive/evs/1.0/vts/functional/VtsEvsV1_0TargetTest.cpp
rename to automotive/evs/1.0/vts/functional/VtsHalEvsV1_0TargetTest.cpp
index 2e80afe8fe..57050d7516 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 @@
#define LOG_TAG "VtsHalEvsTest"
-// TODO: How should we configure these values to target appropriate hardware?
-const static char kEnumeratorName[] = "EvsEnumeratorHw-Mock";
+// Note: We have't got a great way to indicate which target
+// should be tested, so we'll leave the interface served by the
+// default (mock) EVS driver here for easy reference. All
+// actual EVS drivers should serve on the EvsEnumeratorHw name,
+// however, so the code is checked in that way.
+//const static char kEnumeratorName[] = "EvsEnumeratorHw-Mock";
+const static char kEnumeratorName[] = "EvsEnumeratorHw";
// These values are called out in the EVS design doc (as of Mar 8, 2017)
@@ -474,4 +479,4 @@ TEST_F(EvsHidlTest, CameraToDisplayRoundTrip) {
// Explicitly release the display
pEnumerator->closeDisplay(pDisplay);
-}
\ No newline at end of file
+}
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index 0d0d28f9a2..3441a25ea2 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -1,150 +1,85 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
+// This file is autogenerated by hidl-gen -Landroidbp.
-filegroup {
- name: "android.hardware.automotive.vehicle@2.0_hal",
+hidl_interface {
+ name: "android.hardware.automotive.vehicle@2.0",
+ root: "android.hardware",
+ vndk: {
+ enabled: true,
+ },
srcs: [
"types.hal",
"IVehicle.hal",
"IVehicleCallback.hal",
],
+ interfaces: [
+ "android.hidl.base@1.0",
+ ],
+ types: [
+ "DiagnosticFloatSensorIndex",
+ "DiagnosticIntegerSensorIndex",
+ "Obd2CommonIgnitionMonitors",
+ "Obd2CompressionIgnitionMonitors",
+ "Obd2FuelSystemStatus",
+ "Obd2FuelType",
+ "Obd2IgnitionMonitorKind",
+ "Obd2SecondaryAirStatus",
+ "Obd2SparkIgnitionMonitors",
+ "StatusCode",
+ "SubscribeFlags",
+ "SubscribeOptions",
+ "VehicleApPowerBootupReason",
+ "VehicleApPowerSetState",
+ "VehicleApPowerState",
+ "VehicleApPowerStateConfigFlag",
+ "VehicleApPowerStateIndex",
+ "VehicleApPowerStateShutdownParam",
+ "VehicleArea",
+ "VehicleAreaConfig",
+ "VehicleAreaDoor",
+ "VehicleAreaMirror",
+ "VehicleAreaSeat",
+ "VehicleAreaWindow",
+ "VehicleAreaZone",
+ "VehicleAudioContextFlag",
+ "VehicleAudioExtFocusFlag",
+ "VehicleAudioFocusIndex",
+ "VehicleAudioFocusRequest",
+ "VehicleAudioFocusState",
+ "VehicleAudioHwVariantConfigFlag",
+ "VehicleAudioRoutingPolicyIndex",
+ "VehicleAudioStream",
+ "VehicleAudioStreamFlag",
+ "VehicleAudioVolumeCapabilityFlag",
+ "VehicleAudioVolumeIndex",
+ "VehicleAudioVolumeLimitIndex",
+ "VehicleAudioVolumeState",
+ "VehicleDisplay",
+ "VehicleDrivingStatus",
+ "VehicleGear",
+ "VehicleHvacFanDirection",
+ "VehicleHwKeyInputAction",
+ "VehicleIgnitionState",
+ "VehicleInstrumentClusterType",
+ "VehiclePropConfig",
+ "VehiclePropValue",
+ "VehicleProperty",
+ "VehiclePropertyAccess",
+ "VehiclePropertyChangeMode",
+ "VehiclePropertyGroup",
+ "VehiclePropertyOperation",
+ "VehiclePropertyType",
+ "VehicleRadioConstants",
+ "VehicleTurnSignal",
+ "VehicleUnit",
+ "VmsAvailabilityStateIntegerValuesIndex",
+ "VmsBaseMessageIntegerValuesIndex",
+ "VmsMessageType",
+ "VmsMessageWithLayerAndPublisherIdIntegerValuesIndex",
+ "VmsMessageWithLayerIntegerValuesIndex",
+ "VmsOfferingMessageIntegerValuesIndex",
+ "VmsSubscriptionsStateIntegerValuesIndex",
+ "Wheel",
+ ],
+ gen_java: true,
}
-genrule {
- name: "android.hardware.automotive.vehicle@2.0_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
- srcs: [
- ":android.hardware.automotive.vehicle@2.0_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.0/types.cpp",
- "android/hardware/automotive/vehicle/2.0/VehicleAll.cpp",
- "android/hardware/automotive/vehicle/2.0/VehicleCallbackAll.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.0_genc++_headers",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
- srcs: [
- ":android.hardware.automotive.vehicle@2.0_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.0/types.h",
- "android/hardware/automotive/vehicle/2.0/hwtypes.h",
- "android/hardware/automotive/vehicle/2.0/IVehicle.h",
- "android/hardware/automotive/vehicle/2.0/IHwVehicle.h",
- "android/hardware/automotive/vehicle/2.0/BnHwVehicle.h",
- "android/hardware/automotive/vehicle/2.0/BpHwVehicle.h",
- "android/hardware/automotive/vehicle/2.0/BsVehicle.h",
- "android/hardware/automotive/vehicle/2.0/IVehicleCallback.h",
- "android/hardware/automotive/vehicle/2.0/IHwVehicleCallback.h",
- "android/hardware/automotive/vehicle/2.0/BnHwVehicleCallback.h",
- "android/hardware/automotive/vehicle/2.0/BpHwVehicleCallback.h",
- "android/hardware/automotive/vehicle/2.0/BsVehicleCallback.h",
- ],
-}
-
-cc_library {
- name: "android.hardware.automotive.vehicle@2.0",
- defaults: ["hidl-module-defaults"],
- generated_sources: ["android.hardware.automotive.vehicle@2.0_genc++"],
- generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
- export_generated_headers: ["android.hardware.automotive.vehicle@2.0_genc++_headers"],
- vendor_available: true,
- vndk: {
- enabled: true,
- },
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.0-adapter-helper_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
- srcs: [
- ":android.hardware.automotive.vehicle@2.0_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.0/AVehicle.cpp",
- "android/hardware/automotive/vehicle/2.0/AVehicleCallback.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
- srcs: [
- ":android.hardware.automotive.vehicle@2.0_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.0/AVehicle.h",
- "android/hardware/automotive/vehicle/2.0/AVehicleCallback.h",
- ],
-}
-
-
-cc_library {
- name: "android.hardware.automotive.vehicle@2.0-adapter-helper",
- defaults: ["hidl-module-defaults"],
- generated_sources: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++"],
- generated_headers: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers"],
- export_generated_headers: ["android.hardware.automotive.vehicle@2.0-adapter-helper_genc++_headers"],
- vendor_available: true,
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- "libhidladapter",
- "android.hardware.automotive.vehicle@2.0",
- "android.hidl.base@1.0-adapter-helper",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- "libhidladapter",
- "android.hardware.automotive.vehicle@2.0",
- "android.hidl.base@1.0-adapter-helper",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.0-adapter_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-adapter-main -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.0",
- out: ["main.cpp"]
-}
-
-cc_test {
- name: "android.hardware.automotive.vehicle@2.0-adapter",
- defaults: ["hidl-module-defaults"],
- shared_libs: [
- "libhidladapter",
- "libhidlbase",
- "libhidltransport",
- "libutils",
- "android.hardware.automotive.vehicle@2.0",
- "android.hardware.automotive.vehicle@2.0-adapter-helper",
- ],
- generated_sources: ["android.hardware.automotive.vehicle@2.0-adapter_genc++"],
-}
diff --git a/automotive/vehicle/2.0/Android.mk b/automotive/vehicle/2.0/Android.mk
index eb05f35eca..a731d6d56f 100644
--- a/automotive/vehicle/2.0/Android.mk
+++ b/automotive/vehicle/2.0/Android.mk
@@ -2,978 +2,6 @@
LOCAL_PATH := $(call my-dir)
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.automotive.vehicle-V2.0-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
- android.hidl.base-V1.0-java \
-
-
-#
-# Build types.hal (StatusCode)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.StatusCode
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SubscribeFlags)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SubscribeFlags.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.SubscribeFlags
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SubscribeOptions)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/SubscribeOptions.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.SubscribeOptions
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerBootupReason)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerBootupReason.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerBootupReason
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerSetState)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerSetState.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerSetState
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerState)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerState.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerState
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerStateConfigFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateConfigFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerStateConfigFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerStateIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerStateIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleApPowerStateShutdownParam)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleApPowerStateShutdownParam.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleApPowerStateShutdownParam
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleArea)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleArea.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleArea
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaConfig)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaConfig.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaConfig
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaDoor)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaDoor.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaDoor
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaMirror)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaMirror.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaMirror
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaSeat)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaSeat.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaSeat
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaWindow)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaWindow.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaWindow
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAreaZone)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAreaZone.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAreaZone
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioContextFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioContextFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioContextFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioExtFocusFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioExtFocusFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioExtFocusFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioFocusIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioFocusIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioFocusRequest)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusRequest.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioFocusRequest
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioFocusState)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioFocusState.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioFocusState
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioHwVariantConfigFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioHwVariantConfigFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioHwVariantConfigFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioRoutingPolicyIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioRoutingPolicyIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioRoutingPolicyIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioStream)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioStream.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioStream
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioStreamFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioStreamFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioStreamFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioVolumeCapabilityFlag)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeCapabilityFlag.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioVolumeCapabilityFlag
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioVolumeIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioVolumeIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioVolumeLimitIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeLimitIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioVolumeLimitIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleAudioVolumeState)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleAudioVolumeState.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleAudioVolumeState
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleDisplay)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleDisplay.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleDisplay
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleDrivingStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleDrivingStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleDrivingStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleGear)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleGear.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleGear
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleHvacFanDirection)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleHvacFanDirection.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleHvacFanDirection
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleHwKeyInputAction)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleHwKeyInputAction.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleHwKeyInputAction
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleIgnitionState)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleIgnitionState.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleIgnitionState
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleInstrumentClusterType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleInstrumentClusterType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleInstrumentClusterType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropConfig)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropConfig.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropConfig
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropValue)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropValue.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropValue
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleProperty)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleProperty.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleProperty
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropertyAccess)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropertyAccess.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropertyAccess
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropertyChangeMode)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropertyChangeMode.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropertyChangeMode
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropertyGroup)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropertyGroup.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropertyGroup
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropertyOperation)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropertyOperation.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropertyOperation
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehiclePropertyType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehiclePropertyType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehiclePropertyType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleRadioConstants)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleRadioConstants.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleRadioConstants
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleTurnSignal)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleTurnSignal.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleTurnSignal
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleUnit)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VehicleUnit.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.VehicleUnit
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Wheel)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Wheel.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::types.Wheel
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IVehicle.hal
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/IVehicle.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVehicle.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IVehicleCallback.hal
-$(GEN): $(LOCAL_PATH)/IVehicleCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::IVehicle
-
-$(GEN): $(LOCAL_PATH)/IVehicle.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IVehicleCallback.hal
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/IVehicleCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVehicleCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.0::IVehicleCallback
-
-$(GEN): $(LOCAL_PATH)/IVehicleCallback.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
################################################################################
include $(CLEAR_VARS)
@@ -988,6 +16,177 @@ LOCAL_STATIC_JAVA_LIBRARIES := \
android.hidl.base-V1.0-java-static \
+#
+# Build types.hal (DiagnosticFloatSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticFloatSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.DiagnosticFloatSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (DiagnosticIntegerSensorIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/DiagnosticIntegerSensorIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.DiagnosticIntegerSensorIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2CommonIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CommonIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2CommonIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2CompressionIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2CompressionIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2CompressionIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2FuelSystemStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelSystemStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2FuelSystemStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2FuelType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2FuelType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2FuelType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2IgnitionMonitorKind)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2IgnitionMonitorKind.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2IgnitionMonitorKind
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2SecondaryAirStatus)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SecondaryAirStatus.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2SecondaryAirStatus
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Obd2SparkIgnitionMonitors)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/Obd2SparkIgnitionMonitors.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.Obd2SparkIgnitionMonitors
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
#
# Build types.hal (StatusCode)
#
@@ -1881,6 +1080,139 @@ $(GEN): $(LOCAL_PATH)/types.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
+#
+# Build types.hal (VmsAvailabilityStateIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsAvailabilityStateIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsAvailabilityStateIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsBaseMessageIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsBaseMessageIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsBaseMessageIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsMessageType)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsMessageType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsMessageWithLayerAndPublisherIdIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerAndPublisherIdIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsMessageWithLayerIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsMessageWithLayerIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsMessageWithLayerIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsOfferingMessageIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsOfferingMessageIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsOfferingMessageIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (VmsSubscriptionsStateIntegerValuesIndex)
+#
+GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/VmsSubscriptionsStateIntegerValuesIndex.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.automotive.vehicle@2.0::types.VmsSubscriptionsStateIntegerValuesIndex
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
#
# Build types.hal (Wheel)
#
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
new file mode 100644
index 0000000000..1690163d2a
--- /dev/null
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -0,0 +1,117 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_defaults {
+ name: "vhal_v2_0_defaults",
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libutils",
+ "android.hardware.automotive.vehicle@2.0",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+}
+
+cc_library_headers {
+ name: "vhal_v2_0_common_headers",
+ vendor: true,
+ export_include_dirs: ["common/include/vhal_v2_0"],
+}
+
+// Vehicle reference implementation lib
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-manager-lib",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ srcs: [
+ "common/src/Obd2SensorStore.cpp",
+ "common/src/SubscriptionManager.cpp",
+ "common/src/VehicleHalManager.cpp",
+ "common/src/VehicleObjectPool.cpp",
+ "common/src/VehiclePropertyStore.cpp",
+ "common/src/VehicleUtils.cpp",
+ ],
+ local_include_dirs: ["common/include/vhal_v2_0"],
+ export_include_dirs: ["common/include"],
+}
+
+cc_library_shared {
+ name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
+ vendor: true,
+ static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+}
+
+// Vehicle default VehicleHAL implementation
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ srcs: [
+ "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
+ "impl/vhal_v2_0/VehicleEmulator.cpp",
+ "impl/vhal_v2_0/PipeComm.cpp",
+ "impl/vhal_v2_0/SocketComm.cpp",
+ ],
+ local_include_dirs: ["common/include/vhal_v2_0"],
+ export_include_dirs: ["impl"],
+ whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ shared_libs: [
+ "libbase",
+ "libprotobuf-cpp-lite",
+ ],
+ static_libs: [
+ "libqemu_pipe",
+ "android.hardware.automotive.vehicle@2.0-libproto-native",
+ ],
+}
+
+cc_test {
+ name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ srcs: [
+ "tests/RecurrentTimer_test.cpp",
+ "tests/SubscriptionManager_test.cpp",
+ "tests/VehicleHalManager_test.cpp",
+ "tests/VehicleObjectPool_test.cpp",
+ "tests/VehiclePropConfigIndex_test.cpp",
+ ],
+ header_libs: ["libbase_headers"],
+}
+
+cc_binary {
+ name: "android.hardware.automotive.vehicle@2.0-service",
+ defaults: ["vhal_v2_0_defaults"],
+ init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
+ vendor: true,
+ relative_install_path: "hw",
+ srcs: ["VehicleService.cpp"],
+ shared_libs: [
+ "libbase",
+ "libprotobuf-cpp-lite",
+ ],
+ static_libs: [
+ "android.hardware.automotive.vehicle@2.0-manager-lib",
+ "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ "android.hardware.automotive.vehicle@2.0-libproto-native",
+ "libqemu_pipe",
+ ],
+}
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
deleted file mode 100644
index 141cda614e..0000000000
--- a/automotive/vehicle/2.0/default/Android.mk
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-vhal_v2_0 = android.hardware.automotive.vehicle@2.0
-
-###############################################################################
-# Vehicle reference implementation lib
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-manager-lib
-LOCAL_SRC_FILES := \
- common/src/SubscriptionManager.cpp \
- common/src/VehicleHalManager.cpp \
- common/src/VehicleObjectPool.cpp \
- common/src/VehiclePropertyStore.cpp \
- common/src/VehicleUtils.cpp \
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared
-LOCAL_SRC_FILES := \
- common/src/SubscriptionManager.cpp \
- common/src/VehicleHalManager.cpp \
- common/src/VehicleObjectPool.cpp \
- common/src/VehiclePropertyStore.cpp \
- common/src/VehicleUtils.cpp \
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-include $(BUILD_SHARED_LIBRARY)
-
-###############################################################################
-# Vehicle HAL Protobuf library
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-
-LOCAL_MODULE := $(vhal_v2_0)-libproto-native
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STRIP_MODULE := keep_symbols
-
-generated_sources_dir := $(call local-generated-sources-dir)
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-###############################################################################
-# Vehicle default VehicleHAL implementation
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
-LOCAL_SRC_FILES:= \
- impl/vhal_v2_0/EmulatedVehicleHal.cpp \
- impl/vhal_v2_0/VehicleEmulator.cpp \
- impl/vhal_v2_0/PipeComm.cpp \
- impl/vhal_v2_0/SocketComm.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/impl/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/impl
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- liblog \
- libprotobuf-cpp-lite \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_STATIC_LIBRARIES := \
- libqemu_pipe \
- $(vhal_v2_0)-libproto-native \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-###############################################################################
-# Vehicle reference implementation unit tests
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
-
-LOCAL_SRC_FILES:= \
- tests/RecurrentTimer_test.cpp \
- tests/SubscriptionManager_test.cpp \
- tests/VehicleHalManager_test.cpp \
- tests/VehicleObjectPool_test.cpp \
- tests/VehiclePropConfigIndex_test.cpp \
-
-LOCAL_HEADER_LIBRARIES := \
- libbase_headers
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-LOCAL_MODULE_TAGS := tests
-
-include $(BUILD_NATIVE_TEST)
-
-
-###############################################################################
-# Vehicle HAL service
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-service
-LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := hw
-
-LOCAL_SRC_FILES := \
- VehicleService.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- liblog \
- libprotobuf-cpp-lite \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_0)-libproto-native \
- libqemu_pipe \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(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
similarity index 76%
rename from automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
rename to automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
index 6c44626d12..191a565c61 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 @@
* limitations under the License.
*/
-#ifndef android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
-#define android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
+#ifndef android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
+#define android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
#include
-#include
+#include
namespace android {
namespace hardware {
namespace automotive {
namespace vehicle {
-namespace V2_1 {
+namespace V2_0 {
// This class wraps all the logic required to create an OBD2 frame.
// It allows storing sensor values, setting appropriate bitmasks as needed,
// and returning appropriately laid out storage of sensor values suitable
// for being returned via a VehicleHal implementation.
class Obd2SensorStore {
-public:
+ public:
// Creates a sensor storage with a given number of vendor-specific sensors.
- Obd2SensorStore(size_t numVendorIntegerSensors,
- size_t numVendorFloatSensors);
+ Obd2SensorStore(size_t numVendorIntegerSensors, size_t numVendorFloatSensors);
// Stores an integer-valued sensor.
- V2_0::StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value);
+ StatusCode setIntegerSensor(DiagnosticIntegerSensorIndex index, int32_t value);
// Stores an integer-valued sensor.
- V2_0::StatusCode setIntegerSensor(size_t index, int32_t value);
+ StatusCode setIntegerSensor(size_t index, int32_t value);
// Stores a float-valued sensor.
- V2_0::StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value);
+ StatusCode setFloatSensor(DiagnosticFloatSensorIndex index, float value);
// Stores a float-valued sensor.
- V2_0::StatusCode setFloatSensor(size_t index, float value);
+ StatusCode setFloatSensor(size_t index, float value);
// Returns a vector that contains all integer sensors stored.
const std::vector& getIntegerSensors() const;
@@ -55,11 +54,11 @@ public:
const std::vector& getSensorsBitmask() const;
// Given a stringValue, fill in a VehiclePropValue
- void fillPropValue(const std::string& dtc, V2_0::VehiclePropValue *propValue) const;
+ void fillPropValue(const std::string& dtc, VehiclePropValue* propValue) const;
-private:
+ private:
class BitmaskInVector {
- public:
+ public:
BitmaskInVector(size_t numBits = 0);
void resize(size_t numBits);
bool get(size_t index) const;
@@ -67,7 +66,7 @@ private:
const std::vector& getBitmask() const;
- private:
+ private:
std::vector mStorage;
};
@@ -76,7 +75,7 @@ private:
BitmaskInVector mSensorsBitmask;
};
-} // namespace V2_1
+} // namespace V2_0
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp b/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
similarity index 62%
rename from automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
rename to automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
index f4c63a9544..65174f7a00 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 {
namespace hardware {
namespace automotive {
namespace vehicle {
-namespace V2_1 {
+namespace V2_0 {
-Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits)
-{
+Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits) {
resize(numBits);
}
void Obd2SensorStore::BitmaskInVector::resize(size_t numBits) {
- mStorage = std::vector((numBits+7)/8, 0);
+ mStorage = std::vector((numBits + 7) / 8, 0);
}
void Obd2SensorStore::BitmaskInVector::set(size_t index, bool value) {
const size_t byteIndex = index / 8;
const size_t bitIndex = index % 8;
const uint8_t byte = mStorage[byteIndex];
- uint8_t newValue = value ? (byte | (1 << bitIndex)) :
- (byte & ~(1 << bitIndex));
+ uint8_t newValue = value ? (byte | (1 << bitIndex)) : (byte & ~(1 << bitIndex));
mStorage[byteIndex] = newValue;
}
@@ -54,37 +52,33 @@ const std::vector& Obd2SensorStore::BitmaskInVector::getBitmask() const
return mStorage;
}
-Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors,
- size_t numVendorFloatSensors) {
- // because the last index is valid *inclusive*
- const size_t numSystemIntegerSensors = V2_0::toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)+1;
- const size_t numSystemFloatSensors = V2_0::toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)+1;
- mIntegerSensors = std::vector(
- numSystemIntegerSensors+numVendorIntegerSensors, 0);
- mFloatSensors = std::vector(
- numSystemFloatSensors+numVendorFloatSensors, 0);
- mSensorsBitmask.resize(mIntegerSensors.size()+mFloatSensors.size());
+Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors, size_t numVendorFloatSensors) {
+ // because the last index is valid *inclusive*
+ const size_t numSystemIntegerSensors =
+ toInt(DiagnosticIntegerSensorIndex::LAST_SYSTEM_INDEX) + 1;
+ const size_t numSystemFloatSensors = toInt(DiagnosticFloatSensorIndex::LAST_SYSTEM_INDEX) + 1;
+ mIntegerSensors = std::vector(numSystemIntegerSensors + numVendorIntegerSensors, 0);
+ mFloatSensors = std::vector(numSystemFloatSensors + numVendorFloatSensors, 0);
+ mSensorsBitmask.resize(mIntegerSensors.size() + mFloatSensors.size());
}
-V2_0::StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index,
- int32_t value) {
- return setIntegerSensor(V2_0::toInt(index), value);
+StatusCode Obd2SensorStore::setIntegerSensor(DiagnosticIntegerSensorIndex index, int32_t value) {
+ return setIntegerSensor(toInt(index), value);
}
-V2_0::StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index,
- float value) {
- return setFloatSensor(V2_0::toInt(index), value);
+StatusCode Obd2SensorStore::setFloatSensor(DiagnosticFloatSensorIndex index, float value) {
+ return setFloatSensor(toInt(index), value);
}
-V2_0::StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
+StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
mIntegerSensors[index] = value;
mSensorsBitmask.set(index, true);
- return V2_0::StatusCode::OK;
+ return StatusCode::OK;
}
-V2_0::StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
+StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
mFloatSensors[index] = value;
mSensorsBitmask.set(index + mIntegerSensors.size(), true);
- return V2_0::StatusCode::OK;
+ return StatusCode::OK;
}
const std::vector& Obd2SensorStore::getIntegerSensors() const {
@@ -99,8 +93,7 @@ const std::vector& Obd2SensorStore::getSensorsBitmask() const {
return mSensorsBitmask.getBitmask();
}
-void Obd2SensorStore::fillPropValue(const std::string& dtc,
- V2_0::VehiclePropValue *propValue) const {
+void Obd2SensorStore::fillPropValue(const std::string& dtc, VehiclePropValue* propValue) const {
propValue->timestamp = elapsedRealtimeNano();
propValue->value.int32Values = getIntegerSensors();
propValue->value.floatValues = getFloatSensors();
@@ -108,8 +101,6 @@ void Obd2SensorStore::fillPropValue(const std::string& dtc,
propValue->value.stringValue = dtc;
}
-
-
} // namespace V2_0
} // namespace vehicle
} // 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 fb63e3645e..08d3d79446 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 {
namespace V2_0 {
namespace impl {
+//
+// Some handy constants to avoid conversions from enum to int.
+constexpr int ABS_ACTIVE = (int)VehicleProperty::ABS_ACTIVE;
+constexpr int OBD2_LIVE_FRAME = (int)VehicleProperty::OBD2_LIVE_FRAME;
+constexpr int OBD2_FREEZE_FRAME = (int)VehicleProperty::OBD2_FREEZE_FRAME;
+constexpr int OBD2_FREEZE_FRAME_INFO = (int)VehicleProperty::OBD2_FREEZE_FRAME_INFO;
+constexpr int OBD2_FREEZE_FRAME_CLEAR = (int)VehicleProperty::OBD2_FREEZE_FRAME_CLEAR;
+constexpr int TRACTION_CONTROL_ACTIVE = (int)VehicleProperty::TRACTION_CONTROL_ACTIVE;
+constexpr int VEHICLE_MAP_SERVICE = (int)VehicleProperty::VEHICLE_MAP_SERVICE;
+constexpr int WHEEL_TICK = (int)VehicleProperty::WHEEL_TICK;
+constexpr int ALL_WHEELS =
+ (int)(Wheel::LEFT_FRONT | Wheel::RIGHT_FRONT | Wheel::LEFT_REAR | Wheel::RIGHT_REAR);
/*
* This property is used for test purpose to generate fake events.
@@ -283,8 +295,68 @@ const ConfigDeclaration kVehicleProperties[]{
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
},
- .initialValue = {.int32Values = {1}}}
+ .initialValue = {.int32Values = {1}}},
+ {
+ .config =
+ {
+ .prop = WHEEL_TICK,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::CONTINUOUS,
+ .configArray = {ALL_WHEELS, 50000, 50000, 50000, 50000},
+ .minSampleRate = 1.0f,
+ .maxSampleRate = 100.0f,
+ },
+ },
+
+ {
+ .config =
+ {
+ .prop = ABS_ACTIVE,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+ },
+
+ {
+ .config =
+ {
+ .prop = TRACTION_CONTROL_ACTIVE,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ },
+ },
+
+ {
+ .config = {.prop = OBD2_LIVE_FRAME,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0, 0}},
+ },
+
+ {
+ .config = {.prop = OBD2_FREEZE_FRAME,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0, 0}},
+ },
+
+ {
+ .config = {.prop = OBD2_FREEZE_FRAME_INFO,
+ .access = VehiclePropertyAccess::READ,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE},
+ },
+
+ {
+ .config = {.prop = OBD2_FREEZE_FRAME_CLEAR,
+ .access = VehiclePropertyAccess::WRITE,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {1}},
+ },
+
+ {.config = {.prop = VEHICLE_MAP_SERVICE,
+ .access = VehiclePropertyAccess::READ_WRITE,
+ .changeMode = VehiclePropertyChangeMode::ON_CHANGE}},
};
} // 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 fe34a3f610..6bc0522403 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 @@
#include
#include "EmulatedVehicleHal.h"
+#include "Obd2SensorStore.h"
namespace android {
namespace hardware {
@@ -28,6 +29,62 @@ namespace V2_0 {
namespace impl {
+static std::unique_ptr fillDefaultObd2Frame(size_t numVendorIntegerSensors,
+ size_t numVendorFloatSensors) {
+ std::unique_ptr sensorStore(
+ new Obd2SensorStore(numVendorIntegerSensors, numVendorFloatSensors));
+
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::FUEL_SYSTEM_STATUS,
+ toInt(Obd2FuelSystemStatus::CLOSED_LOOP));
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
+ toInt(Obd2IgnitionMonitorKind::SPARK));
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::IGNITION_SPECIFIC_MONITORS,
+ Obd2CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
+ Obd2CommonIgnitionMonitors::MISFIRE_AVAILABLE |
+ Obd2SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
+ Obd2SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::INTAKE_AIR_TEMPERATURE, 35);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::COMMANDED_SECONDARY_AIR_STATUS,
+ toInt(Obd2SecondaryAirStatus::FROM_OUTSIDE_OR_OFF));
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::NUM_OXYGEN_SENSORS_PRESENT, 1);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::RUNTIME_SINCE_ENGINE_START, 500);
+ sensorStore->setIntegerSensor(
+ DiagnosticIntegerSensorIndex::DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON, 0);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::WARMUPS_SINCE_CODES_CLEARED, 51);
+ sensorStore->setIntegerSensor(
+ DiagnosticIntegerSensorIndex::DISTANCE_TRAVELED_SINCE_CODES_CLEARED, 365);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE, 30);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::CONTROL_MODULE_VOLTAGE, 12);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::AMBIENT_AIR_TEMPERATURE, 18);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::MAX_FUEL_AIR_EQUIVALENCE_RATIO, 1);
+ sensorStore->setIntegerSensor(DiagnosticIntegerSensorIndex::FUEL_TYPE,
+ toInt(Obd2FuelType::GASOLINE));
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::CALCULATED_ENGINE_LOAD, 0.153);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK1, -0.16);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK1, -0.16);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK2, -0.16);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK2, -0.16);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::INTAKE_MANIFOLD_ABSOLUTE_PRESSURE, 7.5);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ENGINE_RPM, 1250.);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::VEHICLE_SPEED, 40.);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::TIMING_ADVANCE, 2.5);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::THROTTLE_POSITION, 19.75);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::OXYGEN_SENSOR1_VOLTAGE, 0.265);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::FUEL_TANK_LEVEL_INPUT, 0.824);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::EVAPORATION_SYSTEM_VAPOR_PRESSURE,
+ -0.373);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::CATALYST_TEMPERATURE_BANK1_SENSOR1,
+ 190.);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::RELATIVE_THROTTLE_POSITION, 3.);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ABSOLUTE_THROTTLE_POSITION_B, 0.306);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ACCELERATOR_PEDAL_POSITION_D, 0.188);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::ACCELERATOR_PEDAL_POSITION_E, 0.094);
+ sensorStore->setFloatSensor(DiagnosticFloatSensorIndex::COMMANDED_THROTTLE_ACTUATOR, 0.024);
+
+ return sensorStore;
+}
+
enum class FakeDataCommand : int32_t {
Stop = 0,
Start = 1,
@@ -40,7 +97,7 @@ EmulatedVehicleHal::EmulatedVehicleHal(VehiclePropertyStore* propStore)
this, std::placeholders::_1)),
mFakeValueGenerator(std::bind(&EmulatedVehicleHal::onFakeValueGenerated,
this, std::placeholders::_1, std::placeholders::_2)) {
-
+ initStaticConfig();
for (size_t i = 0; i < arraysize(kVehicleProperties); i++) {
mPropStore->registerProperty(kVehicleProperties[i].config);
}
@@ -48,23 +105,39 @@ EmulatedVehicleHal::EmulatedVehicleHal(VehiclePropertyStore* propStore)
VehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get(
const VehiclePropValue& requestedPropValue, StatusCode* outStatus) {
+ auto propId = requestedPropValue.prop;
+ auto& pool = *getValuePool();
VehiclePropValuePtr v = nullptr;
- auto internalPropValue = mPropStore->readValueOrNull(requestedPropValue);
- if (internalPropValue != nullptr) {
- v = getValuePool()->obtain(*internalPropValue);
+ switch (propId) {
+ case OBD2_FREEZE_FRAME:
+ v = pool.obtainComplex();
+ *outStatus = fillObd2FreezeFrame(requestedPropValue, v.get());
+ break;
+ case OBD2_FREEZE_FRAME_INFO:
+ v = pool.obtainComplex();
+ *outStatus = fillObd2DtcInfo(v.get());
+ break;
+ default:
+ auto internalPropValue = mPropStore->readValueOrNull(requestedPropValue);
+ if (internalPropValue != nullptr) {
+ v = getValuePool()->obtain(*internalPropValue);
+ }
+
+ *outStatus = v != nullptr ? StatusCode::OK : StatusCode::INVALID_ARG;
+ break;
}
- *outStatus = v != nullptr ? StatusCode::OK : StatusCode::INVALID_ARG;
return v;
}
StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
if (propValue.prop == kGenerateFakeDataControllingProperty) {
- return handleGenerateFakeDataRequest(propValue);
- };
-
- if (mHvacPowerProps.count(propValue.prop)) {
+ StatusCode status = handleGenerateFakeDataRequest(propValue);
+ if (status != StatusCode::OK) {
+ return status;
+ }
+ } else if (mHvacPowerProps.count(propValue.prop)) {
auto hvacPowerOn = mPropStore->readValueOrNull(toInt(VehicleProperty::HVAC_POWER_ON),
toInt(VehicleAreaZone::ROW_1));
@@ -72,6 +145,12 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
&& hvacPowerOn->value.int32Values[0] == 0) {
return StatusCode::NOT_AVAILABLE;
}
+ } else if (propValue.prop == OBD2_FREEZE_FRAME_CLEAR) {
+ return clearObd2FreezeFrames(propValue);
+ } else if (propValue.prop == VEHICLE_MAP_SERVICE) {
+ // Placeholder for future implementation of VMS property in the default hal. For now, just
+ // returns OK; otherwise, hal clients crash with property not supported.
+ return StatusCode::OK;
}
if (!mPropStore->writeValue(propValue)) {
@@ -83,12 +162,29 @@ StatusCode EmulatedVehicleHal::set(const VehiclePropValue& propValue) {
return StatusCode::OK;
}
+static bool isDiagnosticProperty(VehiclePropConfig propConfig) {
+ switch (propConfig.prop) {
+ case OBD2_LIVE_FRAME:
+ case OBD2_FREEZE_FRAME:
+ case OBD2_FREEZE_FRAME_CLEAR:
+ case OBD2_FREEZE_FRAME_INFO:
+ return true;
+ }
+ return false;
+}
+
// Parse supported properties list and generate vector of property values to hold current values.
void EmulatedVehicleHal::onCreate() {
for (auto& it : kVehicleProperties) {
VehiclePropConfig cfg = it.config;
int32_t supportedAreas = cfg.supportedAreas;
+ if (isDiagnosticProperty(cfg)) {
+ // do not write an initial empty value for the diagnostic properties
+ // as we will initialize those separately.
+ continue;
+ }
+
// A global property will have supportedAreas = 0
if (isGlobalProp(cfg.prop)) {
supportedAreas = 0;
@@ -120,6 +216,8 @@ void EmulatedVehicleHal::onCreate() {
} while (supportedAreas != 0);
}
+ initObd2LiveFrame(*mPropStore->getConfigOrDie(OBD2_LIVE_FRAME));
+ initObd2FreezeFrame(*mPropStore->getConfigOrDie(OBD2_FREEZE_FRAME));
}
std::vector EmulatedVehicleHal::listProperties() {
@@ -176,6 +274,13 @@ bool EmulatedVehicleHal::isContinuousProperty(int32_t propId) const {
}
bool EmulatedVehicleHal::setPropertyFromVehicle(const VehiclePropValue& propValue) {
+ if (propValue.prop == kGenerateFakeDataControllingProperty) {
+ StatusCode status = handleGenerateFakeDataRequest(propValue);
+ if (status != StatusCode::OK) {
+ return false;
+ }
+ }
+
if (mPropStore->writeValue(propValue)) {
doHalEvent(getValuePool()->obtain(propValue));
return true;
@@ -263,6 +368,100 @@ void EmulatedVehicleHal::onFakeValueGenerated(int32_t propId, float value) {
}
}
+void EmulatedVehicleHal::initStaticConfig() {
+ for (auto&& it = std::begin(kVehicleProperties); it != std::end(kVehicleProperties); ++it) {
+ const auto& cfg = it->config;
+ VehiclePropertyStore::TokenFunction tokenFunction = nullptr;
+
+ switch (cfg.prop) {
+ case OBD2_FREEZE_FRAME: {
+ tokenFunction = [](const VehiclePropValue& propValue) {
+ return propValue.timestamp;
+ };
+ break;
+ }
+ default:
+ break;
+ }
+
+ mPropStore->registerProperty(cfg, tokenFunction);
+ }
+}
+
+void EmulatedVehicleHal::initObd2LiveFrame(const VehiclePropConfig& propConfig) {
+ auto liveObd2Frame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
+ auto sensorStore = fillDefaultObd2Frame(static_cast(propConfig.configArray[0]),
+ static_cast(propConfig.configArray[1]));
+ sensorStore->fillPropValue("", liveObd2Frame.get());
+ liveObd2Frame->prop = OBD2_LIVE_FRAME;
+
+ mPropStore->writeValue(*liveObd2Frame);
+}
+
+void EmulatedVehicleHal::initObd2FreezeFrame(const VehiclePropConfig& propConfig) {
+ auto sensorStore = fillDefaultObd2Frame(static_cast(propConfig.configArray[0]),
+ static_cast(propConfig.configArray[1]));
+
+ static std::vector sampleDtcs = {"P0070",
+ "P0102"
+ "P0123"};
+ for (auto&& dtc : sampleDtcs) {
+ auto freezeFrame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
+ sensorStore->fillPropValue(dtc, freezeFrame.get());
+ freezeFrame->prop = OBD2_FREEZE_FRAME;
+
+ mPropStore->writeValue(*freezeFrame);
+ }
+}
+
+StatusCode EmulatedVehicleHal::fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
+ VehiclePropValue* outValue) {
+ if (requestedPropValue.value.int64Values.size() != 1) {
+ ALOGE("asked for OBD2_FREEZE_FRAME without valid timestamp");
+ return StatusCode::INVALID_ARG;
+ }
+ auto timestamp = requestedPropValue.value.int64Values[0];
+ auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
+ if (freezeFrame == nullptr) {
+ ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+ return StatusCode::INVALID_ARG;
+ }
+ outValue->prop = OBD2_FREEZE_FRAME;
+ outValue->value.int32Values = freezeFrame->value.int32Values;
+ outValue->value.floatValues = freezeFrame->value.floatValues;
+ outValue->value.bytes = freezeFrame->value.bytes;
+ outValue->value.stringValue = freezeFrame->value.stringValue;
+ outValue->timestamp = freezeFrame->timestamp;
+ return StatusCode::OK;
+}
+
+StatusCode EmulatedVehicleHal::clearObd2FreezeFrames(const VehiclePropValue& propValue) {
+ if (propValue.value.int64Values.size() == 0) {
+ mPropStore->removeValuesForProperty(OBD2_FREEZE_FRAME);
+ return StatusCode::OK;
+ } else {
+ for (int64_t timestamp : propValue.value.int64Values) {
+ auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
+ if (freezeFrame == nullptr) {
+ ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+ return StatusCode::INVALID_ARG;
+ }
+ mPropStore->removeValue(*freezeFrame);
+ }
+ }
+ return StatusCode::OK;
+}
+
+StatusCode EmulatedVehicleHal::fillObd2DtcInfo(VehiclePropValue* outValue) {
+ std::vector timestamps;
+ for (const auto& freezeFrame : mPropStore->readValuesForProperty(OBD2_FREEZE_FRAME)) {
+ timestamps.push_back(freezeFrame.timestamp);
+ }
+ outValue->value.int64Values = timestamps;
+ outValue->prop = OBD2_FREEZE_FRAME_INFO;
+ return StatusCode::OK;
+}
+
} // impl
} // 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 c25e0838c5..99d7edbc78 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:
void onContinuousPropertyTimer(const std::vector& properties);
bool isContinuousProperty(int32_t propId) const;
+ void initStaticConfig();
+ void initObd2LiveFrame(const VehiclePropConfig& propConfig);
+ void initObd2FreezeFrame(const VehiclePropConfig& propConfig);
+ StatusCode fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
+ VehiclePropValue* outValue);
+ StatusCode fillObd2DtcInfo(VehiclePropValue* outValue);
+ StatusCode clearObd2FreezeFrames(const VehiclePropValue& propValue);
-private:
+ /* Private members */
VehiclePropertyStore* mPropStore;
std::unordered_set mHvacPowerProps;
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 0000000000..ec352000c6
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Vehicle HAL Protobuf library
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-libproto-native",
+ vendor: true,
+ proto: {
+ export_proto_headers: true,
+ type: "lite",
+ },
+ strip: {
+ keep_symbols: true,
+ },
+ srcs: ["VehicleHalProto.proto"]
+}
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index f1fb6bf2b9..7c08b4a036 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -225,6 +225,50 @@ enum VehicleProperty: int32_t {
| VehiclePropertyType:FLOAT
| VehicleArea:GLOBAL),
+ /**
+ * Reports wheel ticks
+ *
+ * The first four elements represent ticks for individual wheels in the
+ * following order: front left, front right, rear right, rear left. All
+ * tick counts are cumulative. Tick counts increment when the vehicle
+ * moves forward, and decrement when vehicles moves in reverse. The ticks
+ * should be reset to 0 when the vehicle is started by the user.
+ *
+ * The next element in the vector is a reset count. A reset indicates
+ * previous tick counts are not comparable with this and future ones. Some
+ * sort of discontinuity in tick counting has occurred.
+ *
+ * int64Values[0] = reset count
+ * int64Values[1] = front left ticks
+ * int64Values[2] = front right ticks
+ * int64Values[3] = rear right ticks
+ * int64Values[4] = rear left ticks
+ *
+ * configArray is used to indicate the micrometers-per-wheel-tick value as well as
+ * which wheels are supported. configArray is set as follows:
+ *
+ * configArray[0], bits [0:3] = supported wheels. Uses enum Wheel.
+ * configArray[1] = micrometers per front left wheel tick
+ * configArray[2] = micrometers per front right wheel tick
+ * configArray[3] = micrometers per rear right wheel tick
+ * configArray[4] = micrometers per rear left wheel tick
+ *
+ * NOTE: If a wheel is not supported, its value shall always be set to 0.
+ *
+ * VehiclePropValue.timestamp must be correctly filled in.
+ *
+ * @change_mode VehiclePropertyChangeMode:CONTINUOUS
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ WHEEL_TICK = (
+ 0x0306
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
+
+
/**
* Currently selected gear
*
@@ -327,6 +371,34 @@ enum VehicleProperty: int32_t {
| VehiclePropertyType:INT32
| VehicleArea:GLOBAL),
+ /**
+ * ABS is active. Set to true whenever ABS is activated. Reset to false when ABS is off.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ ABS_ACTIVE = (
+ 0x040A
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:BOOLEAN
+ | VehicleArea:GLOBAL),
+
+ /**
+ * Traction Control is active.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ TRACTION_CONTROL_ACTIVE = (
+ 0x040B
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:BOOLEAN
+ | VehicleArea:GLOBAL),
+
/**
* Fan speed setting
*
@@ -603,6 +675,24 @@ enum VehicleProperty: int32_t {
| VehiclePropertyType:INT32
| VehicleArea:ZONE),
+ /**
+ * Represents power state for HVAC. Some HVAC properties must require
+ * matching power to be turned on to get out of OFF state. For non-zoned
+ * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ_WRITE
+ * @config_string list of HVAC properties whose power is controlled by this
+ * property. Format is hexa-decimal number (0x...) separated
+ * by comma like "0x500,0x503". All zones defined in these
+ * affected properties must be available in the property.
+ */
+ HVAC_POWER_ON = (
+ 0x0510
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:BOOLEAN
+ | VehicleArea:ZONE),
+
/**
* Fan Positions Available
*
@@ -623,19 +713,18 @@ enum VehicleProperty: int32_t {
| VehicleArea:ZONE),
/**
- * Represents power state for HVAC. Some HVAC properties must require
- * matching power to be turned on to get out of OFF state. For non-zoned
- * HVAC properties, VEHICLE_ALL_ZONE corresponds to global power state.
+ * Automatic re-circulation on/off
+ *
+ * IVehicle#set and IVehicle#get must return StatusCode::NOT_AVAILABLE when HVAC unit is off.
+ * See HVAC_POWER_ON property for details.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:READ_WRITE
- * @config_string list of HVAC properties whose power is controlled by this
- * property. Format is hexa-decimal number (0x...) separated
- * by comma like "0x500,0x503". All zones defined in these
- * affected properties must be available in the property.
+ *
+ * @since o.mr1
*/
- HVAC_POWER_ON = (
- 0x0510
+ HVAC_AUTO_RECIRC_ON = (
+ 0x0512
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:BOOLEAN
| VehicleArea:ZONE),
@@ -696,7 +785,8 @@ enum VehicleProperty: int32_t {
* requested by Android side. The focus has both per stream characteristics
* and global characteristics.
*
- * Focus request (get of this property) must take the following form:
+ * Focus request (get of this property) must take the following form with indices defined
+ * by VehicleAudioFocusIndex:
* int32Values[0]: VehicleAudioFocusRequest type
* int32Values[1]: bit flags of streams requested by this focus request.
* There can be up to 32 streams.
@@ -714,7 +804,7 @@ enum VehicleProperty: int32_t {
* REQUEST_RELEASE). In that case, audio module must
* maintain mute state until user's explicit action to
* play some media.
- * int32Values[3]: Currently active audio contexts. Use combination of
+ * int32Values[3]: Audio contexts wishing to be active. Use combination of
* flags from VehicleAudioContextFlag.
* This can be used as a hint to adjust audio policy or
* other policy decision.
@@ -729,7 +819,7 @@ enum VehicleProperty: int32_t {
* request.
*
* Focus response (set and subscription callback for this property) must
- * take the following form:
+ * take the following form with indices defined by VehicleAudioFocusIndex:
* int32Values[0]: VehicleAudioFocusState type
* int32Values[1]: bit flags of streams allowed.
* int32Values[2]: External focus state: bit flags of currently active
@@ -742,22 +832,26 @@ enum VehicleProperty: int32_t {
* 0 means no active audio focus holder outside Android.
* The state must have following values for each
* VehicleAudioFocusState:
- * GAIN: 0 or VehicleAudioExtFocusFlag#PLAY_ONLY_FLAG
- * when radio is active in Android side.
- * GAIN_TRANSIENT: 0. Can be
+ * GAIN: VehicleAudioExtFocusFlag#PLAY_ONLY_FLAG
+ * when radio is active in Android side. Otherwise,
+ * VehicleAudioExtFocusFlag#NONE_FLAG.
+ * GAIN_TRANSIENT: Can be
* VehicleAudioExtFocusFlag#PERMANENT_FLAG or
* VehicleAudioExtFocusFlag#TRANSIENT_FLAG if android
* side has requested
* REQUEST_GAIN_TRANSIENT_MAY_DUCK and car side is
- * ducking.
- * LOSS: 0 when no focus is audio is active in car side.
+ * ducking. Otherwise
+ * VehicleAudioExtFocusFlag#NONE_FLAG.
+ * LOSS: VehicleAudioExtFocusFlag#NONE_FLAG when no focus
+ * is active in car side.
* VehicleAudioExtFocusFlag#PERMANENT_FLAG when car
* side is playing something permanent.
- * LOSS_TRANSIENT: always must be
+ * LOSS_TRANSIENT: must always be
* VehicleAudioExtFocusFlag#PERMANENT_FLAG
- * int32Values[3]: context requested by android side when responding to
- * focus request. When car side is taking focus away,
- * this must be zero.
+ * int32Values[3]: Audio context(s) allowed to be active. When responding positively to a
+ * focus request from Android, the request's original context must be
+ * repeated here. When taking focus away, or denying a request, the
+ * rejected or stopped context would have its corresponding bit cleared.
*
* A focus response must be sent per each focus request even if there is
* no change in focus state. This can happen in case like focus request
@@ -798,8 +892,8 @@ enum VehicleProperty: int32_t {
*
* VehiclePropConfig
* configArray[0] : bit flags of all supported audio contexts from
- * VehicleAudioContextFlag. If this is 0, audio volume is
- * controlled per physical stream.
+ * VehicleAudioContextFlag. If this is 0, audio volume
+ * is controlled per physical stream.
* configArray[1] : flags defined in VehicleAudioVolumeCapabilityFlag to
* represent audio module's capability.
* configArray[2..3] : reserved
@@ -809,7 +903,7 @@ enum VehicleProperty: int32_t {
* indicates mute state.
*
* Data type looks like:
- * int32Values[0] : stream context as defined in VehicleAudioContextFlag.
+ * int32Values[0] : audio context as defined in VehicleAudioContextFlag.
* If only physical stream is supported
* (configArray[0] == 0), this must represent physical
* stream number.
@@ -817,8 +911,8 @@ enum VehicleProperty: int32_t {
* defined in the config.
* int32Values[2] : One of VehicleAudioVolumeState.
*
- * This property requires per stream based get. HAL implementation must
- * check stream number in get call to return the right volume.
+ * HAL implementations must check the incoming value of audio context
+ * field in get call to return the right volume.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:READ_WRITE
@@ -857,18 +951,18 @@ enum VehicleProperty: int32_t {
* to represent audio module's capability.
*
* Data type looks like:
- * int32Values[0] : stream context as defined in VehicleAudioFocusFlag.
+ * int32Values[0] : audio context as defined in VehicleAudioContextFlag.
* If only physical stream is supported
* (configArray[0] == 0), this must represent physical
* stream number.
* int32Values[1] : maximum volume set to the stream. If there is no
- * restriction, this value must be bigger than
+ * restriction, this value must be equal to
* AUDIO_VOLUME's max value.
*
* If car does not support this feature, this property must not be
* populated by HAL.
- * This property requires per stream based get. HAL implementation must
- * check stream number in get call to return the right volume.
+ * HAL implementations must check the incoming value of audio context
+ * field in get call to return the right volume.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:READ_WRITE
@@ -882,10 +976,8 @@ enum VehicleProperty: int32_t {
/**
* Property to share audio routing policy of android side. This property is
- * set at the beginning to pass audio policy in android side down to
+ * set at startup to pass audio policy in android side down to
* vehicle HAL and car audio module.
- * This can be used as a hint to adjust audio policy or other policy
- * decision.
*
* int32Values[0] : audio stream where the audio for the application
* context must be routed by default. Note that this is
@@ -893,7 +985,7 @@ enum VehicleProperty: int32_t {
* still use different audio stream for whatever reason.
* int32Values[1] : All audio contexts that must be sent through the
* physical stream. Flag is defined in
- * VehicleAudioFocusFlag.
+ * VehicleAudioContextFlag.
* Setting of this property must be done for all available physical streams
* based on audio H/W variant information acquired from AUDIO_HW_VARIANT
@@ -909,11 +1001,11 @@ enum VehicleProperty: int32_t {
| VehicleArea:GLOBAL),
/**
- * Property to return audio H/W variant type used in this car. This allows
- * android side to support different audio policy based on H/W variant used.
- * Note that other components like CarService may need overlay update to
- * support additional variants. If this property does not
- * exist, default audio policy must be used.
+ * Property to return audio H/W variant type used in this car. This is a
+ * zero based index into the set of audio routing policies defined in
+ * R.array.audioRoutingPolicy on CarService, which may be overlaid to
+ * support multiple variants. If this property does not exist, the default
+ * audio policy must be used.
*
* @change_mode VehiclePropertyChangeMode:STATIC
* @access VehiclePropertyAccess:READ
@@ -942,14 +1034,13 @@ enum VehicleProperty: int32_t {
* for the routing.
* This property can support up to 128 external routings.
* To give full flexibility, there is no standard definition for each bit
- * flag and assigning each big flag to specific routing type is decided by
+ * flag and assigning each bit flag to specific routing type is decided by
* VehiclePropConfig#configString. VehiclePropConfig#configString has
* format of each entry separated by ',' and each entry has format of
* bitFlagPositon:typeString[:physicalStreamNumber].
- * bitFlagPosition: represents which big flag will be set to enable this
- * routing. 0 means
- * LSB in int32Values[0]. 31 will be MSB in int32Values[0]. 127 will MSB
- * in int32Values[3].
+ * bitFlagPosition: represents which bit flag will be set to enable this
+ * routing. 0 means LSB in int32Values[0]. 31 will be MSB in
+ * int32Values[0]. 127 will MSB in int32Values[3].
* typeString: string representation of external routing. Some types are
* already defined in AUDIO_EXT_ROUTING_SOURCE_* and use them first
* before adding something custom. Applications will find each routing
@@ -1126,10 +1217,11 @@ enum VehicleProperty: int32_t {
* change. Instrument cluster still needs to send
* event with new mode to trigger actual mode change.
* int32Values[1] : The current app context relevant for instrument
- * cluster. Use the same flag with VehicleAudioFocusFlag
- * but this context represents active apps, not
- * active audio. Instrument cluster side may change mode
- * depending on the currently active contexts.
+ * cluster. Use the same flag with
+ * VehicleAudioContextFlag but this context represents
+ * active apps, not active audio. Instrument cluster
+ * side may change mode depending on the currently
+ * active contexts.
* When system boots up, Android side will write {0, 0, 0, 0} when it is
* ready to render to instrument cluster. Before this message, rendering
* from android must not be visible in the cluster.
@@ -1790,85 +1882,240 @@ enum VehicleProperty: int32_t {
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:BOOLEAN
| VehicleArea:GLOBAL),
+
+
+ /**
+ * Vehicle Maps Service (VMS) message
+ *
+ * This property uses COMPLEX data to communicate vms messages.
+ *
+ * Its contents are to be interpreted as follows:
+ * the indices defined in VmsMessageIntegerValuesIndex are to be used to
+ * read from int32Values;
+ * bytes is a serialized VMS message as defined in the vms protocol
+ * which is opaque to the framework;
+ *
+ * IVehicle#get must always return StatusCode::NOT_AVAILABLE.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ_WRITE
+ *
+ * @since o.mr1
+ */
+ VEHICLE_MAP_SERVICE = (
+ 0x0C00
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
+
+ /**
+ * OBD2 Live Sensor Data
+ *
+ * Reports a snapshot of the current (live) values of the OBD2 sensors available.
+ *
+ * The configArray is set as follows:
+ * configArray[0] = number of vendor-specific integer-valued sensors
+ * configArray[1] = number of vendor-specific float-valued sensors
+ *
+ * The values of this property are to be interpreted as in the following example.
+ * Considering a configArray = {2,3}
+ * int32Values must be a vector containing Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + 2
+ * elements (that is, 33 elements);
+ * floatValues must be a vector containing Obd2FloatSensorIndex.LAST_SYSTEM_INDEX + 3
+ * elements (that is, 73 elements);
+ *
+ * It is possible for each frame to contain a different subset of sensor values, both system
+ * provided sensors, and vendor-specific ones. In order to support that, the bytes element
+ * of the property value is used as a bitmask,.
+ *
+ * bytes must have a sufficient number of bytes to represent the total number of possible
+ * sensors (in this case, 14 bytes to represent 106 possible values); it is to be read as
+ * a contiguous bitmask such that each bit indicates the presence or absence of a sensor
+ * from the frame, starting with as many bits as the size of int32Values, immediately
+ * followed by as many bits as the size of floatValues.
+ *
+ * For example, should bytes[0] = 0x4C (0b01001100) it would mean that:
+ * int32Values[0 and 1] are not valid sensor values
+ * int32Values[2 and 3] are valid sensor values
+ * int32Values[4 and 5] are not valid sensor values
+ * int32Values[6] is a valid sensor value
+ * int32Values[7] is not a valid sensor value
+ * Should bytes[5] = 0x61 (0b01100001) it would mean that:
+ * int32Values[32] is a valid sensor value
+ * floatValues[0 thru 3] are not valid sensor values
+ * floatValues[4 and 5] are valid sensor values
+ * floatValues[6] is not a valid sensor value
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ OBD2_LIVE_FRAME = (
+ 0x0D00
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
+
+ /**
+ * OBD2 Freeze Frame Sensor Data
+ *
+ * Reports a snapshot of the value of the OBD2 sensors available at the time that a fault
+ * occurred and was detected.
+ *
+ * A configArray must be provided with the same meaning as defined for OBD2_LIVE_FRAME.
+ *
+ * The values of this property are to be interpreted in a similar fashion as those for
+ * OBD2_LIVE_FRAME, with the exception that the stringValue field may contain a non-empty
+ * diagnostic troubleshooting code (DTC).
+ *
+ * A IVehicle#get request of this property must provide a value for int64Values[0].
+ * This will be interpreted as the timestamp of the freeze frame to retrieve. A list of
+ * timestamps can be obtained by a IVehicle#get of OBD2_FREEZE_FRAME_INFO.
+ *
+ * Should no freeze frame be available at the given timestamp, a response of NOT_AVAILABLE
+ * must be returned by the implementation. Because vehicles may have limited storage for
+ * freeze frames, it is possible for a frame request to respond with NOT_AVAILABLE even if
+ * the associated timestamp has been recently obtained via OBD2_FREEZE_FRAME_INFO.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ OBD2_FREEZE_FRAME = (
+ 0x0D01
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
+
+ /**
+ * OBD2 Freeze Frame Information
+ *
+ * This property describes the current freeze frames stored in vehicle
+ * memory and available for retrieval via OBD2_FREEZE_FRAME.
+ *
+ * The values are to be interpreted as follows:
+ * each element of int64Values must be the timestamp at which a a fault code
+ * has been detected and the corresponding freeze frame stored, and each
+ * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
+ * the corresponding freeze frame.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:READ
+ *
+ * @since o.mr1
+ */
+ OBD2_FREEZE_FRAME_INFO = (
+ 0x0D02
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
+
+ /**
+ * OBD2 Freeze Frame Clear
+ *
+ * This property allows deletion of any of the freeze frames stored in
+ * vehicle memory, as described by OBD2_FREEZE_FRAME_INFO.
+ *
+ * The configArray is set as follows:
+ * configArray[0] = 1 if the implementation is able to clear individual freeze frames
+ * by timestamp, 0 otherwise
+ *
+ * IVehicle#set of this property is to be interpreted as follows:
+ * if int64Values contains no elements, then all frames stored must be cleared;
+ * if int64Values contains one or more elements, then frames at the timestamps
+ * stored in int64Values must be cleared, and the others not cleared. Should the
+ * vehicle not support selective clearing of freeze frames, this latter mode must
+ * return NOT_AVAILABLE.
+ *
+ * @change_mode VehiclePropertyChangeMode:ON_CHANGE
+ * @access VehiclePropertyAccess:WRITE
+ *
+ * @since o.mr1
+ */
+ OBD2_FREEZE_FRAME_CLEAR = (
+ 0x0D03
+ | VehiclePropertyGroup:SYSTEM
+ | VehiclePropertyType:COMPLEX
+ | VehicleArea:GLOBAL),
};
/**
* Bit flags for fan direction
*/
enum VehicleHvacFanDirection : int32_t {
- FACE = 0x1,
- FLOOR = 0x2,
- FACE_AND_FLOOR = 0x3,
- DEFROST = 0x4,
- DEFROST_AND_FLOOR = 0x5,
+ FACE = 0x1,
+ FLOOR = 0x2,
+ FACE_AND_FLOOR = 0x3,
+ DEFROST = 0x4,
+ DEFROST_AND_FLOOR = 0x5,
};
/**
* Constants relevant to radio.
*/
enum VehicleRadioConstants : int32_t {
- /** Minimum value for the radio preset */
- VEHICLE_RADIO_PRESET_MIN_VALUE = 1,
+ /** Minimum value for the radio preset */
+ VEHICLE_RADIO_PRESET_MIN_VALUE = 1,
};
enum VehicleAudioFocusRequest : int32_t {
- REQUEST_GAIN = 0x1,
- REQUEST_GAIN_TRANSIENT = 0x2,
- REQUEST_GAIN_TRANSIENT_MAY_DUCK = 0x3,
- /**
- * This is for the case where android side plays sound like UI feedback
- * and car side does not need to duck existing playback as long as
- * requested stream is available.
- */
- REQUEST_GAIN_TRANSIENT_NO_DUCK = 0x4,
- REQUEST_RELEASE = 0x5,
-
+ REQUEST_GAIN = 0x1,
+ REQUEST_GAIN_TRANSIENT = 0x2,
+ REQUEST_GAIN_TRANSIENT_MAY_DUCK = 0x3,
+ /**
+ * This is for the case where android side plays sound like UI feedback
+ * and car side does not need to duck existing playback as long as
+ * requested stream is available.
+ */
+ REQUEST_GAIN_TRANSIENT_NO_DUCK = 0x4,
+ REQUEST_RELEASE = 0x5,
};
enum VehicleAudioFocusState : int32_t {
- /**
- * Android side has permanent focus and can play allowed streams.
- */
- STATE_GAIN = 0x1,
+ /**
+ * Android side has permanent focus and can play allowed streams.
+ */
+ STATE_GAIN = 0x1,
- /**
- * Android side has transient focus and can play allowed streams.
- */
- STATE_GAIN_TRANSIENT = 0x2,
+ /**
+ * Android side has transient focus and can play allowed streams.
+ */
+ STATE_GAIN_TRANSIENT = 0x2,
- /**
- * Car audio module is playing guidance kind of sound outside Android.
- * Android side can still play through allowed streams with ducking.
- */
- STATE_LOSS_TRANSIENT_CAN_DUCK = 0x3,
+ /**
+ * Car audio module is playing guidance kind of sound outside Android.
+ * Android side can still play through allowed streams with ducking.
+ */
+ STATE_LOSS_TRANSIENT_CAN_DUCK = 0x3,
- /**
- * Car audio module is playing transient sound outside Android. Android side
- * must stop playing any sounds.
- */
- STATE_LOSS_TRANSIENT = 0x4,
+ /**
+ * Car audio module is playing transient sound outside Android. Android side
+ * must stop playing any sounds.
+ */
+ STATE_LOSS_TRANSIENT = 0x4,
- /**
- * Android side has lost focus and cannot play any sound.
- */
- STATE_LOSS = 0x5,
-
- /**
- * car audio module is playing safety critical sound, and Android side cannot
- * request focus until the current state is finished. car audio module
- * restore it to the previous state when it can allow Android to play.
- */
- STATE_LOSS_TRANSIENT_EXLCUSIVE = 0x6,
+ /**
+ * Android side has lost focus and cannot play any sound.
+ */
+ STATE_LOSS = 0x5,
+ /**
+ * car audio module is playing safety critical sound, and Android side cannot
+ * request focus until the current state is finished. car audio module
+ * restore it to the previous state when it can allow Android to play.
+ */
+ STATE_LOSS_TRANSIENT_EXLCUSIVE = 0x6,
};
/**
* Flags to represent multiple streams by combining these.
*/
enum VehicleAudioStreamFlag : int32_t {
- STREAM0_FLAG = (0x1 << 0),
- STREAM1_FLAG = (0x1 << 1),
- STREAM2_FLAG = (0x1 << 2),
+ STREAM0_FLAG = (0x1 << 0),
+ STREAM1_FLAG = (0x1 << 1),
+ STREAM2_FLAG = (0x1 << 2),
};
/**
@@ -1876,107 +2123,110 @@ enum VehicleAudioStreamFlag : int32_t {
* Can be used for audio related property expecting one stream.
*/
enum VehicleAudioStream : int32_t {
- STREAM0 = 0,
- STREAM1 = 1,
+ STREAM0 = 0,
+ STREAM1 = 1,
};
/**
* Flag to represent external focus state (outside Android).
*/
enum VehicleAudioExtFocusFlag : int32_t {
- /**
- * No external focus holder.
- */
- NONE_FLAG = 0x0,
+ /**
+ * No external focus holder.
+ */
+ NONE_FLAG = 0x0,
- /**
- * Car side (outside Android) has component holding GAIN kind of focus state.
- */
- PERMANENT_FLAG = 0x1,
+ /**
+ * Car side (outside Android) has component holding GAIN kind of focus state.
+ */
+ PERMANENT_FLAG = 0x1,
- /**
- * Car side (outside Android) has component holding GAIN_TRANSIENT kind of
- * focus state.
- */
- TRANSIENT_FLAG = 0x2,
+ /**
+ * Car side (outside Android) has component holding GAIN_TRANSIENT kind of
+ * focus state.
+ */
+ TRANSIENT_FLAG = 0x2,
- /**
- * Car side is expected to play something while focus is held by Android side.
- * One example can be radio attached in car side. But Android's radio app
- * still must have focus, and Android side must be in GAIN state, but
- * media stream will not be allocated to Android side and car side can play
- * radio any time while this flag is active.
- */
- PLAY_ONLY_FLAG = 0x4,
+ /**
+ * Car side is expected to play something while focus is held by Android side.
+ * One example can be radio attached in car side. But Android's radio app
+ * still must have focus, and Android side must be in GAIN state, but
+ * media stream will not be allocated to Android side and car side can play
+ * radio any time while this flag is active.
+ */
+ PLAY_ONLY_FLAG = 0x4,
- /**
- * Car side must mute any media including radio. This can be used with any
- * focus request including GAIN* and RELEASE.
- */
- MUTE_MEDIA_FLAG = 0x8,
+ /**
+ * Car side must mute any media including radio. This can be used with any
+ * focus request including GAIN* and RELEASE.
+ */
+ MUTE_MEDIA_FLAG = 0x8,
};
/**
* Index in int32Values for VehicleProperty#AUDIO_FOCUS property.
*/
enum VehicleAudioFocusIndex : int32_t {
- FOCUS = 0,
- STREAMS = 1,
- EXTERNAL_FOCUS_STATE = 2,
- AUDIO_CONTEXTS = 3,
+ FOCUS = 0,
+ STREAMS = 1,
+ EXTERNAL_FOCUS_STATE = 2,
+ AUDIO_CONTEXTS = 3,
};
/**
* Flags to tell the current audio context.
*/
enum VehicleAudioContextFlag : int32_t {
- /** Music playback is currently active. */
- MUSIC_FLAG = 0x1,
+ /** Music playback is currently active. */
+ MUSIC_FLAG = 0x1,
- /** Navigation is currently running. */
- NAVIGATION_FLAG = 0x2,
+ /** Navigation is currently running. */
+ NAVIGATION_FLAG = 0x2,
- /** Voice command session is currently running. */
- VOICE_COMMAND_FLAG = 0x4,
+ /** Voice command session is currently running. */
+ VOICE_COMMAND_FLAG = 0x4,
- /** Voice call is currently active. */
- CALL_FLAG = 0x8,
+ /** Voice call is currently active. */
+ CALL_FLAG = 0x8,
- /**
- * Alarm is active.
- * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
- */
- ALARM_FLAG = 0x10,
+ /**
+ * Alarm is active.
+ * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
+ */
+ ALARM_FLAG = 0x10,
- /**
- * Notification sound is active.
- * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
- */
- NOTIFICATION_FLAG = 0x20,
+ /**
+ * Notification sound is active.
+ * This must be only used in VehicleProperty#AUDIO_ROUTING_POLICY.
+ */
+ NOTIFICATION_FLAG = 0x20,
- /**
- * Context unknown. Only used for VehicleProperty#AUDIO_ROUTING_POLICY to
- * represent default stream for unknown contents.
- */
- UNKNOWN_FLAG = 0x40,
+ /**
+ * Context unknown. Only used for VehicleProperty#AUDIO_ROUTING_POLICY to
+ * represent default stream for unknown contents.
+ */
+ UNKNOWN_FLAG = 0x40,
- /** Safety alert / warning is played. */
- SAFETY_ALERT_FLAG = 0x80,
+ /** Safety alert / warning is played. */
+ SAFETY_ALERT_FLAG = 0x80,
- /** CD / DVD kind of audio is played */
- CD_ROM_FLAG = 0x100,
+ /** CD / DVD kind of audio is played */
+ CD_ROM_FLAG = 0x100,
- /** Aux audio input is played */
- AUX_AUDIO_FLAG = 0x200,
+ /** Aux audio input is played */
+ AUX_AUDIO_FLAG = 0x200,
- /** system sound like UI feedback */
- SYSTEM_SOUND_FLAG = 0x400,
+ /** system sound like UI feedback */
+ SYSTEM_SOUND_FLAG = 0x400,
- /** Radio is played */
- RADIO_FLAG = 0x800,
+ /** Radio is played */
+ RADIO_FLAG = 0x800,
- /** Ext source is played. This is for tagging generic ext sources. */
- EXT_SOURCE_FLAG = 0x1000,
+ /** Ext source is played. This is for tagging generic ext sources. */
+ EXT_SOURCE_FLAG = 0x1000,
+
+ /** The phone ring tone is played */
+ RINGTONE_FLAG = 0x2000
};
/**
@@ -1984,65 +2234,65 @@ enum VehicleAudioContextFlag : int32_t {
* used in configArray[1] of VehiclePropConfig.
*/
enum VehicleAudioVolumeCapabilityFlag : int32_t {
- /**
- * External audio module or vehicle hal has persistent storage
- * to keep the volume level. This must be set only when per context
- * volume level is supported. When this is set, audio volume level per
- * each context will be retrieved from the property when system starts up.
- * And external audio module is also expected to adjust volume automatically
- * whenever there is an audio context change.
- * When this flag is not set, android side will assume that there is no
- * persistent storage and stored value in android side will be used to
- * initialize the volume level. And android side will set volume level
- * of each physical streams whenever there is an audio context change.
- */
- PERSISTENT_STORAGE = 0x1,
+ /**
+ * External audio module or vehicle hal has persistent storage to keep the
+ * volume level. When this is set, the audio volume level for each context
+ * will be retrieved from the property when the system starts up.
+ * And external audio module is also expected to adjust volume automatically
+ * whenever there is an audio context change.
+ * When this flag is not set, android side will assume that there is no
+ * persistent storage and the value stored in the android side will be used to
+ * initialize the volume level, and android side will set volume level
+ * of each physical stream whenever there is an audio context change.
+ */
+ PERSISTENT_STORAGE = 0x1,
- /**
- * When this flag is set, the H/W can support only single master volume for
- * all streams.
- * There is no way to set volume level differently per each stream or context.
- */
- MASTER_VOLUME_ONLY = 0x2,
+ /**
+ * [DEPRECATED]
+ * When this flag is set, the H/W can support only single master volume for
+ * all streams. There is no way to set volume level differently for each stream
+ * or context.
+ */
+ MASTER_VOLUME_ONLY = 0x2,
};
/**
* enum to represent audio volume state.
*/
enum VehicleAudioVolumeState : int32_t {
- STATE_OK = 0,
+ STATE_OK = 0,
- /**
- * Audio volume has reached volume limit set in
- * VehicleProperty#AUDIO_VOLUME_LIMIT and user's request to increase volume
- * further is not allowed.
- */
- LIMIT_REACHED = 1,
+ /**
+ * Audio volume has reached volume limit set in
+ * VehicleProperty#AUDIO_VOLUME_LIMIT and user's request to increase volume
+ * further is not allowed.
+ */
+ STATE_LIMIT_REACHED = 1,
};
/**
* Index in int32Values for VehicleProperty#AUDIO_VOLUME property.
*/
enum VehicleAudioVolumeIndex : int32_t {
- INDEX_STREAM = 0,
- INDEX_VOLUME = 1,
- INDEX_STATE = 2,
+ STREAM = 0,
+ VOLUME = 1,
+ STATE = 2,
};
/**
* Index in int32Values for VehicleProperty#AUDIO_VOLUME_LIMIT property.
*/
enum VehicleAudioVolumeLimitIndex : int32_t {
- STREAM = 0,
- MAX_VOLUME = 1,
+ STREAM = 0,
+ MAX_VOLUME = 1,
};
/**
* Index in int32Values for VehicleProperty#AUDIO_ROUTING_POLICY property.
*/
enum VehicleAudioRoutingPolicyIndex : int32_t {
- STREAM = 0,
- CONTEXTS = 1,
+ STREAM = 0,
+ CONTEXTS = 1,
};
/**
@@ -2054,172 +2304,172 @@ enum VehicleAudioHwVariantConfigFlag : int32_t {
* Flag to tell that radio is internal to android and radio must
* be treated like other android stream like media.
* When this flag is not set or AUDIO_HW_VARIANT does not exist,
- * radio is treated as external module. This brins some delta in audio focus
+ * radio is treated as external module. This may affect audio focus
* handling as well.
*/
INTERNAL_RADIO_FLAG = 0x1,
};
enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ {
- /**
- * AP can enter deep sleep state. If not set, AP will always shutdown from
- * VehicleApPowerState#SHUTDOWN_PREPARE power state.
- */
- ENABLE_DEEP_SLEEP_FLAG = 0x1,
+ /**
+ * AP can enter deep sleep state. If not set, AP will always shutdown from
+ * VehicleApPowerState#SHUTDOWN_PREPARE power state.
+ */
+ ENABLE_DEEP_SLEEP_FLAG = 0x1,
- /**
- * The power controller can power on AP from off state after timeout
- * specified in VehicleApPowerSet VEHICLE_AP_POWER_SET_SHUTDOWN_READY message.
- */
- CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2,
+ /**
+ * The power controller can power on AP from off state after timeout
+ * specified in VehicleApPowerSet VEHICLE_AP_POWER_SET_SHUTDOWN_READY message.
+ */
+ CONFIG_SUPPORT_TIMER_POWER_ON_FLAG = 0x2,
};
enum VehicleApPowerState : int32_t /* NOTE: type is guessed */ {
- /** vehicle HAL will never publish this state to AP */
- OFF = 0,
+ /** vehicle HAL will never publish this state to AP */
+ OFF = 0,
- /** vehicle HAL will never publish this state to AP */
- DEEP_SLEEP = 1,
+ /** vehicle HAL will never publish this state to AP */
+ DEEP_SLEEP = 1,
- /** AP is on but display must be off. */
- ON_DISP_OFF = 2,
+ /** AP is on but display must be off. */
+ ON_DISP_OFF = 2,
- /** AP is on with display on. This state allows full user interaction. */
- ON_FULL = 3,
+ /** AP is on with display on. This state allows full user interaction. */
+ ON_FULL = 3,
- /**
- * The power controller has requested AP to shutdown. AP can either enter
- * sleep state or start full shutdown. AP can also request postponing
- * shutdown by sending VehicleApPowerSetState#SHUTDOWN_POSTPONE message. The
- * power controller must change power state to this state to shutdown
- * system.
- *
- * int32Values[1] : one of enum_vehicle_ap_power_state_shutdown_param_type
- */
- SHUTDOWN_PREPARE = 4,
+ /**
+ * The power controller has requested AP to shutdown. AP can either enter
+ * sleep state or start full shutdown. AP can also request postponing
+ * shutdown by sending VehicleApPowerSetState#SHUTDOWN_POSTPONE message. The
+ * power controller must change power state to this state to shutdown
+ * system.
+ *
+ * int32Values[1] : one of enum_vehicle_ap_power_state_shutdown_param_type
+ */
+ SHUTDOWN_PREPARE = 4,
};
enum VehicleApPowerStateShutdownParam : int32_t {
- /** AP must shutdown immediately. Postponing is not allowed. */
- SHUTDOWN_IMMEDIATELY = 1,
+ /** AP must shutdown immediately. Postponing is not allowed. */
+ SHUTDOWN_IMMEDIATELY = 1,
- /** AP can enter deep sleep instead of shutting down completely. */
- CAN_SLEEP = 2,
+ /** AP can enter deep sleep instead of shutting down completely. */
+ CAN_SLEEP = 2,
- /** AP can only shutdown with postponing allowed. */
- SHUTDOWN_ONLY = 3,
+ /** AP can only shutdown with postponing allowed. */
+ SHUTDOWN_ONLY = 3,
};
enum VehicleApPowerSetState : int32_t /* NOTE: type is guessed */ {
- /**
- * AP has finished boot up, and can start shutdown if requested by power
- * controller.
- */
- BOOT_COMPLETE = 0x1,
+ /**
+ * AP has finished boot up, and can start shutdown if requested by power
+ * controller.
+ */
+ BOOT_COMPLETE = 0x1,
- /**
- * AP is entering deep sleep state. How this state is implemented may vary
- * depending on each H/W, but AP's power must be kept in this state.
- */
- DEEP_SLEEP_ENTRY = 0x2,
+ /**
+ * AP is entering deep sleep state. How this state is implemented may vary
+ * depending on each H/W, but AP's power must be kept in this state.
+ */
+ DEEP_SLEEP_ENTRY = 0x2,
- /**
- * AP is exiting from deep sleep state, and is in
- * VehicleApPowerState#SHUTDOWN_PREPARE state.
- * The power controller may change state to other ON states based on the
- * current state.
- */
- DEEP_SLEEP_EXIT = 0x3,
+ /**
+ * AP is exiting from deep sleep state, and is in
+ * VehicleApPowerState#SHUTDOWN_PREPARE state.
+ * The power controller may change state to other ON states based on the
+ * current state.
+ */
+ DEEP_SLEEP_EXIT = 0x3,
- /**
- * int32Values[1]: Time to postpone shutdown in ms. Maximum value can be
- * 5000 ms.
- * If AP needs more time, it will send another POSTPONE
- * message before the previous one expires.
- */
- SHUTDOWN_POSTPONE = 0x4,
+ /**
+ * int32Values[1]: Time to postpone shutdown in ms. Maximum value can be
+ * 5000 ms.
+ * If AP needs more time, it will send another POSTPONE
+ * message before the previous one expires.
+ */
+ SHUTDOWN_POSTPONE = 0x4,
- /**
- * AP is starting shutting down. When system completes shutdown, everything
- * will stop in AP as kernel will stop all other contexts. It is
- * responsibility of vehicle HAL or lower level to synchronize that state
- * with external power controller. As an example, some kind of ping
- * with timeout in power controller can be a solution.
- *
- * int32Values[1]: Time to turn on AP in secs. Power controller may turn on
- * AP after specified time so that AP can run tasks like
- * update. If it is set to 0, there is no wake up, and power
- * controller may not necessarily support wake-up. If power
- * controller turns on AP due to timer, it must start with
- * VehicleApPowerState#ON_DISP_OFF state, and after
- * receiving VehicleApPowerSetState#BOOT_COMPLETE, it shall
- * do state transition to
- * VehicleApPowerState#SHUTDOWN_PREPARE.
- */
- SHUTDOWN_START = 0x5,
+ /**
+ * AP is starting shutting down. When system completes shutdown, everything
+ * will stop in AP as kernel will stop all other contexts. It is
+ * responsibility of vehicle HAL or lower level to synchronize that state
+ * with external power controller. As an example, some kind of ping
+ * with timeout in power controller can be a solution.
+ *
+ * int32Values[1]: Time to turn on AP in secs. Power controller may turn on
+ * AP after specified time so that AP can run tasks like
+ * update. If it is set to 0, there is no wake up, and power
+ * controller may not necessarily support wake-up. If power
+ * controller turns on AP due to timer, it must start with
+ * VehicleApPowerState#ON_DISP_OFF state, and after
+ * receiving VehicleApPowerSetState#BOOT_COMPLETE, it shall
+ * do state transition to
+ * VehicleApPowerState#SHUTDOWN_PREPARE.
+ */
+ SHUTDOWN_START = 0x5,
- /**
- * User has requested to turn off headunit's display, which is detected in
- * android side.
- * The power controller may change the power state to
- * VehicleApPowerState#ON_DISP_OFF.
- */
- DISPLAY_OFF = 0x6,
+ /**
+ * User has requested to turn off headunit's display, which is detected in
+ * android side.
+ * The power controller may change the power state to
+ * VehicleApPowerState#ON_DISP_OFF.
+ */
+ DISPLAY_OFF = 0x6,
- /**
- * User has requested to turn on headunit's display, most probably from power
- * key input which is attached to headunit. The power controller may change
- * the power state to VehicleApPowerState#ON_FULL.
- */
- DISPLAY_ON = 0x7,
+ /**
+ * User has requested to turn on headunit's display, most probably from power
+ * key input which is attached to headunit. The power controller may change
+ * the power state to VehicleApPowerState#ON_FULL.
+ */
+ DISPLAY_ON = 0x7,
};
/**
* Index in int32Values for VehicleProperty#AP_POWER_STATE property.
*/
enum VehicleApPowerStateIndex : int32_t {
- STATE = 0,
- ADDITIONAL = 1,
+ STATE = 0,
+ ADDITIONAL = 1,
};
/**
* Enum to represent bootup reason.
*/
enum VehicleApPowerBootupReason : int32_t {
- /**
- * Power on due to user's pressing of power key or rotating of ignition
- * switch.
- */
- USER_POWER_ON = 0,
+ /**
+ * Power on due to user's pressing of power key or rotating of ignition
+ * switch.
+ */
+ USER_POWER_ON = 0,
- /**
- * Automatic power on triggered by door unlock or any other kind of automatic
- * user detection.
- */
- USER_UNLOCK = 1,
+ /**
+ * Automatic power on triggered by door unlock or any other kind of automatic
+ * user detection.
+ */
+ USER_UNLOCK = 1,
- /**
- * Automatic power on triggered by timer. This only happens when AP has asked
- * wake-up after
- * certain time through time specified in
- * VehicleApPowerSetState#SHUTDOWN_START.
- */
- TIMER = 2,
+ /**
+ * Automatic power on triggered by timer. This only happens when AP has asked
+ * wake-up after
+ * certain time through time specified in
+ * VehicleApPowerSetState#SHUTDOWN_START.
+ */
+ TIMER = 2,
};
enum VehicleHwKeyInputAction : int32_t {
- /** Key down */
- ACTION_DOWN = 0,
+ /** Key down */
+ ACTION_DOWN = 0,
- /** Key up */
- ACTION_UP = 1,
+ /** Key up */
+ ACTION_UP = 1,
};
enum VehicleDisplay : int32_t {
- /** center console */
- MAIN = 0,
+ /** center console */
+ MAIN = 0,
- INSTRUMENT_CLUSTER = 1,
+ INSTRUMENT_CLUSTER = 1,
};
/**
@@ -2312,11 +2562,11 @@ enum VehiclePropertyChangeMode : int32_t {
* the expected output.
*/
enum VehiclePropertyAccess : int32_t {
- NONE = 0x00,
+ NONE = 0x00,
- READ = 0x01,
- WRITE = 0x02,
- READ_WRITE = 0x03,
+ READ = 0x01,
+ WRITE = 0x02,
+ READ_WRITE = 0x03,
};
/**
@@ -2325,32 +2575,32 @@ enum VehiclePropertyAccess : int32_t {
* The driving states determine what features of the UI will be accessible.
*/
enum VehicleDrivingStatus : int32_t {
- UNRESTRICTED = 0x00,
- NO_VIDEO = 0x01,
- NO_KEYBOARD_INPUT = 0x02,
- NO_VOICE_INPUT = 0x04,
- NO_CONFIG = 0x08,
- LIMIT_MESSAGE_LEN = 0x10,
+ UNRESTRICTED = 0x00,
+ NO_VIDEO = 0x01,
+ NO_KEYBOARD_INPUT = 0x02,
+ NO_VOICE_INPUT = 0x04,
+ NO_CONFIG = 0x08,
+ LIMIT_MESSAGE_LEN = 0x10,
};
/**
* Various gears which can be selected by user and chosen in system.
*/
enum VehicleGear: int32_t {
- GEAR_NEUTRAL = 0x0001,
- GEAR_REVERSE = 0x0002,
- GEAR_PARK = 0x0004,
- GEAR_DRIVE = 0x0008,
- GEAR_LOW = 0x0010,
- GEAR_1 = 0x0010,
- GEAR_2 = 0x0020,
- GEAR_3 = 0x0040,
- GEAR_4 = 0x0080,
- GEAR_5 = 0x0100,
- GEAR_6 = 0x0200,
- GEAR_7 = 0x0400,
- GEAR_8 = 0x0800,
- GEAR_9 = 0x1000,
+ GEAR_NEUTRAL = 0x0001,
+ GEAR_REVERSE = 0x0002,
+ GEAR_PARK = 0x0004,
+ GEAR_DRIVE = 0x0008,
+ GEAR_LOW = 0x0010,
+ GEAR_1 = 0x0010,
+ GEAR_2 = 0x0020,
+ GEAR_3 = 0x0040,
+ GEAR_4 = 0x0080,
+ GEAR_5 = 0x0100,
+ GEAR_6 = 0x0200,
+ GEAR_7 = 0x0400,
+ GEAR_8 = 0x0800,
+ GEAR_9 = 0x1000,
};
/**
@@ -2610,73 +2860,73 @@ enum VehiclePropertyOperation : int32_t {
enum SubscribeFlags : int32_t {
- UNDEFINED = 0x0,
+ UNDEFINED = 0x0,
- /**
- * Subscribe to event that was originated in vehicle HAL
- * (most likely this event came from the vehicle itself).
- */
- HAL_EVENT = 0x1,
+ /**
+ * Subscribe to event that was originated in vehicle HAL
+ * (most likely this event came from the vehicle itself).
+ */
+ HAL_EVENT = 0x1,
- /**
- * Use this flag to subscribe on events when IVehicle#set(...) was called by
- * vehicle HAL's client (e.g. Car Service).
- */
- SET_CALL = 0x2,
+ /**
+ * Use this flag to subscribe on events when IVehicle#set(...) was called by
+ * vehicle HAL's client (e.g. Car Service).
+ */
+ SET_CALL = 0x2,
- DEFAULT = HAL_EVENT,
+ DEFAULT = HAL_EVENT,
};
/**
* Encapsulates information about subscription to vehicle property events.
*/
struct SubscribeOptions {
- /** Property to subscribe */
- int32_t propId;
+ /** Property to subscribe */
+ int32_t propId;
- /**
- * Area ids - this must be a bit mask of areas to subscribe or 0 to subscribe
- * to all areas.
- */
- int32_t vehicleAreas;
+ /**
+ * Area ids - this must be a bit mask of areas to subscribe or 0 to subscribe
+ * to all areas.
+ */
+ int32_t vehicleAreas;
- /**
- * Sample rate in Hz.
- *
- * Must be provided for properties with
- * VehiclePropertyChangeMode::CONTINUOUS. The value must be within
- * VehiclePropConfig#minSamplingRate .. VehiclePropConfig#maxSamplingRate
- * for a given property.
- * This value indicates how many updates per second client wants to receive.
- */
- float sampleRate;
+ /**
+ * Sample rate in Hz.
+ *
+ * Must be provided for properties with
+ * VehiclePropertyChangeMode::CONTINUOUS. The value must be within
+ * VehiclePropConfig#minSamplingRate .. VehiclePropConfig#maxSamplingRate
+ * for a given property.
+ * This value indicates how many updates per second client wants to receive.
+ */
+ float sampleRate;
- /** Flags that indicate what kind of events listen to. */
- SubscribeFlags flags;
+ /** Flags that indicate what kind of events listen to. */
+ SubscribeFlags flags;
};
/** Error codes used in vehicle HAL interface. */
enum StatusCode : int32_t {
- OK = 0,
+ OK = 0,
- /** Try again. */
- TRY_AGAIN = 1,
+ /** Try again. */
+ TRY_AGAIN = 1,
- /** Invalid argument provided. */
- INVALID_ARG = 2,
+ /** Invalid argument provided. */
+ INVALID_ARG = 2,
- /**
- * This code must be returned when device that associated with the vehicle
- * property is not available. For example, when client tries to set HVAC
- * temperature when the whole HVAC unit is turned OFF.
- */
- NOT_AVAILABLE = 3,
+ /**
+ * This code must be returned when device that associated with the vehicle
+ * property is not available. For example, when client tries to set HVAC
+ * temperature when the whole HVAC unit is turned OFF.
+ */
+ NOT_AVAILABLE = 3,
- /** Access denied */
- ACCESS_DENIED = 4,
+ /** Access denied */
+ ACCESS_DENIED = 4,
- /** Something unexpected has happened in Vehicle HAL */
- INTERNAL_ERROR = 5,
+ /** Something unexpected has happened in Vehicle HAL */
+ INTERNAL_ERROR = 5,
};
enum Wheel : int32_t {
@@ -2687,3 +2937,460 @@ enum Wheel : int32_t {
LEFT_REAR = 0x4,
RIGHT_REAR = 0x8,
};
+
+/**
+ * The status of the vehicle's fuel system.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2FuelSystemStatus : int32_t {
+ OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
+ CLOSED_LOOP = 2,
+ OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
+ OPEN_SYSTEM_FAILURE = 8,
+ CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
+};
+
+/** Defines which ignition monitors are available to be read. */
+enum Obd2IgnitionMonitorKind : int32_t {
+ SPARK = 0,
+ COMPRESSION = 1,
+};
+
+/**
+ * Ignition monitors common to both SPARK and COMPRESSION.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2CommonIgnitionMonitors : int32_t {
+ COMPONENTS_AVAILABLE = 0x1 << 0,
+ COMPONENTS_INCOMPLETE = 0x1 << 1,
+
+ FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
+ FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
+
+ MISFIRE_AVAILABLE = 0x1 << 4,
+ MISFIRE_INCOMPLETE = 0x1 << 5,
+};
+
+/**
+ * Ignition monitors available for SPARK vehicles.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2SparkIgnitionMonitors : Obd2CommonIgnitionMonitors {
+ EGR_AVAILABLE = 0x1 << 6,
+ EGR_INCOMPLETE = 0x1 << 7,
+
+ OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
+ OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
+
+ OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
+ OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
+
+ AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
+ AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
+
+ SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
+ SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
+
+ EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
+ EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
+
+ HEATED_CATALYST_AVAILABLE = 0x1 << 18,
+ HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
+
+ CATALYST_AVAILABLE = 0x1 << 20,
+ CATALYST_INCOMPLETE = 0x1 << 21,
+};
+
+/**
+ * Ignition monitors only available for COMPRESSION vehicles.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2CompressionIgnitionMonitors : Obd2CommonIgnitionMonitors {
+ EGR_OR_VVT_AVAILABLE = 0x1 << 6,
+ EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
+
+ PM_FILTER_AVAILABLE = 0x1 << 8,
+ PM_FILTER_INCOMPLETE = 0x1 << 9,
+
+ EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
+ EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
+
+ BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
+ BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
+
+ NOx_SCR_AVAILABLE = 0x1 << 14,
+ NOx_SCR_INCOMPLETE = 0x1 << 15,
+
+ NMHC_CATALYST_AVAILABLE = 0x1 << 16,
+ NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
+};
+
+/**
+ * The status of the vehicle's secondary air system.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2SecondaryAirStatus : int32_t {
+ UPSTREAM = 1,
+ DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
+ FROM_OUTSIDE_OR_OFF = 4,
+ PUMP_ON_FOR_DIAGNOSTICS = 8,
+};
+
+/**
+ * The fuel type(s) supported by a vehicle.
+ * These values come from the SAE J1979 standard.
+ */
+enum Obd2FuelType : int32_t {
+ NOT_AVAILABLE = 0,
+ GASOLINE = 1,
+ METHANOL = 2,
+ ETHANOL = 3,
+ DIESEL = 4,
+ LPG = 5,
+ CNG = 6,
+ PROPANE = 7,
+ ELECTRIC = 8,
+ BIFUEL_RUNNING_GASOLINE = 9,
+ BIFUEL_RUNNING_METHANOL = 10,
+ BIFUEL_RUNNING_ETHANOL = 11,
+ BIFUEL_RUNNING_LPG = 12,
+ BIFUEL_RUNNING_CNG = 13,
+ BIFUEL_RUNNING_PROPANE = 14,
+ BIFUEL_RUNNING_ELECTRIC = 15,
+ BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
+ HYBRID_GASOLINE = 17,
+ HYBRID_ETHANOL = 18,
+ HYBRID_DIESEL = 19,
+ HYBRID_ELECTRIC = 20,
+ HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
+ HYBRID_REGENERATIVE = 22,
+ BIFUEL_RUNNING_DIESEL = 23,
+};
+
+/**
+ * This enum provides the canonical mapping for sensor properties that have an integer value.
+ * The ordering of the values is taken from the OBD2 specification.
+ * Some of the properties are represented as an integer mapping to another enum. In those cases
+ * expect a comment by the property definition describing the enum to look at for the mapping.
+ * Any value greater than the last reserved index is available to vendors to map their extensions.
+ * While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
+ * to each one to aid implementors.
+ */
+enum DiagnosticIntegerSensorIndex : int32_t {
+ /** refer to FuelSystemStatus for a description of this value. */
+ FUEL_SYSTEM_STATUS = 0, /* PID 0x03 */
+ MALFUNCTION_INDICATOR_LIGHT_ON = 1, /* PID 0x01 */
+
+ /** refer to IgnitionMonitorKind for a description of this value. */
+ IGNITION_MONITORS_SUPPORTED = 2, /* PID 0x01 */
+
+ /**
+ * The value of this sensor is a bitmask that specifies whether ignition-specific
+ * tests are available and whether they are complete. The semantics of the individual
+ * bits in this value are given by, respectively, SparkIgnitionMonitors and
+ * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
+ */
+ IGNITION_SPECIFIC_MONITORS = 3, /* PID 0x01 */
+ INTAKE_AIR_TEMPERATURE = 4, /* PID 0x0F */
+
+ /** refer to SecondaryAirStatus for a description of this value. */
+ COMMANDED_SECONDARY_AIR_STATUS = 5, /* PID 0x12 */
+ NUM_OXYGEN_SENSORS_PRESENT = 6, /* PID 0x13 */
+ RUNTIME_SINCE_ENGINE_START = 7, /* PID 0x1F */
+ DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8, /* PID 0x21 */
+ WARMUPS_SINCE_CODES_CLEARED = 9, /* PID 0x30 */
+ DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10, /* PID 0x31 */
+ ABSOLUTE_BAROMETRIC_PRESSURE = 11, /* PID 0x33 */
+ CONTROL_MODULE_VOLTAGE = 12, /* PID 0x42 */
+ AMBIENT_AIR_TEMPERATURE = 13, /* PID 0x46 */
+ TIME_WITH_MALFUNCTION_LIGHT_ON = 14, /* PID 0x4D */
+ TIME_SINCE_TROUBLE_CODES_CLEARED = 15, /* PID 0x4E */
+ MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16, /* PID 0x4F */
+ MAX_OXYGEN_SENSOR_VOLTAGE = 17, /* PID 0x4F */
+ MAX_OXYGEN_SENSOR_CURRENT = 18, /* PID 0x4F */
+ MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19, /* PID 0x4F */
+ MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20, /* PID 0x50 */
+
+ /** refer to FuelType for a description of this value. */
+ FUEL_TYPE = 21, /* PID 0x51 */
+ FUEL_RAIL_ABSOLUTE_PRESSURE = 22, /* PID 0x59 */
+ ENGINE_OIL_TEMPERATURE = 23, /* PID 0x5C */
+ DRIVER_DEMAND_PERCENT_TORQUE = 24, /* PID 0x61 */
+ ENGINE_ACTUAL_PERCENT_TORQUE = 25, /* PID 0x62 */
+ ENGINE_REFERENCE_PERCENT_TORQUE = 26, /* PID 0x63 */
+ ENGINE_PERCENT_TORQUE_DATA_IDLE = 27, /* PID 0x64 */
+ ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28, /* PID 0x64 */
+ ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29, /* PID 0x64 */
+ ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30, /* PID 0x64 */
+ ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31, /* PID 0x64 */
+ LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
+};
+
+/**
+ * This enum provides the canonical mapping for sensor properties that have a floating-point value.
+ * The ordering of the values is taken from the OBD2 specification.
+ * Any value greater than the last reserved index is available to vendors to map their extensions.
+ * While these values do not directly map to SAE J1979 PIDs, an equivalence is listed next
+ * to each one to aid implementors.
+ */
+enum DiagnosticFloatSensorIndex : int32_t {
+ CALCULATED_ENGINE_LOAD = 0, /* PID 0x04 */
+ ENGINE_COOLANT_TEMPERATURE = 1, /* PID 0x05 */
+ SHORT_TERM_FUEL_TRIM_BANK1 = 2, /* PID 0x06 */
+ LONG_TERM_FUEL_TRIM_BANK1 = 3, /* PID 0x07 */
+ SHORT_TERM_FUEL_TRIM_BANK2 = 4, /* PID 0x08 */
+ LONG_TERM_FUEL_TRIM_BANK2 = 5, /* PID 0x09 */
+ FUEL_PRESSURE = 6, /* PID 0x0A */
+ INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7, /* PID 0x0B */
+ ENGINE_RPM = 8, /* PID 0x0C */
+ VEHICLE_SPEED = 9, /* PID 0x0D */
+ TIMING_ADVANCE = 10, /* PID 0x0E */
+ MAF_AIR_FLOW_RATE = 11, /* PID 0x10 */
+ THROTTLE_POSITION = 12, /* PID 0x11 */
+ OXYGEN_SENSOR1_VOLTAGE = 13, /* PID 0x14 */
+ OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14, /* PID 0x14 */
+ OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15, /* PID 0x24 */
+ OXYGEN_SENSOR2_VOLTAGE = 16, /* PID 0x15 */
+ OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17, /* PID 0x15 */
+ OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18, /* PID 0x25 */
+ OXYGEN_SENSOR3_VOLTAGE = 19, /* PID 0x16 */
+ OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20, /* PID 0x16 */
+ OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21, /* PID 0x26 */
+ OXYGEN_SENSOR4_VOLTAGE = 22, /* PID 0x17 */
+ OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23, /* PID 0x17 */
+ OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24, /* PID 0x27 */
+ OXYGEN_SENSOR5_VOLTAGE = 25, /* PID 0x18 */
+ OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26, /* PID 0x18 */
+ OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27, /* PID 0x28 */
+ OXYGEN_SENSOR6_VOLTAGE = 28, /* PID 0x19 */
+ OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29, /* PID 0x19 */
+ OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30, /* PID 0x29 */
+ OXYGEN_SENSOR7_VOLTAGE = 31, /* PID 0x1A */
+ OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32, /* PID 0x1A */
+ OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33, /* PID 0x2A */
+ OXYGEN_SENSOR8_VOLTAGE = 34, /* PID 0x1B */
+ OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35, /* PID 0x1B */
+ OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36, /* PID 0x2B */
+ FUEL_RAIL_PRESSURE = 37, /* PID 0x22 */
+ FUEL_RAIL_GAUGE_PRESSURE = 38, /* PID 0x23 */
+ COMMANDED_EXHAUST_GAS_RECIRCULATION = 39, /* PID 0x2C */
+ EXHAUST_GAS_RECIRCULATION_ERROR = 40, /* PID 0x2D */
+ COMMANDED_EVAPORATIVE_PURGE = 41, /* PID 0x2E */
+ FUEL_TANK_LEVEL_INPUT = 42, /* PID 0x2F */
+ EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43, /* PID 0x32 */
+ CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44, /* PID 0x3C */
+ CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45, /* PID 0x3D */
+ CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46, /* PID 0x3E */
+ CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47, /* PID 0x3F */
+ ABSOLUTE_LOAD_VALUE = 48, /* PID 0x43 */
+ FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49, /* PID 0x44 */
+ RELATIVE_THROTTLE_POSITION = 50, /* PID 0x45 */
+ ABSOLUTE_THROTTLE_POSITION_B = 51, /* PID 0x47 */
+ ABSOLUTE_THROTTLE_POSITION_C = 52, /* PID 0x48 */
+ ACCELERATOR_PEDAL_POSITION_D = 53, /* PID 0x49 */
+ ACCELERATOR_PEDAL_POSITION_E = 54, /* PID 0x4A */
+ ACCELERATOR_PEDAL_POSITION_F = 55, /* PID 0x4B */
+ COMMANDED_THROTTLE_ACTUATOR = 56, /* PID 0x4C */
+ ETHANOL_FUEL_PERCENTAGE = 57,/* PID 0x52 */
+ ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58, /* PID 0x53 */
+ SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59, /* PID 0x55 */
+ SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60, /* PID 0x57 */
+ SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,/* PID 0x55 */
+ SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62, /* PID 0x57 */
+ LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63, /* PID 0x56 */
+ LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64, /* PID 0x58 */
+ LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65, /* PID 0x56 */
+ LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66, /* PID 0x58 */
+ RELATIVE_ACCELERATOR_PEDAL_POSITION = 67, /* PID 0x5A */
+ HYBRID_BATTERY_PACK_REMAINING_LIFE = 68, /* PID 0x5B */
+ FUEL_INJECTION_TIMING = 69, /* PID 0x5D */
+ ENGINE_FUEL_RATE = 70, /* PID 0x5E */
+ LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
+};
+
+/**
+ * This enum lists the types of supported VMS messages. It is used as the first
+ * integer in the vehicle property integers array and determines how the rest of
+ * the message is decoded.
+ */
+enum VmsMessageType : int32_t {
+ /**
+ * A request from the subscribers to the VMS service to subscribe to a layer.
+ *
+ * This message type uses enum VmsMessageWithLayerIntegerValuesIndex.
+ */
+ SUBSCRIBE = 1,
+
+ /**
+ * A request from the subscribers to the VMS service to subscribe to a layer from a specific publisher.
+ *
+ * This message type uses enum VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.
+ */
+ SUBSCRIBE_TO_PUBLISHER = 2,
+
+ /**
+ * A request from the subscribers to the VMS service to unsubscribes from a layer.
+ *
+ * This message type uses enum VmsMessageWithLayerIntegerValuesIndex.
+ */
+ UNSUBSCRIBE = 3,
+
+ /**
+ * A request from the subscribers to the VMS service to unsubscribes from a layer from a specific publisher.
+ *
+ * This message type uses enum VmsMessageWithLayerAndPublisherIdIntegerValuesIndex.
+ */
+ UNSUBSCRIBE_TO_PUBLISHER = 4,
+
+ /**
+ * Information from the publishers to the VMS service about the layers which the client can publish.
+ *
+ * This message type uses enum VmsOfferingMessageIntegerValuesIndex.
+ */
+ OFFERING = 5,
+
+ /**
+ * A request from the subscribers to the VMS service to get the available layers.
+ *
+ * This message type uses enum VmsBaseMessageIntegerValuesIndex.
+ */
+ AVAILABILITY_REQUEST = 6,
+
+ /**
+ * A request from the publishers to the VMS service to get the layers with subscribers.
+ *
+ * This message type uses enum VmsBaseMessageIntegerValuesIndex.
+ */
+ SUBSCRIPTIONS_REQUEST = 7,
+
+ /**
+ * A response from the VMS service to the subscribers to a VmsMessageType.AVAILABILITY_REQUEST
+ *
+ * This message type uses enum VmsAvailabilityStateIntegerValuesIndex.
+ */
+ AVAILABILITY_RESPONSE = 8,
+
+ /**
+ * A notification from the VMS service to the subscribers on a change in the available layers.
+ *
+ * This message type uses enum VmsAvailabilityStateIntegerValuesIndex.
+ */
+ AVAILABILITY_CHANGE = 9,
+
+ /**
+ * A response from the VMS service to the publishers to a VmsMessageType.SUBSCRIPTIONS_REQUEST
+ *
+ * This message type uses enum VmsSubscriptionsStateIntegerValuesIndex.
+ */
+ SUBSCRIPTIONS_RESPONSE = 10,
+
+ /**
+ * A notification from the VMS service to the publishers on a change in the layers with subscribers.
+ *
+ * This message type uses enum VmsSubscriptionsStateIntegerValuesIndex.
+ */
+ SUBSCRIPTIONS_CHANGE = 11,
+
+ /**
+ * A message from the VMS service to the subscribers or from the publishers to the VMS service
+ * with a serialized VMS data packet as defined in the VMS protocol.
+ *
+ * This message type uses enum VmsBaseMessageIntegerValuesIndex.
+ */
+ DATA = 12,
+};
+
+/**
+ * Every VMS message starts with the type of the message from the VmsMessageType enum.
+ * Messages with no parameters such as VmsMessageType.AVAILABILITY_REQUEST,
+ * VmsMessageType.SUBSCRIPTIONS_REQUEST and VmsMessageType.DATA are also based on this enum.
+ */
+enum VmsBaseMessageIntegerValuesIndex : int32_t {
+ /* The message type as enumerated by VmsMessageType enum. */
+ MESSAGE_TYPE = 0,
+};
+
+/*
+ * A VMS message with a layer is sent as part of a VmsMessageType.SUBSCRIBE or
+ * VmsMessageType.UNSUBSCRIBE messages.
+ *
+ * The layer type is defined in the VMS protocol, and the subtype and version are
+ * controlled by the implementer of the publisher.
+ */
+enum VmsMessageWithLayerIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
+ LAYER_TYPE = 1,
+ LAYER_SUBTYPE = 2,
+ LAYER_VERSION = 3,
+};
+
+/*
+ * A VMS message with a layer and publisher ID is sent as part of a
+ * VmsMessageType.SUBSCRIBE_TO_PUBLISHER and VmsMessageType.UNSUBSCRIBE_TO_PUBLISHER messages.
+ */
+enum VmsMessageWithLayerAndPublisherIdIntegerValuesIndex : VmsMessageWithLayerIntegerValuesIndex {
+ PUBLISHER_ID = 4,
+};
+
+/*
+ * An offering can be sent by publishers as part of VmsMessageType.OFFERING in order to
+ * advertise which layers they can publish and under which constraints: e.g., I can publish Layer X
+ * if someone else will publish Layer Y.
+ * The offering contains the publisher ID which was assigned to the publisher by the VMS service.
+ * A single offering is represented as:
+ * - Layer type
+ * - Layer subtype
+ * - Layer version
+ * - Number of dependencies (N)
+ * - N x (Layer type, Layer subtype, Layer version)
+ */
+enum VmsOfferingMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
+ PUBLISHER_ID = 1,
+ NUMBER_OF_OFFERS = 2,
+ OFFERING_START = 3,
+};
+
+/**
+ * A subscriptions state is sent to the publishers in response to a change in the subscriptions
+ * as part of a VmsMessageType.SUBSCRIPTIONS_CHANGE, or in response to a
+ * VmsMessageType.SUBSCRIPTIONS_REQUEST message as part of VmsMessageType.SUBSCRIPTIONS_RESPONSE.
+ * The VMS service issues monotonically increasing sequence numbers, and in case a subscriber receives
+ * a smaller sequnce number it should ignore the message.
+ * The subscriptions are sent as a list of layers followed by a list of associated layers:
+ * {Sequence number, N, M, N x layer, M x associated layer}
+ * A subscribed layer is represented as three integers:
+ * - Layer type
+ * - Layer subtype
+ * - Layer version
+ * A subscribed associated layer is a layer with a list of publisher IDs. It is represented as:
+ * - Layer type
+ * - Layer subtype
+ * - Layer version
+ * - Number of publisher IDs (N)
+ * - N x publisher ID
+ */
+enum VmsSubscriptionsStateIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
+ SEQUENCE_NUMBER = 1,
+ NUMBER_OF_LAYERS = 2,
+ NUMBER_OF_ASSOCIATED_LAYERS = 3,
+ SUBSCRIPTIONS_START = 4,
+};
+
+/**
+ * An availability state is sent to the subscribers in response to a change in the available
+ * layers as part of a VmsMessageType.AVAILABILITY_CHANGE message, or in response to a
+ * VmsMessageType.AVAILABILITY_REQUEST message as part of a VmsMessageType.AVAILABILITY_RESPONSE.
+ * The VMS service issues monotonically increasing sequence numbers, and in case a subscriber receives
+ * a smaller sequnce number, it should ignore the message.
+ * An available associated layer is a layer with a list of publisher IDs:
+ * - Layer type
+ * - Layer subtype
+ * - Layer version
+ * - Number of publisher IDs (N)
+ * - N x publisher ID
+*/
+enum VmsAvailabilityStateIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
+ SEQUENCE_NUMBER = 1,
+ NUMBER_OF_ASSOCIATED_LAYERS = 2,
+ LAYERS_START = 3,
+};
+
diff --git a/automotive/vehicle/2.1/Android.bp b/automotive/vehicle/2.1/Android.bp
deleted file mode 100644
index 447c08e336..0000000000
--- a/automotive/vehicle/2.1/Android.bp
+++ /dev/null
@@ -1,68 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-
-filegroup {
- name: "android.hardware.automotive.vehicle@2.1_hal",
- srcs: [
- "types.hal",
- "IVehicle.hal",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.1_genc++",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-sources -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.1",
- srcs: [
- ":android.hardware.automotive.vehicle@2.1_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.1/types.cpp",
- "android/hardware/automotive/vehicle/2.1/VehicleAll.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.automotive.vehicle@2.1_genc++_headers",
- tools: ["hidl-gen"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lc++-headers -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.automotive.vehicle@2.1",
- srcs: [
- ":android.hardware.automotive.vehicle@2.1_hal",
- ],
- out: [
- "android/hardware/automotive/vehicle/2.1/types.h",
- "android/hardware/automotive/vehicle/2.1/hwtypes.h",
- "android/hardware/automotive/vehicle/2.1/IVehicle.h",
- "android/hardware/automotive/vehicle/2.1/IHwVehicle.h",
- "android/hardware/automotive/vehicle/2.1/BnHwVehicle.h",
- "android/hardware/automotive/vehicle/2.1/BpHwVehicle.h",
- "android/hardware/automotive/vehicle/2.1/BsVehicle.h",
- ],
-}
-
-cc_library {
- name: "android.hardware.automotive.vehicle@2.1",
- defaults: ["hidl-module-defaults"],
- generated_sources: ["android.hardware.automotive.vehicle@2.1_genc++"],
- generated_headers: ["android.hardware.automotive.vehicle@2.1_genc++_headers"],
- export_generated_headers: ["android.hardware.automotive.vehicle@2.1_genc++_headers"],
- vendor_available: true,
- vndk: {
- enabled: true,
- },
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- "android.hardware.automotive.vehicle@2.0",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- "android.hardware.automotive.vehicle@2.0",
- ],
-}
diff --git a/automotive/vehicle/2.1/Android.mk b/automotive/vehicle/2.1/Android.mk
deleted file mode 100644
index 8e1c0dd321..0000000000
--- a/automotive/vehicle/2.1/Android.mk
+++ /dev/null
@@ -1,648 +0,0 @@
-# This file is autogenerated by hidl-gen. Do not edit manually.
-
-LOCAL_PATH := $(call my-dir)
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.automotive.vehicle-V2.1-java
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_JAVA_LIBRARIES := \
- android.hardware.automotive.vehicle-V2.0-java \
- android.hidl.base-V1.0-java \
-
-
-#
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CommonIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.CommonIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (CompressionIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CompressionIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.CompressionIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelSystemStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelSystemStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.FuelSystemStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.FuelType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (IgnitionMonitorKind)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IgnitionMonitorKind.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.IgnitionMonitorKind
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2FloatSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2FloatSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.Obd2FloatSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2IntegerSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2IntegerSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.Obd2IntegerSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecondaryAirStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SecondaryAirStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.SecondaryAirStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SparkIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SparkIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleProperty)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VehicleProperty.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VehicleProperty
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsBaseMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsBaseMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsBaseMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsMessageType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsMessageType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsOfferingMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsOfferingMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsOfferingMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsSimpleMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsSimpleMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsSimpleMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsSubscriptionResponseFormat)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsSubscriptionResponseFormat.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsSubscriptionResponseFormat
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IVehicle.hal
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IVehicle.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVehicle.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::IVehicle
-
-$(GEN): $(LOCAL_PATH)/IVehicle.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_JAVA_LIBRARY)
-
-
-################################################################################
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.automotive.vehicle-V2.1-java-static
-LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-
-intermediates := $(call local-generated-sources-dir, COMMON)
-
-HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
-
-LOCAL_STATIC_JAVA_LIBRARIES := \
- android.hardware.automotive.vehicle-V2.0-java-static \
- android.hidl.base-V1.0-java-static \
-
-
-#
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CommonIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.CommonIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (CompressionIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/CompressionIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.CompressionIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelSystemStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelSystemStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.FuelSystemStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (FuelType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/FuelType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.FuelType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (IgnitionMonitorKind)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IgnitionMonitorKind.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.IgnitionMonitorKind
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2FloatSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2FloatSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.Obd2FloatSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (Obd2IntegerSensorIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/Obd2IntegerSensorIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.Obd2IntegerSensorIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SecondaryAirStatus)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SecondaryAirStatus.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.SecondaryAirStatus
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (SparkIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/SparkIgnitionMonitors.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VehicleProperty)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VehicleProperty.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VehicleProperty
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsBaseMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsBaseMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsBaseMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsMessageType)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsMessageType.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsMessageType
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsOfferingMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsOfferingMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsOfferingMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsSimpleMessageIntegerValuesIndex)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsSimpleMessageIntegerValuesIndex.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsSimpleMessageIntegerValuesIndex
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build types.hal (VmsSubscriptionResponseFormat)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/VmsSubscriptionResponseFormat.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::types.VmsSubscriptionResponseFormat
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
-# Build IVehicle.hal
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_1/IVehicle.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IVehicle.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.automotive.vehicle@2.1::IVehicle
-
-$(GEN): $(LOCAL_PATH)/IVehicle.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-include $(BUILD_STATIC_JAVA_LIBRARY)
-
-
-
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/automotive/vehicle/2.1/IVehicle.hal b/automotive/vehicle/2.1/IVehicle.hal
deleted file mode 100644
index a22d1e685c..0000000000
--- a/automotive/vehicle/2.1/IVehicle.hal
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.1
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.automotive.vehicle@2.1;
-
-import android.hardware.automotive.vehicle@2.0;
-
-/**
- * New revision of IVehicle interface that supports properties defined in
- * VehicleProperty enum version 2.1.
- *
- * NOTE: this HAL interface is under development and shouldn't be used in
- * production.
- *
- * TODO(pavelm): update comment when this interface is ready for prod.
- */
-interface IVehicle extends @2.0::IVehicle {
-};
diff --git a/automotive/vehicle/2.1/default/Android.mk b/automotive/vehicle/2.1/default/Android.mk
deleted file mode 100644
index f6efc0e3b8..0000000000
--- a/automotive/vehicle/2.1/default/Android.mk
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-vhal_v2_0 = android.hardware.automotive.vehicle@2.0
-vhal_v2_1 = android.hardware.automotive.vehicle@2.1
-
-###############################################################################
-# Vehicle reference implementation lib
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_1)-manager-lib
-LOCAL_SRC_FILES := \
- common/src/Obd2SensorStore.cpp
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_1 \
- $(LOCAL_PATH)/../../2.0/default/common/include/vhal_v2_0 \
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- $(vhal_v2_1) \
-
-include $(BUILD_STATIC_LIBRARY)
-
-###############################################################################
-# Vehicle default VehicleHAL implementation
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_1)-default-impl-lib
-LOCAL_SRC_FILES:= \
- impl/vhal_v2_1/EmulatedVehicleHal.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/impl/vhal_v2_1 \
- $(LOCAL_PATH)/common/include
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/impl \
- $(LOCAL_PATH)/common/include
-
-
-# LOCAL_WHOLE_STATIC_LIBRARIES := \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_0)-manager-lib \
- libqemu_pipe \
- $(vhal_v2_1)-manager-lib \
- $(vhal_v2_0)-libproto-native
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- libprotobuf-cpp-lite \
- $(vhal_v2_0) \
- $(vhal_v2_1) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_STATIC_LIBRARY)
-
-###############################################################################
-# Vehicle HAL service
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_1)-service
-LOCAL_INIT_RC := $(vhal_v2_1)-service.rc
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_SRC_FILES := \
- service.cpp
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-libproto-native \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_1)-default-impl-lib \
- libqemu_pipe \
- $(vhal_v2_1)-manager-lib \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- libprotobuf-cpp-lite \
- $(vhal_v2_0) \
- $(vhal_v2_1) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc b/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc
deleted file mode 100644
index 8929d25668..0000000000
--- a/automotive/vehicle/2.1/default/android.hardware.automotive.vehicle@2.1-service.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-service vehicle-hal-2.1 /vendor/bin/hw/android.hardware.automotive.vehicle@2.1-service
- class hal
- user vehicle_network
- group system inet
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
deleted file mode 100644
index 0f10086d70..0000000000
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef android_hardware_automotive_vehicle_V2_1_impl_DefaultConfig_H_
-#define android_hardware_automotive_vehicle_V2_1_impl_DefaultConfig_H_
-
-#include
-#include
-
-namespace android {
-namespace hardware {
-namespace automotive {
-namespace vehicle {
-namespace V2_1 {
-
-namespace impl {
-
-// Some handy constants to avoid conversions from enum to int.
-constexpr int OBD2_LIVE_FRAME = (int) V2_1::VehicleProperty::OBD2_LIVE_FRAME;
-constexpr int OBD2_FREEZE_FRAME = (int) V2_1::VehicleProperty::OBD2_FREEZE_FRAME;
-constexpr int OBD2_FREEZE_FRAME_INFO = (int) V2_1::VehicleProperty::OBD2_FREEZE_FRAME_INFO;
-constexpr int OBD2_FREEZE_FRAME_CLEAR = (int) V2_1::VehicleProperty::OBD2_FREEZE_FRAME_CLEAR;
-constexpr int VEHICLE_MAP_SERVICE = (int) V2_1::VehicleProperty::VEHICLE_MAP_SERVICE;
-constexpr int WHEEL_TICK = (int) V2_1::VehicleProperty::WHEEL_TICK;
-
-
-const V2_0::VehiclePropConfig kVehicleProperties[] = {
- {
- .prop = WHEEL_TICK,
- .access = V2_0::VehiclePropertyAccess::READ,
- .changeMode = V2_0::VehiclePropertyChangeMode::CONTINUOUS,
- .minSampleRate = 1.0f,
- .maxSampleRate = 100.0f,
- },
-
- {
- .prop = OBD2_LIVE_FRAME,
- .access = V2_0::VehiclePropertyAccess::READ,
- .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
- .configArray = {0,0}
- },
-
- {
- .prop = OBD2_FREEZE_FRAME,
- .access = V2_0::VehiclePropertyAccess::READ,
- .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
- .configArray = {0,0}
- },
-
- {
- .prop = OBD2_FREEZE_FRAME_INFO,
- .access = V2_0::VehiclePropertyAccess::READ,
- .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
- },
-
- {
- .prop = OBD2_FREEZE_FRAME_CLEAR,
- .access = V2_0::VehiclePropertyAccess::WRITE,
- .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
- },
-
- {
- .prop = VEHICLE_MAP_SERVICE,
- .access = V2_0::VehiclePropertyAccess::READ_WRITE,
- .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
- }
-};
-
-} // impl
-
-} // namespace V2_1
-} // namespace vehicle
-} // namespace automotive
-} // namespace hardware
-} // namespace android
-
-#endif // android_hardware_automotive_vehicle_V2_1_impl_DefaultConfig_H_
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.cpp b/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.cpp
deleted file mode 100644
index 46e062b86b..0000000000
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.cpp
+++ /dev/null
@@ -1,263 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "DefaultVehicleHal_v2_1"
-#include
-
-#include
-#include
-#include
-#include
-
-#include "EmulatedVehicleHal.h"
-
-#define DEBUG_SOCKET (33452)
-
-namespace android {
-namespace hardware {
-namespace automotive {
-namespace vehicle {
-namespace V2_1 {
-
-namespace impl {
-
-static std::unique_ptr fillDefaultObd2Frame(
- size_t numVendorIntegerSensors,
- size_t numVendorFloatSensors) {
- std::unique_ptr sensorStore(new Obd2SensorStore(
- numVendorIntegerSensors, numVendorFloatSensors));
-
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS,
- V2_0::toInt(FuelSystemStatus::CLOSED_LOOP));
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
- V2_0::toInt(IgnitionMonitorKind::SPARK));
- sensorStore->setIntegerSensor(Obd2IntegerSensorIndex::IGNITION_SPECIFIC_MONITORS,
- CommonIgnitionMonitors::COMPONENTS_AVAILABLE |
- CommonIgnitionMonitors::MISFIRE_AVAILABLE |
- SparkIgnitionMonitors::AC_REFRIGERANT_AVAILABLE |
- SparkIgnitionMonitors::EVAPORATIVE_SYSTEM_AVAILABLE);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::INTAKE_AIR_TEMPERATURE, 35);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::COMMANDED_SECONDARY_AIR_STATUS,
- V2_0::toInt(SecondaryAirStatus::FROM_OUTSIDE_OR_OFF));
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::NUM_OXYGEN_SENSORS_PRESENT, 1);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::RUNTIME_SINCE_ENGINE_START, 500);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON, 0);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::WARMUPS_SINCE_CODES_CLEARED, 51);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::DISTANCE_TRAVELED_SINCE_CODES_CLEARED, 365);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE, 30);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE, 12);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::AMBIENT_AIR_TEMPERATURE, 18);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::MAX_FUEL_AIR_EQUIVALENCE_RATIO, 1);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::FUEL_TYPE, V2_0::toInt(FuelType::GASOLINE));
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD, 0.153);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK1, -0.16);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK1, -0.16);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::SHORT_TERM_FUEL_TRIM_BANK2, -0.16);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::LONG_TERM_FUEL_TRIM_BANK2, -0.16);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::INTAKE_MANIFOLD_ABSOLUTE_PRESSURE, 7.5);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::ENGINE_RPM, 1250.);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::VEHICLE_SPEED, 40.);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::TIMING_ADVANCE, 2.5);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::THROTTLE_POSITION, 19.75);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::OXYGEN_SENSOR1_VOLTAGE, 0.265);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::FUEL_TANK_LEVEL_INPUT, 0.824);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::EVAPORATION_SYSTEM_VAPOR_PRESSURE, -0.373);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::CATALYST_TEMPERATURE_BANK1_SENSOR1, 190.);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::RELATIVE_THROTTLE_POSITION, 3.);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::ABSOLUTE_THROTTLE_POSITION_B, 0.306);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_D, 0.188);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::ACCELERATOR_PEDAL_POSITION_E, 0.094);
- sensorStore->setFloatSensor(
- Obd2FloatSensorIndex::COMMANDED_THROTTLE_ACTUATOR, 0.024);
-
- return sensorStore;
-}
-
-void EmulatedVehicleHal::initObd2LiveFrame(const V2_0::VehiclePropConfig& propConfig) {
- auto liveObd2Frame = createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX, 0);
- auto sensorStore = fillDefaultObd2Frame(static_cast(propConfig.configArray[0]),
- static_cast(propConfig.configArray[1]));
- sensorStore->fillPropValue("", liveObd2Frame.get());
- liveObd2Frame->prop = OBD2_LIVE_FRAME;
-
- mPropStore->writeValue(*liveObd2Frame);
-}
-
-void EmulatedVehicleHal::initObd2FreezeFrame(const V2_0::VehiclePropConfig& propConfig) {
- auto sensorStore = fillDefaultObd2Frame(static_cast(propConfig.configArray[0]),
- static_cast(propConfig.configArray[1]));
-
- static std::vector sampleDtcs = { "P0070", "P0102" "P0123" };
- for (auto&& dtc : sampleDtcs) {
- auto freezeFrame = createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX, 0);
- sensorStore->fillPropValue(dtc, freezeFrame.get());
- freezeFrame->prop = OBD2_FREEZE_FRAME;
-
- mPropStore->writeValue(*freezeFrame);
- }
-}
-
-V2_0::StatusCode EmulatedVehicleHal::fillObd2FreezeFrame(
- const V2_0::VehiclePropValue& requestedPropValue,
- V2_0::VehiclePropValue* outValue) {
- if (requestedPropValue.value.int64Values.size() != 1) {
- ALOGE("asked for OBD2_FREEZE_FRAME without valid timestamp");
- return V2_0::StatusCode::INVALID_ARG;
- }
- auto timestamp = requestedPropValue.value.int64Values[0];
- auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
- if(freezeFrame == nullptr) {
- ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
- return V2_0::StatusCode::INVALID_ARG;
- }
- outValue->prop = OBD2_FREEZE_FRAME;
- outValue->value.int32Values = freezeFrame->value.int32Values;
- outValue->value.floatValues = freezeFrame->value.floatValues;
- outValue->value.bytes = freezeFrame->value.bytes;
- outValue->value.stringValue = freezeFrame->value.stringValue;
- outValue->timestamp = freezeFrame->timestamp;
- return V2_0::StatusCode::OK;
-}
-
-V2_0::StatusCode EmulatedVehicleHal::clearObd2FreezeFrames(const V2_0::VehiclePropValue& propValue) {
- if (propValue.value.int64Values.size() == 0) {
- mPropStore->removeValuesForProperty(OBD2_FREEZE_FRAME);
- return V2_0::StatusCode::OK;
- } else {
- for(int64_t timestamp: propValue.value.int64Values) {
- auto freezeFrame = mPropStore->readValueOrNull(OBD2_FREEZE_FRAME, 0, timestamp);
- if(freezeFrame == nullptr) {
- ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
- return V2_0::StatusCode::INVALID_ARG;
- }
- mPropStore->removeValue(*freezeFrame);
- }
- }
- return V2_0::StatusCode::OK;
-}
-
-V2_0::StatusCode EmulatedVehicleHal::fillObd2DtcInfo(V2_0::VehiclePropValue* outValue) {
- std::vector timestamps;
- for(const auto& freezeFrame: mPropStore->readValuesForProperty(OBD2_FREEZE_FRAME)) {
- timestamps.push_back(freezeFrame.timestamp);
- }
- outValue->value.int64Values = timestamps;
- return V2_0::StatusCode::OK;
-}
-
-void EmulatedVehicleHal::onCreate() {
- V2_0::impl::EmulatedVehicleHal::onCreate();
-
- initObd2LiveFrame(*mPropStore->getConfigOrDie(OBD2_LIVE_FRAME));
- initObd2FreezeFrame(*mPropStore->getConfigOrDie(OBD2_FREEZE_FRAME));
-}
-
-void EmulatedVehicleHal::initStaticConfig() {
- for (auto&& cfg = std::begin(kVehicleProperties); cfg != std::end(kVehicleProperties); ++cfg) {
- V2_0::VehiclePropertyStore::TokenFunction tokenFunction = nullptr;
-
- switch (cfg->prop) {
- case OBD2_FREEZE_FRAME: {
- tokenFunction = [] (const V2_0::VehiclePropValue& propValue) {
- return propValue.timestamp;
- };
- break;
- }
- default:
- break;
- }
-
- mPropStore->registerProperty(*cfg, tokenFunction);
- }
-}
-
-EmulatedVehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get(
- const V2_0::VehiclePropValue& requestedPropValue,
- V2_0::StatusCode* outStatus) {
-
- auto propId = requestedPropValue.prop;
- VehiclePropValuePtr v = nullptr;
- auto& pool = *getValuePool();
-
- switch (propId) {
- case OBD2_FREEZE_FRAME:
- v = pool.obtainComplex();
- *outStatus = fillObd2FreezeFrame(requestedPropValue, v.get());
- return v;
- case OBD2_FREEZE_FRAME_INFO:
- v = pool.obtainComplex();
- *outStatus = fillObd2DtcInfo(v.get());
- return v;
- default:
- return V2_0::impl::EmulatedVehicleHal::get(requestedPropValue, outStatus);
- }
-}
-
-V2_0::StatusCode EmulatedVehicleHal::set(const V2_0::VehiclePropValue& propValue) {
- auto propId = propValue.prop;
- switch (propId) {
- case OBD2_FREEZE_FRAME_CLEAR:
- return clearObd2FreezeFrames(propValue);
- case VEHICLE_MAP_SERVICE:
- // Placeholder for future implementation of VMS property in the default hal. For now, just
- // returns OK; otherwise, hal clients crash with property not supported.
- return V2_0::StatusCode::OK;
- default:
- return V2_0::impl::EmulatedVehicleHal::set(propValue);
- }
-}
-
-} // impl
-
-} // namespace V2_1
-} // namespace vehicle
-} // namespace automotive
-} // namespace hardware
-} // namespace android
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.h
deleted file mode 100644
index 7cc3b79679..0000000000
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/EmulatedVehicleHal.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef android_hardware_automotive_vehicle_V2_1_impl_EmulatedVehicleHal_H_
-#define android_hardware_automotive_vehicle_V2_1_impl_EmulatedVehicleHal_H_
-
-#include
-
-#include
-
-#include
-#include
-#include
-#include
-
-#include "DefaultConfig.h"
-
-namespace android {
-namespace hardware {
-namespace automotive {
-namespace vehicle {
-namespace V2_1 {
-
-namespace impl {
-
-using namespace std::placeholders;
-
-class EmulatedVehicleHal : public V2_0::impl::EmulatedVehicleHal {
-public:
- EmulatedVehicleHal(V2_0::VehiclePropertyStore* propStore)
- : V2_0::impl::EmulatedVehicleHal(propStore), mPropStore(propStore) {
- initStaticConfig();
- }
-
- VehiclePropValuePtr get(const V2_0::VehiclePropValue& requestedPropValue,
- V2_0::StatusCode* outStatus) override;
-
- V2_0::StatusCode set(const V2_0::VehiclePropValue& propValue) override;
-
- void onCreate() override;
-
-private:
- void initStaticConfig();
- void initObd2LiveFrame(const V2_0::VehiclePropConfig& propConfig);
- void initObd2FreezeFrame(const V2_0::VehiclePropConfig& propConfig);
- V2_0::StatusCode fillObd2FreezeFrame(const V2_0::VehiclePropValue& requestedPropValue,
- V2_0::VehiclePropValue* outValue);
- V2_0::StatusCode fillObd2DtcInfo(V2_0::VehiclePropValue *outValue);
- V2_0::StatusCode clearObd2FreezeFrames(const V2_0::VehiclePropValue& propValue);
-
-private:
- V2_0::VehiclePropertyStore* mPropStore;
-};
-
-} // impl
-
-} // namespace V2_1
-} // namespace vehicle
-} // namespace automotive
-} // namespace hardware
-} // namespace android
-
-
-#endif // android_hardware_automotive_vehicle_V2_0_impl_EmulatedVehicleHal_H_
diff --git a/automotive/vehicle/2.1/default/service.cpp b/automotive/vehicle/2.1/default/service.cpp
deleted file mode 100644
index bae64fde9f..0000000000
--- a/automotive/vehicle/2.1/default/service.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "automotive.vehicle@2.1-service"
-#include
-#include
-
-#include
-
-#include
-
-#include
-#include
-#include
-
-#include
-
-using namespace android;
-using namespace android::hardware;
-
-namespace V2_1 = ::android::hardware::automotive::vehicle::V2_1;
-namespace V2_0 = ::android::hardware::automotive::vehicle::V2_0;
-
-using StatusCode = V2_0::StatusCode;
-using VehiclePropValue = V2_0::VehiclePropValue;
-
-/* Just wrapper that passes all calls to the provided V2_0::IVehicle object */
-struct Vehicle_V2_1 : public V2_1::IVehicle {
-
- Vehicle_V2_1(V2_0::IVehicle* vehicle20) : mVehicle20(vehicle20) {}
-
- // Methods derived from IVehicle
- Return getAllPropConfigs(getAllPropConfigs_cb _hidl_cb) override {
- return mVehicle20->getAllPropConfigs(_hidl_cb);
- }
-
- Return getPropConfigs(const hidl_vec& properties,
- getPropConfigs_cb _hidl_cb) override {
- return mVehicle20->getPropConfigs(properties, _hidl_cb);
- }
-
- Return get(const V2_0::VehiclePropValue& requestedPropValue,
- get_cb _hidl_cb) override {
- return mVehicle20->get(requestedPropValue, _hidl_cb);
- }
-
- Return set(const VehiclePropValue& value) override {
- return mVehicle20->set(value);
- }
-
- Return subscribe(const sp& callback,
- const hidl_vec&
- options) override {
- return mVehicle20->subscribe(callback, options);
- }
-
- Return unsubscribe(const sp& callback,
- int32_t propId) override {
- return mVehicle20->unsubscribe(callback, propId);
- }
-
- Return debugDump(debugDump_cb _hidl_cb = nullptr) override {
- return mVehicle20->debugDump(_hidl_cb);
- }
-
-private:
- V2_0::IVehicle* mVehicle20;
-};
-
-int main(int /* argc */, char* /* argv */ []) {
- auto store = std::make_unique();
- auto hal = std::make_unique(store.get());
- auto emulator = std::make_unique(hal.get());
- auto vehicleManager = std::make_unique(hal.get());
-
- Vehicle_V2_1 vehicle21(vehicleManager.get());
-
- configureRpcThreadpool(1, true /* callerWillJoin */);
-
- ALOGI("Registering as service...");
- status_t status = vehicle21.registerAsService();
-
- if (status != OK) {
- ALOGE("Unable to register vehicle service (%d).", status);
- return 1;
- }
-
- ALOGI("Ready");
- joinRpcThreadpool();
- return 1;
-}
diff --git a/automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp b/automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
deleted file mode 100644
index a01c0f498c..0000000000
--- a/automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- #include
-
-#include "vhal_v2_0/Obd2SensorStore.h"
-#include "vhal_v2_0/VehicleUtils.h"
-
-namespace android {
-namespace hardware {
-namespace automotive {
-namespace vehicle {
-namespace V2_0 {
-
-namespace {
-
-static constexpr size_t getNumVendorIntegerSensors() {
- return 5;
-}
-static constexpr size_t getNumVendorFloatSensors() {
- return 3;
-}
-
-// this struct holds information necessary for a test to be able to validate
-// that the sensor bitmask contains the right data:
-// - the index of the byte at which the bit for a given sensor lives
-// - the expected value of that byte given that a certain sensor is present
-class BitmaskIndexingInfo {
-public:
- size_t mByteIndex;
- uint8_t mExpectedByteValue;
-
- // Returns the information required to validate the bitmask for an
- // integer-valued sensor.
- static BitmaskIndexingInfo getForIntegerSensor(size_t index) {
- const size_t indexInBitstream = index;
- return getForBitstreamIndex(indexInBitstream);
- }
-
- // Returns the information required to validate the bitmask for a
- // float-valued sensor.
- static BitmaskIndexingInfo getForFloatSensor(size_t index) {
- const size_t indexInBitstream = toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX) +
- 1 + getNumVendorIntegerSensors() + index;
- return getForBitstreamIndex(indexInBitstream);
- }
-
-private:
- static BitmaskIndexingInfo getForBitstreamIndex(size_t indexInBitstream) {
- BitmaskIndexingInfo indexingInfo;
- indexingInfo.mByteIndex = indexInBitstream / 8;
- indexingInfo.mExpectedByteValue = 1 << (indexInBitstream % 8);
- return indexingInfo;
- }
-};
-
-static Obd2SensorStore getSensorStore() {
- return Obd2SensorStore(getNumVendorIntegerSensors(),
- getNumVendorFloatSensors());
-}
-
-// Test that one can set and retrieve a value for the first integer sensor.
-TEST(Obd2SensorStoreTest, setFirstIntegerSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setIntegerSensor(
- Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS,
- toInt(FuelSystemStatus::CLOSED_LOOP));
- const auto& integerSensors(sensorStore.getIntegerSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(
- toInt(FuelSystemStatus::CLOSED_LOOP),
- integerSensors[toInt(Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- toInt(Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for the first float sensor.
-TEST(Obd2SensorStoreTest, setFirstFloatSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setFloatSensor(
- Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD,
- 1.25f);
- const auto& floatSensors(sensorStore.getFloatSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(
- 1.25f,
- floatSensors[toInt(Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- toInt(Obd2FloatSensorIndex::CALCULATED_ENGINE_LOAD)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for an integer sensor.
-TEST(Obd2SensorStoreTest, setAnyIntegerSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setIntegerSensor(
- Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE,
- 4000);
- const auto& integerSensors(sensorStore.getIntegerSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(4000,
- integerSensors[toInt(Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- toInt(Obd2IntegerSensorIndex::ABSOLUTE_BAROMETRIC_PRESSURE)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for a float sensor.
-TEST(Obd2SensorStoreTest, setAnyFloatSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setFloatSensor(
- Obd2FloatSensorIndex::OXYGEN_SENSOR3_VOLTAGE,
- 2.5f);
- const auto& floatSensors(sensorStore.getFloatSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(2.5f,
- floatSensors[toInt(Obd2FloatSensorIndex::OXYGEN_SENSOR3_VOLTAGE)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- toInt(Obd2FloatSensorIndex::OXYGEN_SENSOR3_VOLTAGE)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for the last system integer sensor.
-TEST(Obd2SensorStoreTest, setLastSystemIntegerSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setIntegerSensor(
- Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX,
- 30);
- const auto& integerSensors(sensorStore.getIntegerSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(30,
- integerSensors[toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for the last system float sensor.
-TEST(Obd2SensorStoreTest, setLastSystemFloatSensor) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setFloatSensor(
- Obd2FloatSensorIndex::LAST_SYSTEM_INDEX,
- 2.5f);
- const auto& floatSensors(sensorStore.getFloatSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(2.5f,
- floatSensors[toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for two integer sensors at once.
-TEST(Obd2SensorStoreTest, setTwoIntegerSensors) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setIntegerSensor(
- Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE,
- 6);
- sensorStore.setIntegerSensor(
- Obd2IntegerSensorIndex::TIME_SINCE_TROUBLE_CODES_CLEARED,
- 1245);
- const auto& integerSensors(sensorStore.getIntegerSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(6,
- integerSensors[toInt(Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE)]);
- ASSERT_EQ(1245,
- integerSensors[toInt(Obd2IntegerSensorIndex::TIME_SINCE_TROUBLE_CODES_CLEARED)]);
- const BitmaskIndexingInfo voltageIndexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- toInt(Obd2IntegerSensorIndex::CONTROL_MODULE_VOLTAGE)));
- const BitmaskIndexingInfo timeIndexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- toInt(Obd2IntegerSensorIndex::TIME_SINCE_TROUBLE_CODES_CLEARED)));
- if (voltageIndexingInfo.mByteIndex == timeIndexingInfo.mByteIndex) {
- ASSERT_EQ(
- voltageIndexingInfo.mExpectedByteValue |
- timeIndexingInfo.mExpectedByteValue,
- sensorBitmask[timeIndexingInfo.mByteIndex]);
- }
- else {
- ASSERT_EQ(
- timeIndexingInfo.mExpectedByteValue,
- sensorBitmask[timeIndexingInfo.mByteIndex]);
- ASSERT_EQ(
- voltageIndexingInfo.mExpectedByteValue,
- sensorBitmask[voltageIndexingInfo.mByteIndex]);
- }
-}
-
-// Test that one can set and retrieve a value for two float sensors at once.
-TEST(Obd2SensorStoreTest, setTwoFloatSensors) {
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setFloatSensor(
- Obd2FloatSensorIndex::VEHICLE_SPEED,
- 1.25f);
- sensorStore.setFloatSensor(
- Obd2FloatSensorIndex::MAF_AIR_FLOW_RATE,
- 2.5f);
- const auto& floatSensors(sensorStore.getFloatSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(1.25f,
- floatSensors[toInt(Obd2FloatSensorIndex::VEHICLE_SPEED)]);
- ASSERT_EQ(2.5f,
- floatSensors[toInt(Obd2FloatSensorIndex::MAF_AIR_FLOW_RATE)]);
- const BitmaskIndexingInfo speedIndexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- toInt(Obd2FloatSensorIndex::VEHICLE_SPEED)));
- const BitmaskIndexingInfo airflowIndexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- toInt(Obd2FloatSensorIndex::MAF_AIR_FLOW_RATE)));
- if (speedIndexingInfo.mByteIndex == airflowIndexingInfo.mByteIndex) {
- ASSERT_EQ(
- speedIndexingInfo.mExpectedByteValue |
- airflowIndexingInfo.mExpectedByteValue,
- sensorBitmask[airflowIndexingInfo.mByteIndex]);
- }
- else {
- ASSERT_EQ(
- speedIndexingInfo.mExpectedByteValue,
- sensorBitmask[speedIndexingInfo.mByteIndex]);
- ASSERT_EQ(
- airflowIndexingInfo.mExpectedByteValue,
- sensorBitmask[airflowIndexingInfo.mByteIndex]);
- }
-}
-
-// Test that one can set and retrieve a value for a vendor integer sensor.
-TEST(Obd2SensorStoreTest, setVendorIntegerSensor) {
- const size_t sensorIndex = toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX) + 2;
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setIntegerSensor(sensorIndex, 22);
- const auto& integerSensors(sensorStore.getIntegerSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(22, integerSensors[sensorIndex]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForIntegerSensor(
- sensorIndex));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-// Test that one can set and retrieve a value for a vendor float sensor.
-TEST(Obd2SensorStoreTest, setVendorFloatSensor) {
- const size_t sensorIndex = toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX) + 2;
- Obd2SensorStore sensorStore(getSensorStore());
- sensorStore.setFloatSensor(sensorIndex, 1.25f);
- const auto& floatSensors(sensorStore.getFloatSensors());
- const auto& sensorBitmask(sensorStore.getSensorsBitmask());
- ASSERT_EQ(1.25f, floatSensors[sensorIndex]);
- const BitmaskIndexingInfo indexingInfo(BitmaskIndexingInfo::getForFloatSensor(
- sensorIndex));
- ASSERT_EQ(
- indexingInfo.mExpectedByteValue,
- sensorBitmask[indexingInfo.mByteIndex]);
-}
-
-} // namespace anonymous
-
-} // namespace V2_0
-} // namespace vehicle
-} // namespace automotive
-} // namespace hardware
-} // namespace android
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
deleted file mode 100644
index 7be611c55b..0000000000
--- a/automotive/vehicle/2.1/types.hal
+++ /dev/null
@@ -1,653 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.1
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.hardware.automotive.vehicle@2.1;
-
-import android.hardware.automotive.vehicle@2.0;
-
-/**
- * Extension of VehicleProperty enum declared in Vehicle HAL 2.0
- */
-enum VehicleProperty: @2.0::VehicleProperty {
- /**
- * Reports wheel rotational distance in meters since last wheel tick
- * event
- *
- * The value is a vector each element represents distance for individual
- * wheel in the following order: left front, right front, left rear,
- * right rear. VehiclePropValue.timestamp must be correctly filled in.
- *
- * Vendors must specify wheels that support this sensor in
- * VehiclePropConfig.configFlags. The format of this field is a bitset of
- * values from Wheel enum.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE |VehiclePropertyChangeMode:CONTINUOUS
- * @access VehiclePropertyAccess:READ
- * @unit VehicleUnit:METER
- */
- WHEEL_TICK = (
- 0x0306
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:FLOAT_VEC
- | VehicleArea:GLOBAL),
-
- /**
- * OBD2 Live Sensor Data
- *
- * This property uses COMPLEX data to send a snapshot of the current (live)
- * values of the OBD2 sensors provided by the vehicle.
- *
- * VehiclePropConfig
- * configArray[0] : number of vendor-specific integer-valued sensors
- * that can be returned in a frame.
- * configArray[1] : number of vendor-specific float-valued sensors
- * that can be returned in a frame.
- *
- * The values are to be interpreted as follows:
- * the indices defined in Obd2IntegerSensorIndex are to be used to
- * read from int32Values;
- * the indices defined in Obd2FloatSensorIndex are to be used to
- * read from floatValues.
- * the elements of bytes are to be interpreted as a bitmask, such that
- * the bits 0 thru the integer value of
- * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
- * are 1 if the corresponding index is a valid sensor index whose value can
- * be read in the returned int32Values vector, 0 otherwise.
- * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
- * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
- * are 1 if the corresponding index is a valid sensor index whose value
- * can be read in the returned floatValues vector, 0 otherwise.
- *
- * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
- * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
- * is only valid if the corresponding bits in the bytes vector are set to 1.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:READ
- */
- OBD2_LIVE_FRAME = (
- 0x0D00
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:COMPLEX
- | VehicleArea:GLOBAL),
-
- /**
- * OBD2 Freeze Frame Sensor Data
- *
- * This property uses COMPLEX data to send a snapshot of the values of the
- * OBD2 sensors provided by the vehicle at the time that a diagnostic
- * troubleshooting code (DTC) was recorded by the vehicle.
- *
- * VehiclePropConfig
- * configArray[0] : number of vendor-specific integer-valued sensors
- * that can be returned in a frame.
- * configArray[1] : number of vendor-specific float-valued sensors
- * that can be returned in a frame.
- *
- * A get of this property must take the following form:
- * int64Values[0]: timestamp of the freeze frame to retrieve.
- * Valid timestamps are given by OBD2_DTC_INFO.
- *
- * The values are to be interpreted as follows:
- * the indices defined in Obd2IntegerSensorIndex are to be used to
- * read from int32Values;
- * the indices defined in Obd2FloatSensorIndex are to be used to
- * read from floatValues;
- * the elements of bytes are to be interpreted as a bitmask, such that
- * the bits 0 thru the integer value of
- * Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[0]
- * are 1 if the corresponding index is a valid sensor index whose value can
- * be read in the returned int32Values vector, 0 otherwise.
- * the bits Obd2IntegerSensorIndex.LAST_SYSTEM_INDEX+1 thru
- * Obd2FloatingSensorIndex.LAST_SYSTEM_INDEX + the value of configArray[1]
- * are 1 if the corresponding index is a valid sensor index whose value
- * can be read in the returned floatValues vector, 0 otherwise.
- * stringValue is the DTC that caused this freeze frame to be recorded.
- *
- * For example, int32Values[0] corresponds to FUEL_SYSTEM_STATUS, and
- * floatValues[0] corresponds to CALCULATED_ENGINE_LOAD, but that mapping
- * is only valid if the corresponding bits in the bytes vector are set to 1,
- * and a possible valid stringValue is "P0176" to indicate a malfunction
- * of the fuel composition sensor circuit.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:READ
- */
- OBD2_FREEZE_FRAME = (
- 0x0D01
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:COMPLEX
- | VehicleArea:GLOBAL),
-
- /**
- * OBD2 Freeze Frame Information
- *
- * This property describes the current freeze frames stored in vehicle
- * memory and available for retrieval via OBD2_FREEZE_FRAME.
- *
- * The values are to be interpreted as follows:
- * each element of int64Values is the timestamp at which a a fault code
- * has been detected and the corresponding freeze frame stored, and each
- * such element can be used as the key to OBD2_FREEZE_FRAME to retrieve
- * the corresponding freeze frame.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:READ
- */
- OBD2_FREEZE_FRAME_INFO = (
- 0x0D02
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:COMPLEX
- | VehicleArea:GLOBAL),
-
- /**
- * OBD2 Freeze Frame Clear
- *
- * This property allows deletion of any of the freeze frames stored in
- * vehicle memory, as described by OBD2_DTC_INFO.
- *
- * A set of this property is to be interpreted as follows:
- * if int64Values contains no elements, then all DTCs stored will be cleared;
- * if int64Values contains one or more elements, then DTCs at the timestamps
- * stored in int64Values will be cleared, and the others not cleared, except
- * the memory will be compacted so that all remaining DTCs are stored
- * contiguously.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:WRITE
- */
- OBD2_FREEZE_FRAME_CLEAR = (
- 0x0D03
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:COMPLEX
- | VehicleArea:GLOBAL),
-
- /**
- * Vehicle Maps Service (VMS) message
- *
- * This property uses COMPLEX data to communicate vms messages.
- *
- * Its contents are to be interpreted as follows:
- * the indices defined in VmsMessageIntegerValuesIndex are to be used to
- * read from int32Values;
- * bytes is a serialized VMS message as defined in the vms protocol
- * which is opaque to the framework;
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE
- * @access VehiclePropertyAccess:READ_WRITE
- */
- VEHICLE_MAP_SERVICE = (
- 0x0C00
- | VehiclePropertyGroup:SYSTEM
- | VehiclePropertyType:COMPLEX
- | VehicleArea:GLOBAL),
-};
-
-/** The status of a fuel system as described by the OBD2 specification. */
-enum FuelSystemStatus : int32_t {
- OPEN_INSUFFICIENT_ENGINE_TEMPERATURE = 1,
-
- CLOSED_LOOP = 2,
-
- OPEN_ENGINE_LOAD_OR_DECELERATION = 4,
-
- OPEN_SYSTEM_FAILURE = 8,
-
- CLOSED_LOOP_BUT_FEEDBACK_FAULT = 16,
-};
-
-/** Defines which ignition monitors are available to be read. */
-enum IgnitionMonitorKind : int32_t {
- SPARK = 0,
-
- COMPRESSION = 1,
-};
-
-/** These ignition monitors are common to both SPARK and COMPRESSION. */
-enum CommonIgnitionMonitors : int32_t {
- COMPONENTS_AVAILABLE = 0x1 << 0,
- COMPONENTS_INCOMPLETE = 0x1 << 1,
-
- FUEL_SYSTEM_AVAILABLE = 0x1 << 2,
- FUEL_SYSTEM_INCOMPLETE = 0x1 << 3,
-
- MISFIRE_AVAILABLE = 0x1 << 4,
- MISFIRE_INCOMPLETE = 0x1 << 5,
-};
-
-/** Ignition monitors available for SPARK vehicles. */
-enum SparkIgnitionMonitors : CommonIgnitionMonitors {
- EGR_AVAILABLE = 0x1 << 6,
- EGR_INCOMPLETE = 0x1 << 7,
-
- OXYGEN_SENSOR_HEATER_AVAILABLE = 0x1 << 8,
- OXYGEN_SENSOR_HEATER_INCOMPLETE = 0x1 << 9,
-
- OXYGEN_SENSOR_AVAILABLE = 0x1 << 10,
- OXYGEN_SENSOR_INCOMPLETE = 0x1 << 11,
-
- AC_REFRIGERANT_AVAILABLE = 0x1 << 12,
- AC_REFRIGERANT_INCOMPLETE = 0x1 << 13,
-
- SECONDARY_AIR_SYSTEM_AVAILABLE = 0x1 << 14,
- SECONDARY_AIR_SYSTEM_INCOMPLETE = 0x1 << 15,
-
- EVAPORATIVE_SYSTEM_AVAILABLE = 0x1 << 16,
- EVAPORATIVE_SYSTEM_INCOMPLETE = 0x1 << 17,
-
- HEATED_CATALYST_AVAILABLE = 0x1 << 18,
- HEATED_CATALYST_INCOMPLETE = 0x1 << 19,
-
- CATALYST_AVAILABLE = 0x1 << 20,
- CATALYST_INCOMPLETE = 0x1 << 21,
-};
-
-/** Ignition monitors only available for COMPRESSION vehicles. */
-enum CompressionIgnitionMonitors : CommonIgnitionMonitors {
- EGR_OR_VVT_AVAILABLE = 0x1 << 6,
- EGR_OR_VVT_INCOMPLETE = 0x1 << 7,
-
- PM_FILTER_AVAILABLE = 0x1 << 8,
- PM_FILTER_INCOMPLETE = 0x1 << 9,
-
- EXHAUST_GAS_SENSOR_AVAILABLE = 0x1 << 10,
- EXHAUST_GAS_SENSOR_INCOMPLETE = 0x1 << 11,
-
- BOOST_PRESSURE_AVAILABLE = 0x1 << 12,
- BOOST_PRESSURE_INCOMPLETE = 0x1 << 13,
-
- NOx_SCR__AVAILABLE = 0x1 << 14,
- NOx_SCR_INCOMPLETE = 0x1 << 15,
-
- NMHC_CATALYST_AVAILABLE = 0x1 << 16,
- NMHC_CATALYST_INCOMPLETE = 0x1 << 17,
-};
-
-enum SecondaryAirStatus : int32_t {
- UPSTREAM = 1,
-
- DOWNSTREAM_OF_CATALYCIC_CONVERTER = 2,
-
- FROM_OUTSIDE_OR_OFF = 4,
-
- PUMP_ON_FOR_DIAGNOSTICS = 8,
-};
-
-enum FuelType : int32_t {
- NOT_AVAILABLE = 0,
-
- GASOLINE = 1,
-
- METHANOL = 2,
-
- ETHANOL = 3,
-
- DIESEL = 4,
-
- LPG = 5,
-
- CNG = 6,
-
- PROPANE = 7,
-
- ELECTRIC = 8,
-
- BIFUEL_RUNNING_GASOLINE = 9,
-
- BIFUEL_RUNNING_METHANOL = 10,
-
- BIFUEL_RUNNING_ETHANOL = 11,
-
- BIFUEL_RUNNING_LPG = 12,
-
- BIFUEL_RUNNING_CNG = 13,
-
- BIFUEL_RUNNING_PROPANE = 14,
-
- BIFUEL_RUNNING_ELECTRIC = 15,
-
- BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION = 16,
-
- HYBRID_GASOLINE = 17,
-
- HYBRID_ETHANOL = 18,
-
- HYBRID_DIESEL = 19,
-
- HYBRID_ELECTRIC = 20,
-
- HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION = 21,
-
- HYBRID_REGENERATIVE = 22,
-
- BIFUEL_RUNNING_DIESEL = 23,
-};
-
-/**
- * This enum provides the canonical mapping for sensor properties that have an integer value.
- * The ordering of the values is taken from the OBD2 specification.
- * Some of the properties are represented as an integer mapping to another enum. In those cases
- * expect a comment by the property definition describing the enum to look at for the mapping.
- * Any value greater than the last reserved index is available to vendors to map their extensions.
- */
-enum Obd2IntegerSensorIndex : int32_t {
- /** refer to FuelSystemStatus for a description of this value. */
- FUEL_SYSTEM_STATUS = 0,
-
- MALFUNCTION_INDICATOR_LIGHT_ON = 1,
-
- /** refer to IgnitionMonitorKind for a description of this value. */
- IGNITION_MONITORS_SUPPORTED = 2,
-
- /**
- * The value of this sensor is a bitmask that specifies whether ignition-specific
- * tests are available and whether they are complete. The semantics of the individual
- * bits in this value are given by, respectively, SparkIgnitionMonitors and
- * CompressionIgnitionMonitors depending on the value of IGNITION_MONITORS_SUPPORTED.
- */
- IGNITION_SPECIFIC_MONITORS = 3,
-
- INTAKE_AIR_TEMPERATURE = 4,
-
- /** refer to SecondaryAirStatus for a description of this value. */
- COMMANDED_SECONDARY_AIR_STATUS = 5,
-
- NUM_OXYGEN_SENSORS_PRESENT = 6,
-
- RUNTIME_SINCE_ENGINE_START = 7,
-
- DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON = 8,
-
- WARMUPS_SINCE_CODES_CLEARED = 9,
-
- DISTANCE_TRAVELED_SINCE_CODES_CLEARED = 10,
-
- ABSOLUTE_BAROMETRIC_PRESSURE = 11,
-
- CONTROL_MODULE_VOLTAGE = 12,
-
- AMBIENT_AIR_TEMPERATURE = 13,
-
- TIME_WITH_MALFUNCTION_LIGHT_ON = 14,
-
- TIME_SINCE_TROUBLE_CODES_CLEARED = 15,
-
- MAX_FUEL_AIR_EQUIVALENCE_RATIO = 16,
-
- MAX_OXYGEN_SENSOR_VOLTAGE = 17,
-
- MAX_OXYGEN_SENSOR_CURRENT = 18,
-
- MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 19,
-
- MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR = 20,
-
- /** refer to FuelType for a description of this value. */
- FUEL_TYPE = 21,
-
- FUEL_RAIL_ABSOLUTE_PRESSURE = 22,
-
- ENGINE_OIL_TEMPERATURE = 23,
-
- DRIVER_DEMAND_PERCENT_TORQUE = 24,
-
- ENGINE_ACTUAL_PERCENT_TORQUE = 25,
-
- ENGINE_REFERENCE_PERCENT_TORQUE = 26,
-
- ENGINE_PERCENT_TORQUE_DATA_IDLE = 27,
-
- ENGINE_PERCENT_TORQUE_DATA_POINT1 = 28,
-
- ENGINE_PERCENT_TORQUE_DATA_POINT2 = 29,
-
- ENGINE_PERCENT_TORQUE_DATA_POINT3 = 30,
-
- ENGINE_PERCENT_TORQUE_DATA_POINT4 = 31,
-
- LAST_SYSTEM_INDEX = ENGINE_PERCENT_TORQUE_DATA_POINT4,
-};
-
-/**
- * This enum provides the canonical mapping for sensor properties that have a floating-point value.
- * The ordering of the values is taken from the OBD2 specification.
- * Any value greater than the last reserved index is available to vendors to map their extensions.
- */
-enum Obd2FloatSensorIndex : int32_t {
- CALCULATED_ENGINE_LOAD = 0,
-
- ENGINE_COOLANT_TEMPERATURE = 1,
-
- SHORT_TERM_FUEL_TRIM_BANK1 = 2,
-
- LONG_TERM_FUEL_TRIM_BANK1 = 3,
-
- SHORT_TERM_FUEL_TRIM_BANK2 = 4,
-
- LONG_TERM_FUEL_TRIM_BANK2 = 5,
-
- FUEL_PRESSURE = 6,
-
- INTAKE_MANIFOLD_ABSOLUTE_PRESSURE = 7,
-
- ENGINE_RPM = 8,
-
- VEHICLE_SPEED = 9,
-
- TIMING_ADVANCE = 10,
-
- MAF_AIR_FLOW_RATE = 11,
-
- THROTTLE_POSITION = 12,
-
- OXYGEN_SENSOR1_VOLTAGE = 13,
-
- OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM = 14,
-
- OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO = 15,
-
- OXYGEN_SENSOR2_VOLTAGE = 16,
-
- OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM = 17,
-
- OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO = 18,
-
- OXYGEN_SENSOR3_VOLTAGE = 19,
-
- OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM = 20,
-
- OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO = 21,
-
- OXYGEN_SENSOR4_VOLTAGE = 22,
-
- OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM = 23,
-
- OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO = 24,
-
- OXYGEN_SENSOR5_VOLTAGE = 25,
-
- OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM = 26,
-
- OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO = 27,
-
- OXYGEN_SENSOR6_VOLTAGE = 28,
-
- OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM = 29,
-
- OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO = 30,
-
- OXYGEN_SENSOR7_VOLTAGE = 31,
-
- OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM = 32,
-
- OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO = 33,
-
- OXYGEN_SENSOR8_VOLTAGE = 34,
-
- OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM = 35,
-
- OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO = 36,
-
- FUEL_RAIL_PRESSURE = 37,
-
- FUEL_RAIL_GAUGE_PRESSURE = 38,
-
- COMMANDED_EXHAUST_GAS_RECIRCULATION = 39,
-
- EXHAUST_GAS_RECIRCULATION_ERROR = 40,
-
- COMMANDED_EVAPORATIVE_PURGE = 41,
-
- FUEL_TANK_LEVEL_INPUT = 42,
-
- EVAPORATION_SYSTEM_VAPOR_PRESSURE = 43,
-
- CATALYST_TEMPERATURE_BANK1_SENSOR1 = 44,
-
- CATALYST_TEMPERATURE_BANK2_SENSOR1 = 45,
-
- CATALYST_TEMPERATURE_BANK1_SENSOR2 = 46,
-
- CATALYST_TEMPERATURE_BANK2_SENSOR2 = 47,
-
- ABSOLUTE_LOAD_VALUE = 48,
-
- FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO = 49,
-
- RELATIVE_THROTTLE_POSITION = 50,
-
- ABSOLUTE_THROTTLE_POSITION_B = 51,
-
- ABSOLUTE_THROTTLE_POSITION_C = 52,
-
- ACCELERATOR_PEDAL_POSITION_D = 53,
-
- ACCELERATOR_PEDAL_POSITION_E = 54,
-
- ACCELERATOR_PEDAL_POSITION_F = 55,
-
- COMMANDED_THROTTLE_ACTUATOR = 56,
-
- ETHANOL_FUEL_PERCENTAGE = 57,
-
- ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE = 58,
-
- SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 59,
-
- SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 60,
-
- SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 61,
-
- SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 62,
-
- LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1 = 63,
-
- LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2 = 64,
-
- LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3 = 65,
-
- LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4 = 66,
-
- RELATIVE_ACCELERATOR_PEDAL_POSITION = 67,
-
- HYBRID_BATTERY_PACK_REMAINING_LIFE = 68,
-
- FUEL_INJECTION_TIMING = 69,
-
- ENGINE_FUEL_RATE = 70,
-
- LAST_SYSTEM_INDEX = ENGINE_FUEL_RATE,
-};
-
-/**
- * This enum lists the types of supported VMS messages.
- */
-enum VmsMessageType : int32_t {
- /** A client subscribes to a layer. */
- SUBSCRIBE = 1,
-
- /** A client unsubscribes from a layer. */
- UNSUBSCRIBE = 2,
-
- /** A client publishes a data packet. */
- DATA = 3,
-
- /* A client declaring layers offering. */
- OFFERING = 4,
-
- /* Requesting the list of available layers. */
- AVAILABILITY_REQUEST = 5,
-
- /* Returning the list of available layers. */
- AVAILABILITY_RESPONSE = 6,
-
- /** Requesting layers that have subscribers. */
- SUBSCRIPTION_REQUEST = 7,
-
- /** Returning layers that have subscribers. */
- SUBSCRIPTION_RESPONSE = 8,
-};
-
-/**
- * This enum provides the canonical mapping for VMS properties that have an
- * integer value.
- */
-enum VmsBaseMessageIntegerValuesIndex : int32_t {
- /* The message type as enumerated by VmsMessageType enum. */
- VMS_MESSAGE_TYPE = 0,
-};
-
-/*
- * This enum provides the canonical mapping for VMS SUBMIT, UNSUBMIT and DATA
- * messages integer value properties.
- */
-enum VmsSimpleMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
- /* The layer ID as defined in the vms protocol. */
- VMS_LAYER_ID = 1,
-
- /* The version of the VMS layer. */
- VMS_LAYER_VERSION = 2,
-};
-
-/*
- * This enum provides the canonical mapping for VMS offering messages integer
- * value properties
- */
-enum VmsOfferingMessageIntegerValuesIndex : VmsBaseMessageIntegerValuesIndex {
- /* The number of VMS layer dependencies. */
- VMS_NUMBER_OF_LAYERS_DEPENDENCIES = 1,
-
- /* The first index that contain dependencies */
- FIRST_DEPENDENCIES_INDEX = 2,
-};
-
-/**
- * A VMS subscription request only contains its message type. The format of a VMS subscription
- * response is described below.
- */
-enum VmsSubscriptionResponseFormat : VmsBaseMessageIntegerValuesIndex {
- /**
- * Recipients should ignore any packet with a sequence number that is less than the highest
- * sequence number they have seen thus far.
- */
- SEQUENCE_NUMBER = 1,
-
- /** The number of VMS layers. Each layer has two integers: type and version. */
- NUMBER_OF_LAYERS = 2,
-
- /** The first index that contains a layer. */
- FIRST_LAYER = 3,
-};
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
index c6774ca222..f68795955a 100644
--- a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.cpp
@@ -145,6 +145,7 @@ FingerprintAcquiredInfo BiometricsFingerprint::VendorAcquiredFilter(
Return BiometricsFingerprint::setNotify(
const sp& clientCallback) {
+ std::lock_guard lock(mClientCallbackMutex);
mClientCallback = clientCallback;
// This is here because HAL 2.1 doesn't have a way to propagate a
// unique token for its driver. Subsequent versions should send a unique
@@ -259,6 +260,7 @@ fingerprint_device_t* BiometricsFingerprint::openHal() {
void BiometricsFingerprint::notify(const fingerprint_msg_t *msg) {
BiometricsFingerprint* thisPtr = static_cast(
BiometricsFingerprint::getInstance());
+ std::lock_guard lock(thisPtr->mClientCallbackMutex);
if (thisPtr == nullptr || thisPtr->mClientCallback == nullptr) {
ALOGE("Receiving callbacks before the client callback is registered.");
return;
diff --git a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
index 5923c849c8..6d64e3d38d 100644
--- a/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
+++ b/biometrics/fingerprint/2.1/default/BiometricsFingerprint.h
@@ -69,6 +69,7 @@ private:
static FingerprintAcquiredInfo VendorAcquiredFilter(int32_t error, int32_t* vendorCode);
static BiometricsFingerprint* sInstance;
+ std::mutex mClientCallbackMutex;
sp mClientCallback;
fingerprint_device_t *mDevice;
};
diff --git a/bluetooth/1.0/default/async_fd_watcher.cc b/bluetooth/1.0/default/async_fd_watcher.cc
index d8714f5b5b..7c74643871 100644
--- a/bluetooth/1.0/default/async_fd_watcher.cc
+++ b/bluetooth/1.0/default/async_fd_watcher.cc
@@ -24,7 +24,7 @@
#include