Merge "Add CarSensor properties to DefaultVehicleHal"
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 962f6cd..212c8b1 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -48,3 +48,7 @@
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware*)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.bluetooth*)
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 9cb56c7..93f7ad0 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -37,7 +37,6 @@
libhardware \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libutils \
android.hardware.audio@2.0 \
@@ -64,14 +63,14 @@
libhidlbase \
libhidltransport \
liblog \
- libhwbinder \
libutils \
libhardware \
android.hardware.audio@2.0 \
android.hardware.audio.common@2.0 \
android.hardware.audio.effect@2.0 \
android.hardware.soundtrigger@2.0 \
- android.hardware.broadcastradio@1.0
+ android.hardware.broadcastradio@1.0 \
+ android.hardware.broadcastradio@1.1
ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
LOCAL_MULTILIB := 32
@@ -79,4 +78,8 @@
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/service.cpp b/audio/2.0/default/service.cpp
index 5782c6e..f3a858a 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -22,6 +22,7 @@
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
#include <android/hardware/broadcastradio/1.0/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
using android::hardware::configureRpcThreadpool;
using android::hardware::joinRpcThreadpool;
@@ -31,7 +32,13 @@
using android::hardware::audio::V2_0::IDevicesFactory;
using android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
using android::hardware::registerPassthroughServiceImplementation;
-using android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory;
+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;
@@ -45,7 +52,13 @@
// Soundtrigger and FM radio might be not present.
status = registerPassthroughServiceImplementation<ISoundTriggerHw>("sound_trigger.primary");
ALOGE_IF(status != OK, "Error while registering soundtrigger service: %d", status);
- status = registerPassthroughServiceImplementation<IBroadcastRadioFactory>("broadcastradio");
+ 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/common/2.0/vts/types.vts b/audio/common/2.0/vts/types.vts
deleted file mode 100644
index d790573..0000000
--- a/audio/common/2.0/vts/types.vts
+++ /dev/null
@@ -1,1954 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.audio.common"
-
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioHandleConsts"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "AUDIO_IO_HANDLE_NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "AUDIO_MODULE_HANDLE_NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "AUDIO_PORT_HANDLE_NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "AUDIO_PATCH_HANDLE_NONE"
- scalar_value: {
- int32_t: 0
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::Uuid"
- type: TYPE_STRUCT
- struct_value: {
- name: "timeLow"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "timeMid"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
- struct_value: {
- name: "versionAndTimeHigh"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
- struct_value: {
- name: "variantAndClockSeqHigh"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
- struct_value: {
- name: "node"
- type: TYPE_ARRAY
- vector_size: 6
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioStreamType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "DEFAULT"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "MIN"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "VOICE_CALL"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SYSTEM"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "RING"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "MUSIC"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ALARM"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "NOTIFICATION"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "BLUETOOTH_SCO"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "ENFORCED_AUDIBLE"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "DTMF"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "TTS"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "ACCESSIBILITY"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "REROUTING"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "PATCH"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "PUBLIC_CNT"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "FOR_POLICY_CNT"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "CNT"
- scalar_value: {
- int32_t: 13
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioSource"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "DEFAULT"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "MIC"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "VOICE_UPLINK"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VOICE_DOWNLINK"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "VOICE_CALL"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "CAMCORDER"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "VOICE_RECOGNITION"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "VOICE_COMMUNICATION"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "REMOTE_SUBMIX"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "UNPROCESSED"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "CNT"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "MAX"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "FM_TUNER"
- scalar_value: {
- int32_t: 1998
- }
- enumerator: "HOTWORD"
- scalar_value: {
- int32_t: 1999
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioSessionConsts"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OUTPUT_STAGE"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "OUTPUT_MIX"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ALLOCATE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioFormat"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- uint32_t: 4294967295
- }
- enumerator: "DEFAULT"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "PCM"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "MP3"
- scalar_value: {
- uint32_t: 16777216
- }
- enumerator: "AMR_NB"
- scalar_value: {
- uint32_t: 33554432
- }
- enumerator: "AMR_WB"
- scalar_value: {
- uint32_t: 50331648
- }
- enumerator: "AAC"
- scalar_value: {
- uint32_t: 67108864
- }
- enumerator: "HE_AAC_V1"
- scalar_value: {
- uint32_t: 83886080
- }
- enumerator: "HE_AAC_V2"
- scalar_value: {
- uint32_t: 100663296
- }
- enumerator: "VORBIS"
- scalar_value: {
- uint32_t: 117440512
- }
- enumerator: "OPUS"
- scalar_value: {
- uint32_t: 134217728
- }
- enumerator: "AC3"
- scalar_value: {
- uint32_t: 150994944
- }
- enumerator: "E_AC3"
- scalar_value: {
- uint32_t: 167772160
- }
- enumerator: "DTS"
- scalar_value: {
- uint32_t: 184549376
- }
- enumerator: "DTS_HD"
- scalar_value: {
- uint32_t: 201326592
- }
- enumerator: "IEC61937"
- scalar_value: {
- uint32_t: 218103808
- }
- enumerator: "DOLBY_TRUEHD"
- scalar_value: {
- uint32_t: 234881024
- }
- enumerator: "EVRC"
- scalar_value: {
- uint32_t: 268435456
- }
- enumerator: "EVRCB"
- scalar_value: {
- uint32_t: 285212672
- }
- enumerator: "EVRCWB"
- scalar_value: {
- uint32_t: 301989888
- }
- enumerator: "EVRCNW"
- scalar_value: {
- uint32_t: 318767104
- }
- enumerator: "AAC_ADIF"
- scalar_value: {
- uint32_t: 335544320
- }
- enumerator: "WMA"
- scalar_value: {
- uint32_t: 352321536
- }
- enumerator: "WMA_PRO"
- scalar_value: {
- uint32_t: 369098752
- }
- enumerator: "AMR_WB_PLUS"
- scalar_value: {
- uint32_t: 385875968
- }
- enumerator: "MP2"
- scalar_value: {
- uint32_t: 402653184
- }
- enumerator: "QCELP"
- scalar_value: {
- uint32_t: 419430400
- }
- enumerator: "DSD"
- scalar_value: {
- uint32_t: 436207616
- }
- enumerator: "FLAC"
- scalar_value: {
- uint32_t: 452984832
- }
- enumerator: "ALAC"
- scalar_value: {
- uint32_t: 469762048
- }
- enumerator: "APE"
- scalar_value: {
- uint32_t: 486539264
- }
- enumerator: "AAC_ADTS"
- scalar_value: {
- uint32_t: 503316480
- }
- enumerator: "SBC"
- scalar_value: {
- uint32_t: 520093696
- }
- enumerator: "APTX"
- scalar_value: {
- uint32_t: 536870912
- }
- enumerator: "APTX_HD"
- scalar_value: {
- uint32_t: 553648128
- }
- enumerator: "AC4"
- scalar_value: {
- uint32_t: 570425344
- }
- enumerator: "LDAC"
- scalar_value: {
- uint32_t: 587202560
- }
- enumerator: "MAIN_MASK"
- scalar_value: {
- uint32_t: 4278190080
- }
- enumerator: "SUB_MASK"
- scalar_value: {
- uint32_t: 16777215
- }
- enumerator: "PCM_SUB_16_BIT"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "PCM_SUB_8_BIT"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "PCM_SUB_32_BIT"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "PCM_SUB_8_24_BIT"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "PCM_SUB_FLOAT"
- scalar_value: {
- uint32_t: 5
- }
- enumerator: "PCM_SUB_24_BIT_PACKED"
- scalar_value: {
- uint32_t: 6
- }
- enumerator: "MP3_SUB_NONE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "AMR_SUB_NONE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "AAC_SUB_MAIN"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "AAC_SUB_LC"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "AAC_SUB_SSR"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "AAC_SUB_LTP"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "AAC_SUB_HE_V1"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "AAC_SUB_SCALABLE"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "AAC_SUB_ERLC"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "AAC_SUB_LD"
- scalar_value: {
- uint32_t: 128
- }
- enumerator: "AAC_SUB_HE_V2"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "AAC_SUB_ELD"
- scalar_value: {
- uint32_t: 512
- }
- enumerator: "VORBIS_SUB_NONE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "PCM_16_BIT"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "PCM_8_BIT"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "PCM_32_BIT"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "PCM_8_24_BIT"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "PCM_FLOAT"
- scalar_value: {
- uint32_t: 5
- }
- enumerator: "PCM_24_BIT_PACKED"
- scalar_value: {
- uint32_t: 6
- }
- enumerator: "AAC_MAIN"
- scalar_value: {
- uint32_t: 67108865
- }
- enumerator: "AAC_LC"
- scalar_value: {
- uint32_t: 67108866
- }
- enumerator: "AAC_SSR"
- scalar_value: {
- uint32_t: 67108868
- }
- enumerator: "AAC_LTP"
- scalar_value: {
- uint32_t: 67108872
- }
- enumerator: "AAC_HE_V1"
- scalar_value: {
- uint32_t: 67108880
- }
- enumerator: "AAC_SCALABLE"
- scalar_value: {
- uint32_t: 67108896
- }
- enumerator: "AAC_ERLC"
- scalar_value: {
- uint32_t: 67108928
- }
- enumerator: "AAC_LD"
- scalar_value: {
- uint32_t: 67108992
- }
- enumerator: "AAC_HE_V2"
- scalar_value: {
- uint32_t: 67109120
- }
- enumerator: "AAC_ELD"
- scalar_value: {
- uint32_t: 67109376
- }
- enumerator: "AAC_ADTS_MAIN"
- scalar_value: {
- uint32_t: 503316481
- }
- enumerator: "AAC_ADTS_LC"
- scalar_value: {
- uint32_t: 503316482
- }
- enumerator: "AAC_ADTS_SSR"
- scalar_value: {
- uint32_t: 503316484
- }
- enumerator: "AAC_ADTS_LTP"
- scalar_value: {
- uint32_t: 503316488
- }
- enumerator: "AAC_ADTS_HE_V1"
- scalar_value: {
- uint32_t: 503316496
- }
- enumerator: "AAC_ADTS_SCALABLE"
- scalar_value: {
- uint32_t: 503316512
- }
- enumerator: "AAC_ADTS_ERLC"
- scalar_value: {
- uint32_t: 503316544
- }
- enumerator: "AAC_ADTS_LD"
- scalar_value: {
- uint32_t: 503316608
- }
- enumerator: "AAC_ADTS_HE_V2"
- scalar_value: {
- uint32_t: 503316736
- }
- enumerator: "AAC_ADTS_ELD"
- scalar_value: {
- uint32_t: 503316992
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::FixedChannelCount"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FCC_2"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FCC_8"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "REPRESENTATION_POSITION"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "REPRESENTATION_INDEX"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "NONE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "INVALID"
- scalar_value: {
- uint32_t: 3221225472
- }
- enumerator: "OUT_FRONT_LEFT"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "OUT_FRONT_RIGHT"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "OUT_FRONT_CENTER"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "OUT_LOW_FREQUENCY"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "OUT_BACK_LEFT"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "OUT_BACK_RIGHT"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "OUT_FRONT_LEFT_OF_CENTER"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "OUT_FRONT_RIGHT_OF_CENTER"
- scalar_value: {
- uint32_t: 128
- }
- enumerator: "OUT_BACK_CENTER"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "OUT_SIDE_LEFT"
- scalar_value: {
- uint32_t: 512
- }
- enumerator: "OUT_SIDE_RIGHT"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "OUT_TOP_CENTER"
- scalar_value: {
- uint32_t: 2048
- }
- enumerator: "OUT_TOP_FRONT_LEFT"
- scalar_value: {
- uint32_t: 4096
- }
- enumerator: "OUT_TOP_FRONT_CENTER"
- scalar_value: {
- uint32_t: 8192
- }
- enumerator: "OUT_TOP_FRONT_RIGHT"
- scalar_value: {
- uint32_t: 16384
- }
- enumerator: "OUT_TOP_BACK_LEFT"
- scalar_value: {
- uint32_t: 32768
- }
- enumerator: "OUT_TOP_BACK_CENTER"
- scalar_value: {
- uint32_t: 65536
- }
- enumerator: "OUT_TOP_BACK_RIGHT"
- scalar_value: {
- uint32_t: 131072
- }
- enumerator: "OUT_MONO"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "OUT_STEREO"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "OUT_2POINT1"
- scalar_value: {
- uint32_t: 11
- }
- enumerator: "OUT_QUAD"
- scalar_value: {
- uint32_t: 51
- }
- enumerator: "OUT_QUAD_BACK"
- scalar_value: {
- uint32_t: 51
- }
- enumerator: "OUT_QUAD_SIDE"
- scalar_value: {
- uint32_t: 1539
- }
- enumerator: "OUT_SURROUND"
- scalar_value: {
- uint32_t: 263
- }
- enumerator: "OUT_PENTA"
- scalar_value: {
- uint32_t: 55
- }
- enumerator: "OUT_5POINT1"
- scalar_value: {
- uint32_t: 63
- }
- enumerator: "OUT_5POINT1_BACK"
- scalar_value: {
- uint32_t: 63
- }
- enumerator: "OUT_5POINT1_SIDE"
- scalar_value: {
- uint32_t: 1551
- }
- enumerator: "OUT_6POINT1"
- scalar_value: {
- uint32_t: 319
- }
- enumerator: "OUT_7POINT1"
- scalar_value: {
- uint32_t: 1599
- }
- enumerator: "OUT_ALL"
- scalar_value: {
- uint32_t: 262143
- }
- enumerator: "IN_LEFT"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "IN_RIGHT"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "IN_FRONT"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "IN_BACK"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "IN_LEFT_PROCESSED"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "IN_RIGHT_PROCESSED"
- scalar_value: {
- uint32_t: 128
- }
- enumerator: "IN_FRONT_PROCESSED"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "IN_BACK_PROCESSED"
- scalar_value: {
- uint32_t: 512
- }
- enumerator: "IN_PRESSURE"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "IN_X_AXIS"
- scalar_value: {
- uint32_t: 2048
- }
- enumerator: "IN_Y_AXIS"
- scalar_value: {
- uint32_t: 4096
- }
- enumerator: "IN_Z_AXIS"
- scalar_value: {
- uint32_t: 8192
- }
- enumerator: "IN_VOICE_UPLINK"
- scalar_value: {
- uint32_t: 16384
- }
- enumerator: "IN_VOICE_DNLINK"
- scalar_value: {
- uint32_t: 32768
- }
- enumerator: "IN_MONO"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "IN_STEREO"
- scalar_value: {
- uint32_t: 12
- }
- enumerator: "IN_FRONT_BACK"
- scalar_value: {
- uint32_t: 48
- }
- enumerator: "IN_6"
- scalar_value: {
- uint32_t: 252
- }
- enumerator: "IN_VOICE_UPLINK_MONO"
- scalar_value: {
- uint32_t: 16400
- }
- enumerator: "IN_VOICE_DNLINK_MONO"
- scalar_value: {
- uint32_t: 32784
- }
- enumerator: "IN_VOICE_CALL_MONO"
- scalar_value: {
- uint32_t: 49168
- }
- enumerator: "IN_ALL"
- scalar_value: {
- uint32_t: 65532
- }
- enumerator: "COUNT_MAX"
- scalar_value: {
- uint32_t: 30
- }
- enumerator: "INDEX_HDR"
- scalar_value: {
- uint32_t: 2147483648
- }
- enumerator: "INDEX_MASK_1"
- scalar_value: {
- uint32_t: 2147483649
- }
- enumerator: "INDEX_MASK_2"
- scalar_value: {
- uint32_t: 2147483651
- }
- enumerator: "INDEX_MASK_3"
- scalar_value: {
- uint32_t: 2147483655
- }
- enumerator: "INDEX_MASK_4"
- scalar_value: {
- uint32_t: 2147483663
- }
- enumerator: "INDEX_MASK_5"
- scalar_value: {
- uint32_t: 2147483679
- }
- enumerator: "INDEX_MASK_6"
- scalar_value: {
- uint32_t: 2147483711
- }
- enumerator: "INDEX_MASK_7"
- scalar_value: {
- uint32_t: 2147483775
- }
- enumerator: "INDEX_MASK_8"
- scalar_value: {
- uint32_t: 2147483903
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioInterleave"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "LEFT"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "RIGHT"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: -2
- }
- enumerator: "CURRENT"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "NORMAL"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "RINGTONE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "IN_CALL"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "IN_COMMUNICATION"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "CNT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "MAX"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioDevice"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "NONE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "BIT_IN"
- scalar_value: {
- uint32_t: 2147483648
- }
- enumerator: "BIT_DEFAULT"
- scalar_value: {
- uint32_t: 1073741824
- }
- enumerator: "OUT_EARPIECE"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "OUT_SPEAKER"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "OUT_WIRED_HEADSET"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "OUT_WIRED_HEADPHONE"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "OUT_BLUETOOTH_SCO"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "OUT_BLUETOOTH_SCO_HEADSET"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "OUT_BLUETOOTH_SCO_CARKIT"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "OUT_BLUETOOTH_A2DP"
- scalar_value: {
- uint32_t: 128
- }
- enumerator: "OUT_BLUETOOTH_A2DP_HEADPHONES"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "OUT_BLUETOOTH_A2DP_SPEAKER"
- scalar_value: {
- uint32_t: 512
- }
- enumerator: "OUT_AUX_DIGITAL"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "OUT_HDMI"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "OUT_ANLG_DOCK_HEADSET"
- scalar_value: {
- uint32_t: 2048
- }
- enumerator: "OUT_DGTL_DOCK_HEADSET"
- scalar_value: {
- uint32_t: 4096
- }
- enumerator: "OUT_USB_ACCESSORY"
- scalar_value: {
- uint32_t: 8192
- }
- enumerator: "OUT_USB_DEVICE"
- scalar_value: {
- uint32_t: 16384
- }
- enumerator: "OUT_REMOTE_SUBMIX"
- scalar_value: {
- uint32_t: 32768
- }
- enumerator: "OUT_TELEPHONY_TX"
- scalar_value: {
- uint32_t: 65536
- }
- enumerator: "OUT_LINE"
- scalar_value: {
- uint32_t: 131072
- }
- enumerator: "OUT_HDMI_ARC"
- scalar_value: {
- uint32_t: 262144
- }
- enumerator: "OUT_SPDIF"
- scalar_value: {
- uint32_t: 524288
- }
- enumerator: "OUT_FM"
- scalar_value: {
- uint32_t: 1048576
- }
- enumerator: "OUT_AUX_LINE"
- scalar_value: {
- uint32_t: 2097152
- }
- enumerator: "OUT_SPEAKER_SAFE"
- scalar_value: {
- uint32_t: 4194304
- }
- enumerator: "OUT_IP"
- scalar_value: {
- uint32_t: 8388608
- }
- enumerator: "OUT_BUS"
- scalar_value: {
- uint32_t: 16777216
- }
- enumerator: "OUT_PROXY"
- scalar_value: {
- uint32_t: 33554432
- }
- enumerator: "OUT_DEFAULT"
- scalar_value: {
- uint32_t: 1073741824
- }
- enumerator: "OUT_ALL"
- scalar_value: {
- uint32_t: 1140850687
- }
- enumerator: "OUT_ALL_A2DP"
- scalar_value: {
- uint32_t: 896
- }
- enumerator: "OUT_ALL_SCO"
- scalar_value: {
- uint32_t: 112
- }
- enumerator: "OUT_ALL_USB"
- scalar_value: {
- uint32_t: 24576
- }
- enumerator: "IN_COMMUNICATION"
- scalar_value: {
- uint32_t: 2147483649
- }
- enumerator: "IN_AMBIENT"
- scalar_value: {
- uint32_t: 2147483650
- }
- enumerator: "IN_BUILTIN_MIC"
- scalar_value: {
- uint32_t: 2147483652
- }
- enumerator: "IN_BLUETOOTH_SCO_HEADSET"
- scalar_value: {
- uint32_t: 2147483656
- }
- enumerator: "IN_WIRED_HEADSET"
- scalar_value: {
- uint32_t: 2147483664
- }
- enumerator: "IN_AUX_DIGITAL"
- scalar_value: {
- uint32_t: 2147483680
- }
- enumerator: "IN_HDMI"
- scalar_value: {
- uint32_t: 2147483680
- }
- enumerator: "IN_VOICE_CALL"
- scalar_value: {
- uint32_t: 2147483712
- }
- enumerator: "IN_TELEPHONY_RX"
- scalar_value: {
- uint32_t: 2147483712
- }
- enumerator: "IN_BACK_MIC"
- scalar_value: {
- uint32_t: 2147483776
- }
- enumerator: "IN_REMOTE_SUBMIX"
- scalar_value: {
- uint32_t: 2147483904
- }
- enumerator: "IN_ANLG_DOCK_HEADSET"
- scalar_value: {
- uint32_t: 2147484160
- }
- enumerator: "IN_DGTL_DOCK_HEADSET"
- scalar_value: {
- uint32_t: 2147484672
- }
- enumerator: "IN_USB_ACCESSORY"
- scalar_value: {
- uint32_t: 2147485696
- }
- enumerator: "IN_USB_DEVICE"
- scalar_value: {
- uint32_t: 2147487744
- }
- enumerator: "IN_FM_TUNER"
- scalar_value: {
- uint32_t: 2147491840
- }
- enumerator: "IN_TV_TUNER"
- scalar_value: {
- uint32_t: 2147500032
- }
- enumerator: "IN_LINE"
- scalar_value: {
- uint32_t: 2147516416
- }
- enumerator: "IN_SPDIF"
- scalar_value: {
- uint32_t: 2147549184
- }
- enumerator: "IN_BLUETOOTH_A2DP"
- scalar_value: {
- uint32_t: 2147614720
- }
- enumerator: "IN_LOOPBACK"
- scalar_value: {
- uint32_t: 2147745792
- }
- enumerator: "IN_IP"
- scalar_value: {
- uint32_t: 2148007936
- }
- enumerator: "IN_BUS"
- scalar_value: {
- uint32_t: 2148532224
- }
- enumerator: "IN_PROXY"
- scalar_value: {
- uint32_t: 2164260864
- }
- enumerator: "IN_DEFAULT"
- scalar_value: {
- uint32_t: 3221225472
- }
- enumerator: "IN_ALL"
- scalar_value: {
- uint32_t: 3240099839
- }
- enumerator: "IN_ALL_SCO"
- scalar_value: {
- uint32_t: 2147483656
- }
- enumerator: "IN_ALL_USB"
- scalar_value: {
- uint32_t: 2147489792
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioOutputFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "DIRECT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "PRIMARY"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FAST"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "DEEP_BUFFER"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "COMPRESS_OFFLOAD"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "NON_BLOCKING"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "HW_AV_SYNC"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "TTS"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "RAW"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "SYNC"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "IEC958_NONAUDIO"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "DIRECT_PCM"
- scalar_value: {
- int32_t: 8192
- }
- enumerator: "MMAP_NOIRQ"
- scalar_value: {
- int32_t: 16384
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioInputFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "FAST"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "HW_HOTWORD"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "RAW"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "SYNC"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "MMAP_NOIRQ"
- scalar_value: {
- int32_t: 16
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioUsage"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNKNOWN"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "MEDIA"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "VOICE_COMMUNICATION"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VOICE_COMMUNICATION_SIGNALLING"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ALARM"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "NOTIFICATION"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "NOTIFICATION_TELEPHONY_RINGTONE"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "NOTIFICATION_COMMUNICATION_REQUEST"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "NOTIFICATION_COMMUNICATION_INSTANT"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "NOTIFICATION_COMMUNICATION_DELAYED"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "NOTIFICATION_EVENT"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "ASSISTANCE_ACCESSIBILITY"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "ASSISTANCE_NAVIGATION_GUIDANCE"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "ASSISTANCE_SONIFICATION"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "GAME"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "VIRTUAL_SOURCE"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "ASSISTANT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "CNT"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "MAX"
- scalar_value: {
- int32_t: 16
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "sampleRateHz"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "channelMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
- }
- struct_value: {
- name: "streamType"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
- }
- struct_value: {
- name: "bitRatePerSecond"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "durationMicroseconds"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "hasVideo"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "isStreaming"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "bitWidth"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "bufferSize"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "usage"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioUsage"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioConfig"
- type: TYPE_STRUCT
- struct_value: {
- name: "sampleRateHz"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "channelMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
- }
- struct_value: {
- name: "offloadInfo"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioOffloadInfo"
- }
- struct_value: {
- name: "frameCount"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioGainMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "JOINT"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "CHANNELS"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "RAMP"
- scalar_value: {
- uint32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioGain"
- type: TYPE_STRUCT
- struct_value: {
- name: "mode"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
- }
- struct_value: {
- name: "channelMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- struct_value: {
- name: "minValue"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "maxValue"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "defaultValue"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "stepValue"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "minRampMs"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "maxRampMs"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioGainConfig"
- type: TYPE_STRUCT
- struct_value: {
- name: "index"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "mode"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioGainMode"
- }
- struct_value: {
- name: "channelMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- struct_value: {
- name: "values"
- type: TYPE_ARRAY
- vector_size: 32
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
- struct_value: {
- name: "rampDurationMs"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortRole"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SOURCE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "SINK"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "DEVICE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "MIX"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SESSION"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
- type: TYPE_STRUCT
- struct_value: {
- name: "hwModule"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
- }
- struct_value: {
- name: "address"
- type: TYPE_ARRAY
- vector_size: 32
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
- type: TYPE_STRUCT
- struct_value: {
- name: "session"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SAMPLE_RATE"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "CHANNEL_MASK"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "FORMAT"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "GAIN"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "ALL"
- scalar_value: {
- uint32_t: 15
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfig"
- type: TYPE_STRUCT
- sub_struct: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext"
- type: TYPE_UNION
- sub_union: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
- type: TYPE_STRUCT
- sub_struct: {
- name: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt::UseCase"
- type: TYPE_UNION
- union_value: {
- name: "stream"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioStreamType"
- }
- union_value: {
- name: "source"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioSource"
- }
- }
- struct_value: {
- name: "hwModule"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "ioHandle"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "useCase"
- type: TYPE_UNION
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt::UseCase"
- }
- }
- union_value: {
- name: "device"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigDeviceExt"
- }
- union_value: {
- name: "mix"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext::AudioPortConfigMixExt"
- }
- union_value: {
- name: "session"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigSessionExt"
- }
- }
- struct_value: {
- name: "id"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "configMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfigMask"
- }
- struct_value: {
- name: "sampleRateHz"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "channelMask"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
- }
- struct_value: {
- name: "gain"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioGainConfig"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
- }
- struct_value: {
- name: "role"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
- }
- struct_value: {
- name: "ext"
- type: TYPE_UNION
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig::Ext"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
- type: TYPE_STRUCT
- struct_value: {
- name: "hwModule"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
- }
- struct_value: {
- name: "address"
- type: TYPE_ARRAY
- vector_size: 32
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "LOW"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NORMAL"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
- type: TYPE_STRUCT
- struct_value: {
- name: "hwModule"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "ioHandle"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "latencyClass"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioMixLatencyClass"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
- type: TYPE_STRUCT
- struct_value: {
- name: "session"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::AudioPort"
- type: TYPE_STRUCT
- sub_struct: {
- name: "::android::hardware::audio::common::V2_0::AudioPort::Ext"
- type: TYPE_UNION
- union_value: {
- name: "device"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortDeviceExt"
- }
- union_value: {
- name: "mix"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortMixExt"
- }
- union_value: {
- name: "session"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortSessionExt"
- }
- }
- struct_value: {
- name: "id"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "role"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortRole"
- }
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "sampleRates"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
- struct_value: {
- name: "channelMasks"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioChannelMask"
- }
- }
- struct_value: {
- name: "formats"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioFormat"
- }
- }
- struct_value: {
- name: "gains"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioGain"
- }
- }
- struct_value: {
- name: "activeConfig"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortConfig"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPortType"
- }
- struct_value: {
- name: "ext"
- type: TYPE_UNION
- predefined_type: "::android::hardware::audio::common::V2_0::AudioPort::Ext"
- }
-}
-
-attribute: {
- name: "::android::hardware::audio::common::V2_0::ThreadInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "pid"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "tid"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
-}
-
diff --git a/audio/effect/2.0/default/Android.mk b/audio/effect/2.0/default/Android.mk
index 1541d41..bbcf298 100644
--- a/audio/effect/2.0/default/Android.mk
+++ b/audio/effect/2.0/default/Android.mk
@@ -29,7 +29,6 @@
libhidlbase \
libhidlmemory \
libhidltransport \
- libhwbinder \
liblog \
libutils \
android.hardware.audio.common@2.0 \
diff --git a/audio/effect/2.0/vts/functional/Android.bp b/audio/effect/2.0/vts/functional/Android.bp
index 65fafad..df80dba 100644
--- a/audio/effect/2.0/vts/functional/Android.bp
+++ b/audio/effect/2.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.audio.effect@2.0",
diff --git a/automotive/vehicle/2.0/Android.mk b/automotive/vehicle/2.0/Android.mk
index c540027..f976c39 100644
--- a/automotive/vehicle/2.0/Android.mk
+++ b/automotive/vehicle/2.0/Android.mk
@@ -17,177 +17,6 @@
#
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StatusCode)
#
GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
@@ -1198,177 +1027,6 @@
#
-# Build types.hal (CommonIgnitionMonitors)
-#
-GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::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_0/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.0::types.SparkIgnitionMonitors
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StatusCode)
#
GEN := $(intermediates)/android/hardware/automotive/vehicle/V2_0/StatusCode.java
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
index c592165..ba4a6cd 100644
--- a/automotive/vehicle/2.0/default/Android.mk
+++ b/automotive/vehicle/2.0/default/Android.mk
@@ -23,7 +23,6 @@
LOCAL_MODULE := $(vhal_v2_0)-manager-lib
LOCAL_SRC_FILES := \
common/src/AccessControlConfigParser.cpp \
- common/src/Obd2SensorStore.cpp \
common/src/SubscriptionManager.cpp \
common/src/VehicleHalManager.cpp \
common/src/VehicleObjectPool.cpp \
@@ -119,7 +118,6 @@
LOCAL_SRC_FILES:= \
tests/AccessControlConfigParser_test.cpp \
- tests/Obd2SensorStore_test.cpp \
tests/SubscriptionManager_test.cpp \
tests/VehicleHalManager_test.cpp \
tests/VehicleObjectPool_test.cpp \
diff --git a/automotive/vehicle/2.0/default/VehicleService.cpp b/automotive/vehicle/2.0/default/VehicleService.cpp
index f88ce7b..95057cc 100644
--- a/automotive/vehicle/2.0/default/VehicleService.cpp
+++ b/automotive/vehicle/2.0/default/VehicleService.cpp
@@ -34,7 +34,7 @@
configureRpcThreadpool(1, true /* callerWillJoin */);
ALOGI("Registering as service...");
- service->registerAsService("Vehicle");
+ service->registerAsService();
ALOGI("Ready");
joinRpcThreadpool();
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 24f173e..3c17183 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
@@ -184,32 +184,6 @@
.prop = toInt(VehicleProperty::IGNITION_STATE),
.access = VehiclePropertyAccess::READ,
.changeMode = VehiclePropertyChangeMode::ON_CHANGE,
- },
-
- {
- .prop = toInt(VehicleProperty::OBD2_LIVE_FRAME),
- .access = VehiclePropertyAccess::READ,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
- .configArray = {0,0}
- },
-
- {
- .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME),
- .access = VehiclePropertyAccess::READ,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
- .configArray = {0,0}
- },
-
- {
- .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_INFO),
- .access = VehiclePropertyAccess::READ,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE
- },
-
- {
- .prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME_CLEAR),
- .access = VehiclePropertyAccess::WRITE,
- .changeMode = VehiclePropertyChangeMode::ON_CHANGE
}
};
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
index 648d787..38e21c7 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#define LOG_TAG "DefaultVehicleHal"
+#define LOG_TAG "DefaultVehicleHal_v2_0"
#include <android/log.h>
#include <algorithm>
@@ -181,115 +181,6 @@
return nullptr;
}
-static std::unique_ptr<Obd2SensorStore> fillDefaultObd2Frame(
- size_t numVendorIntegerSensors,
- size_t numVendorFloatSensors) {
- std::unique_ptr<Obd2SensorStore> sensorStore(new Obd2SensorStore(
- numVendorIntegerSensors, numVendorFloatSensors));
-
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::FUEL_SYSTEM_STATUS,
- toInt(FuelSystemStatus::CLOSED_LOOP));
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::MALFUNCTION_INDICATOR_LIGHT_ON, 0);
- sensorStore->setIntegerSensor(
- Obd2IntegerSensorIndex::IGNITION_MONITORS_SUPPORTED,
- 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,
- 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, 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 DefaultVehicleHal::initObd2LiveFrame(VehiclePropConfig& propConfig) {
- auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
- propConfig.configArray[1]);
- mLiveObd2Frame = createVehiclePropValue(VehiclePropertyType::COMPLEX, 0);
- sensorStore->fillPropValue(mLiveObd2Frame.get(), "");
-}
-
-void DefaultVehicleHal::initObd2FreezeFrame(VehiclePropConfig& propConfig) {
- auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
- propConfig.configArray[1]);
-
- mFreezeObd2Frames.push_back(
- createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
- mFreezeObd2Frames.push_back(
- createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
- mFreezeObd2Frames.push_back(
- createVehiclePropValue(VehiclePropertyType::COMPLEX,0));
-
- sensorStore->fillPropValue(mFreezeObd2Frames[0].get(), "P0070");
- sensorStore->fillPropValue(mFreezeObd2Frames[1].get(), "P0102");
- sensorStore->fillPropValue(mFreezeObd2Frames[2].get(), "P0123");
-}
-
void DefaultVehicleHal::parseRxProtoBuf(std::vector<uint8_t>& msg) {
emulator::EmulatorMessage rxMsg;
emulator::EmulatorMessage respMsg;
@@ -524,12 +415,6 @@
case toInt(VehicleProperty::IGNITION_STATE):
prop->value.int32Values[0] = toInt(VehicleIgnitionState::ON);
break;
- case toInt(VehicleProperty::OBD2_LIVE_FRAME):
- // OBD2 is handled separately
- break;
- case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
- // OBD2 is handled separately
- break;
default:
ALOGW("%s: propId=0x%x not found", __FUNCTION__, prop->prop);
break;
@@ -585,18 +470,6 @@
VehiclePropValuePtr v = nullptr;
switch (propId) {
- case toInt(VehicleProperty::OBD2_LIVE_FRAME):
- v = pool.obtainComplex();
- status = fillObd2LiveFrame(v.get());
- break;
- case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
- v = pool.obtainComplex();
- status = fillObd2FreezeFrame(requestedPropValue, v.get());
- break;
- case toInt(VehicleProperty::OBD2_FREEZE_FRAME_INFO):
- v = pool.obtainComplex();
- status = fillObd2DtcInfo(v.get());
- break;
default:
{
std::lock_guard<std::mutex> lock(mPropsMutex);
@@ -623,9 +496,6 @@
auto propId = propValue.prop;
StatusCode status;
switch (propId) {
- case toInt(VehicleProperty::OBD2_FREEZE_FRAME_CLEAR):
- status = clearObd2FreezeFrames(propValue);
- break;
default:
status = updateProperty(propValue);
if (status == StatusCode::OK) {
@@ -676,12 +546,6 @@
break;
case VehiclePropertyType::COMPLEX:
switch (cfg.prop) {
- case toInt(VehicleProperty::OBD2_LIVE_FRAME):
- initObd2LiveFrame(cfg);
- break;
- case toInt(VehicleProperty::OBD2_FREEZE_FRAME):
- initObd2FreezeFrame(cfg);
- break;
default:
// Need to handle each complex property separately
break;
@@ -723,79 +587,6 @@
mThread = std::thread(&DefaultVehicleHal::rxThread, this);
}
-StatusCode DefaultVehicleHal::fillObd2LiveFrame(VehiclePropValue* v) {
- v->prop = toInt(VehicleProperty::OBD2_LIVE_FRAME);
- v->value.int32Values = mLiveObd2Frame->value.int32Values;
- v->value.floatValues = mLiveObd2Frame->value.floatValues;
- v->value.bytes = mLiveObd2Frame->value.bytes;
- return StatusCode::OK;
-}
-
-template<typename Iterable>
-typename Iterable::const_iterator findPropValueAtTimestamp(
- const Iterable& frames,
- int64_t timestamp) {
- return std::find_if(frames.begin(),
- frames.end(),
- [timestamp] (const std::unique_ptr<VehiclePropValue>&
- propValue) -> bool {
- return propValue->timestamp == timestamp;
- });
-}
-
-StatusCode DefaultVehicleHal::fillObd2FreezeFrame(
- const VehiclePropValue& requestedPropValue, VehiclePropValue* v) {
- 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 freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
- timestamp);
- if(mFreezeObd2Frames.end() == freezeFrameIter) {
- ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
- return StatusCode::INVALID_ARG;
- }
- const std::unique_ptr<VehiclePropValue>& freezeFrame = *freezeFrameIter;
- v->prop = toInt(VehicleProperty::OBD2_FREEZE_FRAME);
- v->value.int32Values = freezeFrame->value.int32Values;
- v->value.floatValues = freezeFrame->value.floatValues;
- v->value.bytes = freezeFrame->value.bytes;
- v->value.stringValue = freezeFrame->value.stringValue;
- v->timestamp = freezeFrame->timestamp;
- return StatusCode::OK;
-}
-
-StatusCode DefaultVehicleHal::clearObd2FreezeFrames(
- const VehiclePropValue& propValue) {
- if (propValue.value.int64Values.size() == 0) {
- mFreezeObd2Frames.clear();
- return StatusCode::OK;
- } else {
- for(int64_t timestamp: propValue.value.int64Values) {
- auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
- timestamp);
- if(mFreezeObd2Frames.end() == freezeFrameIter) {
- ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
- return StatusCode::INVALID_ARG;
- }
- mFreezeObd2Frames.erase(freezeFrameIter);
- }
- }
- return StatusCode::OK;
-}
-
-StatusCode DefaultVehicleHal::fillObd2DtcInfo(VehiclePropValue* v) {
- std::vector<int64_t> timestamps;
- for(const auto& freezeFrame: mFreezeObd2Frames) {
- timestamps.push_back(freezeFrame->timestamp);
- }
- v->value.int64Values = timestamps;
- return StatusCode::OK;
-}
-
-
-
} // impl
} // namespace V2_0
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
index 2df9514..b4ba8ba 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/DefaultVehicleHal.h
@@ -27,7 +27,6 @@
#include "VehicleHalProto.pb.h"
#include <vhal_v2_0/VehicleHal.h>
-#include <vhal_v2_0/Obd2SensorStore.h>
#include "DefaultConfig.h"
#include "VehicleHalProto.pb.h"
@@ -83,8 +82,6 @@
void doGetPropertyAll(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
void doSetProperty(emulator::EmulatorMessage& rxMsg, emulator::EmulatorMessage& respMsg);
VehiclePropValue* getVehiclePropValueLocked(int32_t propId, int32_t areaId);
- void initObd2LiveFrame(VehiclePropConfig& propConfig);
- void initObd2FreezeFrame(VehiclePropConfig& propConfig);
void parseRxProtoBuf(std::vector<uint8_t>& msg);
void populateProtoVehicleConfig(emulator::VehiclePropConfig* protoCfg,
const VehiclePropConfig& cfg);
@@ -95,17 +92,10 @@
void rxThread();
void txMsg(emulator::EmulatorMessage& txMsg);
StatusCode updateProperty(const VehiclePropValue& propValue);
- StatusCode fillObd2LiveFrame(VehiclePropValue* v);
- StatusCode fillObd2FreezeFrame(const VehiclePropValue& requestedPropValue,
- VehiclePropValue* v);
- StatusCode fillObd2DtcInfo(VehiclePropValue *v);
- StatusCode clearObd2FreezeFrames(const VehiclePropValue& propValue);
private:
// TODO: Use a hashtable to support indexing props
std::vector<std::unique_ptr<VehiclePropValue>> mProps;
std::atomic<int> mExit;
- std::unique_ptr<VehiclePropValue> mLiveObd2Frame {nullptr};
- std::vector<std::unique_ptr<VehiclePropValue>> mFreezeObd2Frames;
std::mutex mPropsMutex;
std::thread mThread;
std::unique_ptr<CommBase> mComm{nullptr};
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 8da0568..0d2dfdd 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -1810,138 +1810,8 @@
| VehiclePropertyGroup:SYSTEM
| VehiclePropertyType:COMPLEX
| 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),
};
+
/*
* Bit flags for fan direction
*/
@@ -2829,86 +2699,6 @@
INTERNAL_ERROR = 5,
};
-/* 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 Wheel : int32_t {
UNKNOWN = 0x0,
@@ -2918,306 +2708,6 @@
RIGHT_REAR = 0x8,
};
-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,
-
- VENDOR_START_INDEX = LAST_SYSTEM_INDEX + 1,
-};
-
-/*
- * 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,
-
- VENDOR_START_INDEX = LAST_SYSTEM_INDEX + 1,
-};
-
/*
* This enum lists the types of supported VMS messages.
*/
diff --git a/automotive/vehicle/2.0/vts/Vehicle.vts b/automotive/vehicle/2.0/vts/Vehicle.vts
deleted file mode 100644
index aa12f0c..0000000
--- a/automotive/vehicle/2.0/vts/Vehicle.vts
+++ /dev/null
@@ -1,115 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IVehicle"
-
-package: "android.hardware.automotive.vehicle"
-
-import: "android.hardware.automotive.vehicle@2.0::IVehicleCallback"
-import: "android.hardware.automotive.vehicle@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getAllPropConfigs"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
- }
- }
- }
-
- api: {
- name: "getPropConfigs"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
- }
-
- api: {
- name: "get"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- }
- }
-
- api: {
- name: "set"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- }
- }
-
- api: {
- name: "subscribe"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::IVehicleCallback"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::SubscribeOptions"
- }
- }
- }
-
- api: {
- name: "unsubscribe"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::IVehicleCallback"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "debugDump"
- return_type_hidl: {
- type: TYPE_STRING
- }
- }
-
-}
diff --git a/automotive/vehicle/2.0/vts/VehicleCallback.vts b/automotive/vehicle/2.0/vts/VehicleCallback.vts
deleted file mode 100644
index e4815d5..0000000
--- a/automotive/vehicle/2.0/vts/VehicleCallback.vts
+++ /dev/null
@@ -1,46 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IVehicleCallback"
-
-package: "android.hardware.automotive.vehicle"
-
-import: "android.hardware.automotive.vehicle@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "onPropertyEvent"
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- }
- }
- }
-
- api: {
- name: "onPropertySet"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- }
- }
-
- api: {
- name: "onPropertySetError"
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
-}
diff --git a/automotive/vehicle/2.0/vts/types.vts b/automotive/vehicle/2.0/vts/types.vts
deleted file mode 100644
index 3868c99..0000000
--- a/automotive/vehicle/2.0/vts/types.vts
+++ /dev/null
@@ -1,2780 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.automotive.vehicle"
-
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STRING"
- scalar_value: {
- int32_t: 1048576
- }
- enumerator: "BOOLEAN"
- scalar_value: {
- int32_t: 2097152
- }
- enumerator: "INT32"
- scalar_value: {
- int32_t: 4194304
- }
- enumerator: "INT32_VEC"
- scalar_value: {
- int32_t: 4259840
- }
- enumerator: "INT64"
- scalar_value: {
- int32_t: 5242880
- }
- enumerator: "FLOAT"
- scalar_value: {
- int32_t: 6291456
- }
- enumerator: "FLOAT_VEC"
- scalar_value: {
- int32_t: 6356992
- }
- enumerator: "BYTES"
- scalar_value: {
- int32_t: 7340032
- }
- enumerator: "COMPLEX"
- scalar_value: {
- int32_t: 14680064
- }
- enumerator: "MASK"
- scalar_value: {
- int32_t: 16711680
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleArea"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "GLOBAL"
- scalar_value: {
- int32_t: 16777216
- }
- enumerator: "ZONE"
- scalar_value: {
- int32_t: 33554432
- }
- enumerator: "WINDOW"
- scalar_value: {
- int32_t: 50331648
- }
- enumerator: "MIRROR"
- scalar_value: {
- int32_t: 67108864
- }
- enumerator: "SEAT"
- scalar_value: {
- int32_t: 83886080
- }
- enumerator: "DOOR"
- scalar_value: {
- int32_t: 100663296
- }
- enumerator: "MASK"
- scalar_value: {
- int32_t: 251658240
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyGroup"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SYSTEM"
- scalar_value: {
- int32_t: 268435456
- }
- enumerator: "VENDOR"
- scalar_value: {
- int32_t: 536870912
- }
- enumerator: "MASK"
- scalar_value: {
- int32_t: -268435456
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleProperty"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "INFO_VIN"
- scalar_value: {
- int32_t: 286261504
- }
- enumerator: "INFO_MAKE"
- scalar_value: {
- int32_t: 286261505
- }
- enumerator: "INFO_MODEL"
- scalar_value: {
- int32_t: 286261506
- }
- enumerator: "INFO_MODEL_YEAR"
- scalar_value: {
- int32_t: 289407235
- }
- enumerator: "INFO_FUEL_CAPACITY"
- scalar_value: {
- int32_t: 291504388
- }
- enumerator: "PERF_ODOMETER"
- scalar_value: {
- int32_t: 291504644
- }
- enumerator: "PERF_VEHICLE_SPEED"
- scalar_value: {
- int32_t: 291504647
- }
- enumerator: "ENGINE_COOLANT_TEMP"
- scalar_value: {
- int32_t: 291504897
- }
- enumerator: "ENGINE_OIL_TEMP"
- scalar_value: {
- int32_t: 291504900
- }
- enumerator: "ENGINE_RPM"
- scalar_value: {
- int32_t: 291504901
- }
- enumerator: "WHEEL_TICK"
- scalar_value: {
- int32_t: 291570438
- }
- enumerator: "GEAR_SELECTION"
- scalar_value: {
- int32_t: 289408000
- }
- enumerator: "CURRENT_GEAR"
- scalar_value: {
- int32_t: 289408001
- }
- enumerator: "PARKING_BRAKE_ON"
- scalar_value: {
- int32_t: 287310850
- }
- enumerator: "DRIVING_STATUS"
- scalar_value: {
- int32_t: 289408004
- }
- enumerator: "FUEL_LEVEL_LOW"
- scalar_value: {
- int32_t: 287310853
- }
- enumerator: "NIGHT_MODE"
- scalar_value: {
- int32_t: 287310855
- }
- enumerator: "TURN_SIGNAL_STATE"
- scalar_value: {
- int32_t: 289408008
- }
- enumerator: "IGNITION_STATE"
- scalar_value: {
- int32_t: 289408009
- }
- enumerator: "HVAC_FAN_SPEED"
- scalar_value: {
- int32_t: 306185472
- }
- enumerator: "HVAC_FAN_DIRECTION"
- scalar_value: {
- int32_t: 306185473
- }
- enumerator: "HVAC_TEMPERATURE_CURRENT"
- scalar_value: {
- int32_t: 308282626
- }
- enumerator: "HVAC_TEMPERATURE_SET"
- scalar_value: {
- int32_t: 308282627
- }
- enumerator: "HVAC_DEFROSTER"
- scalar_value: {
- int32_t: 320865540
- }
- enumerator: "HVAC_AC_ON"
- scalar_value: {
- int32_t: 304088325
- }
- enumerator: "HVAC_MAX_AC_ON"
- scalar_value: {
- int32_t: 304088326
- }
- enumerator: "HVAC_MAX_DEFROST_ON"
- scalar_value: {
- int32_t: 304088327
- }
- enumerator: "HVAC_RECIRC_ON"
- scalar_value: {
- int32_t: 304088328
- }
- enumerator: "HVAC_DUAL_ON"
- scalar_value: {
- int32_t: 304088329
- }
- enumerator: "HVAC_AUTO_ON"
- scalar_value: {
- int32_t: 304088330
- }
- enumerator: "HVAC_SEAT_TEMPERATURE"
- scalar_value: {
- int32_t: 356517131
- }
- enumerator: "HVAC_SIDE_MIRROR_HEAT"
- scalar_value: {
- int32_t: 339739916
- }
- enumerator: "HVAC_STEERING_WHEEL_TEMP"
- scalar_value: {
- int32_t: 289408269
- }
- enumerator: "HVAC_TEMPERATURE_UNITS"
- scalar_value: {
- int32_t: 306185486
- }
- enumerator: "HVAC_ACTUAL_FAN_SPEED_RPM"
- scalar_value: {
- int32_t: 306185487
- }
- enumerator: "HVAC_FAN_DIRECTION_AVAILABLE"
- scalar_value: {
- int32_t: 306185489
- }
- enumerator: "HVAC_POWER_ON"
- scalar_value: {
- int32_t: 304088336
- }
- enumerator: "ENV_OUTSIDE_TEMPERATURE"
- scalar_value: {
- int32_t: 291505923
- }
- enumerator: "ENV_CABIN_TEMPERATURE"
- scalar_value: {
- int32_t: 291505924
- }
- enumerator: "RADIO_PRESET"
- scalar_value: {
- int32_t: 289474561
- }
- enumerator: "AUDIO_FOCUS"
- scalar_value: {
- int32_t: 289474816
- }
- enumerator: "AUDIO_FOCUS_EXT_SYNC"
- scalar_value: {
- int32_t: 289474832
- }
- enumerator: "AUDIO_VOLUME"
- scalar_value: {
- int32_t: 289474817
- }
- enumerator: "AUDIO_VOLUME_EXT_SYNC"
- scalar_value: {
- int32_t: 289474833
- }
- enumerator: "AUDIO_VOLUME_LIMIT"
- scalar_value: {
- int32_t: 289474818
- }
- enumerator: "AUDIO_ROUTING_POLICY"
- scalar_value: {
- int32_t: 289474819
- }
- enumerator: "AUDIO_HW_VARIANT"
- scalar_value: {
- int32_t: 289409284
- }
- enumerator: "AUDIO_EXT_ROUTING_HINT"
- scalar_value: {
- int32_t: 289474821
- }
- enumerator: "AUDIO_STREAM_STATE"
- scalar_value: {
- int32_t: 289474822
- }
- enumerator: "AUDIO_PARAMETERS"
- scalar_value: {
- int32_t: 286263559
- }
- enumerator: "AP_POWER_STATE"
- scalar_value: {
- int32_t: 289475072
- }
- enumerator: "DISPLAY_BRIGHTNESS"
- scalar_value: {
- int32_t: 289409537
- }
- enumerator: "AP_POWER_BOOTUP_REASON"
- scalar_value: {
- int32_t: 289409538
- }
- enumerator: "HW_KEY_INPUT"
- scalar_value: {
- int32_t: 289475088
- }
- enumerator: "INSTRUMENT_CLUSTER_INFO"
- scalar_value: {
- int32_t: 289475104
- }
- enumerator: "UNIX_TIME"
- scalar_value: {
- int32_t: 290458160
- }
- enumerator: "CURRENT_TIME_IN_SECONDS"
- scalar_value: {
- int32_t: 289409585
- }
- enumerator: "DOOR_POS"
- scalar_value: {
- int32_t: 373295872
- }
- enumerator: "DOOR_MOVE"
- scalar_value: {
- int32_t: 373295873
- }
- enumerator: "DOOR_LOCK"
- scalar_value: {
- int32_t: 371198722
- }
- enumerator: "MIRROR_Z_POS"
- scalar_value: {
- int32_t: 339741504
- }
- enumerator: "MIRROR_Z_MOVE"
- scalar_value: {
- int32_t: 339741505
- }
- enumerator: "MIRROR_Y_POS"
- scalar_value: {
- int32_t: 339741506
- }
- enumerator: "MIRROR_Y_MOVE"
- scalar_value: {
- int32_t: 339741507
- }
- enumerator: "MIRROR_LOCK"
- scalar_value: {
- int32_t: 287312708
- }
- enumerator: "MIRROR_FOLD"
- scalar_value: {
- int32_t: 287312709
- }
- enumerator: "SEAT_MEMORY_SELECT"
- scalar_value: {
- int32_t: 356518784
- }
- enumerator: "SEAT_MEMORY_SET"
- scalar_value: {
- int32_t: 356518785
- }
- enumerator: "SEAT_BELT_BUCKLED"
- scalar_value: {
- int32_t: 354421634
- }
- enumerator: "SEAT_BELT_HEIGHT_POS"
- scalar_value: {
- int32_t: 356518787
- }
- enumerator: "SEAT_BELT_HEIGHT_MOVE"
- scalar_value: {
- int32_t: 356518788
- }
- enumerator: "SEAT_FORE_AFT_POS"
- scalar_value: {
- int32_t: 356518789
- }
- enumerator: "SEAT_FORE_AFT_MOVE"
- scalar_value: {
- int32_t: 356518790
- }
- enumerator: "SEAT_BACKREST_ANGLE_1_POS"
- scalar_value: {
- int32_t: 356518791
- }
- enumerator: "SEAT_BACKREST_ANGLE_1_MOVE"
- scalar_value: {
- int32_t: 356518792
- }
- enumerator: "SEAT_BACKREST_ANGLE_2_POS"
- scalar_value: {
- int32_t: 356518793
- }
- enumerator: "SEAT_BACKREST_ANGLE_2_MOVE"
- scalar_value: {
- int32_t: 356518794
- }
- enumerator: "SEAT_HEIGHT_POS"
- scalar_value: {
- int32_t: 356518795
- }
- enumerator: "SEAT_HEIGHT_MOVE"
- scalar_value: {
- int32_t: 356518796
- }
- enumerator: "SEAT_DEPTH_POS"
- scalar_value: {
- int32_t: 356518797
- }
- enumerator: "SEAT_DEPTH_MOVE"
- scalar_value: {
- int32_t: 356518798
- }
- enumerator: "SEAT_TILT_POS"
- scalar_value: {
- int32_t: 356518799
- }
- enumerator: "SEAT_TILT_MOVE"
- scalar_value: {
- int32_t: 356518800
- }
- enumerator: "SEAT_LUMBAR_FORE_AFT_POS"
- scalar_value: {
- int32_t: 356518801
- }
- enumerator: "SEAT_LUMBAR_FORE_AFT_MOVE"
- scalar_value: {
- int32_t: 356518802
- }
- enumerator: "SEAT_LUMBAR_SIDE_SUPPORT_POS"
- scalar_value: {
- int32_t: 356518803
- }
- enumerator: "SEAT_LUMBAR_SIDE_SUPPORT_MOVE"
- scalar_value: {
- int32_t: 356518804
- }
- enumerator: "SEAT_HEADREST_HEIGHT_POS"
- scalar_value: {
- int32_t: 289409941
- }
- enumerator: "SEAT_HEADREST_HEIGHT_MOVE"
- scalar_value: {
- int32_t: 356518806
- }
- enumerator: "SEAT_HEADREST_ANGLE_POS"
- scalar_value: {
- int32_t: 356518807
- }
- enumerator: "SEAT_HEADREST_ANGLE_MOVE"
- scalar_value: {
- int32_t: 356518808
- }
- enumerator: "SEAT_HEADREST_FORE_AFT_POS"
- scalar_value: {
- int32_t: 356518809
- }
- enumerator: "SEAT_HEADREST_FORE_AFT_MOVE"
- scalar_value: {
- int32_t: 356518810
- }
- enumerator: "WINDOW_POS"
- scalar_value: {
- int32_t: 289409984
- }
- enumerator: "WINDOW_MOVE"
- scalar_value: {
- int32_t: 289409985
- }
- enumerator: "WINDOW_VENT_POS"
- scalar_value: {
- int32_t: 289409986
- }
- enumerator: "WINDOW_VENT_MOVE"
- scalar_value: {
- int32_t: 289409987
- }
- enumerator: "WINDOW_LOCK"
- scalar_value: {
- int32_t: 287312836
- }
- enumerator: "VEHICLE_MAP_SERVICE"
- scalar_value: {
- int32_t: 299895808
- }
- enumerator: "OBD2_LIVE_FRAME"
- scalar_value: {
- int32_t: 299896064
- }
- enumerator: "OBD2_FREEZE_FRAME"
- scalar_value: {
- int32_t: 299896065
- }
- enumerator: "OBD2_FREEZE_FRAME_INFO"
- scalar_value: {
- int32_t: 299896066
- }
- enumerator: "OBD2_FREEZE_FRAME_CLEAR"
- scalar_value: {
- int32_t: 299896067
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleHvacFanDirection"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FACE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "FLOOR"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FACE_AND_FLOOR"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "DEFROST"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "DEFROST_AND_FLOOR"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleRadioConstants"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "VEHICLE_RADIO_PRESET_MIN_VALUE"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusRequest"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "REQUEST_GAIN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "REQUEST_GAIN_TRANSIENT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "REQUEST_GAIN_TRANSIENT_MAY_DUCK"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "REQUEST_GAIN_TRANSIENT_NO_DUCK"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "REQUEST_RELEASE"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusState"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STATE_GAIN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "STATE_GAIN_TRANSIENT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "STATE_LOSS_TRANSIENT_CAN_DUCK"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "STATE_LOSS_TRANSIENT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "STATE_LOSS"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "STATE_LOSS_TRANSIENT_EXLCUSIVE"
- scalar_value: {
- int32_t: 6
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioStreamFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STREAM0_FLAG"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "STREAM1_FLAG"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "STREAM2_FLAG"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioStream"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STREAM0"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "STREAM1"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioExtFocusFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE_FLAG"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "PERMANENT_FLAG"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "TRANSIENT_FLAG"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "PLAY_ONLY_FLAG"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "MUTE_MEDIA_FLAG"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioFocusIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FOCUS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "STREAMS"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "EXTERNAL_FOCUS_STATE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "AUDIO_CONTEXTS"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioContextFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "MUSIC_FLAG"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "NAVIGATION_FLAG"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VOICE_COMMAND_FLAG"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "CALL_FLAG"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "ALARM_FLAG"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "NOTIFICATION_FLAG"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "UNKNOWN_FLAG"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "SAFETY_ALERT_FLAG"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "CD_ROM_FLAG"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "AUX_AUDIO_FLAG"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "SYSTEM_SOUND_FLAG"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "RADIO_FLAG"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "EXT_SOURCE_FLAG"
- scalar_value: {
- int32_t: 4096
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeCapabilityFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "PERSISTENT_STORAGE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "MASTER_VOLUME_ONLY"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeState"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STATE_OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "LIMIT_REACHED"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INDEX_STREAM"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "INDEX_VOLUME"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "INDEX_STATE"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioVolumeLimitIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STREAM"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "MAX_VOLUME"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioRoutingPolicyIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STREAM"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "CONTEXTS"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAudioHwVariantConfigFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INTERNAL_RADIO_FLAG"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateConfigFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ENABLE_DEEP_SLEEP_FLAG"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CONFIG_SUPPORT_TIMER_POWER_ON_FLAG"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerState"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OFF"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "DEEP_SLEEP"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ON_DISP_OFF"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ON_FULL"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "SHUTDOWN_PREPARE"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateShutdownParam"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SHUTDOWN_IMMEDIATELY"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CAN_SLEEP"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SHUTDOWN_ONLY"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerSetState"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "BOOT_COMPLETE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DEEP_SLEEP_ENTRY"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "DEEP_SLEEP_EXIT"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "SHUTDOWN_POSTPONE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "SHUTDOWN_START"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "DISPLAY_OFF"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "DISPLAY_ON"
- scalar_value: {
- int32_t: 7
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerStateIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STATE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ADDITIONAL"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleApPowerBootupReason"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "USER_POWER_ON"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "USER_UNLOCK"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "TIMER"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleHwKeyInputAction"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ACTION_DOWN"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ACTION_UP"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleDisplay"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "MAIN"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "INSTRUMENT_CLUSTER"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleInstrumentClusterType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "HAL_INTERFACE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "EXTERNAL_DISPLAY"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleUnit"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SHOULD_NOT_USE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "METER_PER_SEC"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "RPM"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "HERTZ"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "PERCENTILE"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "MILLIMETER"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "METER"
- scalar_value: {
- int32_t: 33
- }
- enumerator: "KILOMETER"
- scalar_value: {
- int32_t: 35
- }
- enumerator: "CELSIUS"
- scalar_value: {
- int32_t: 48
- }
- enumerator: "FAHRENHEIT"
- scalar_value: {
- int32_t: 49
- }
- enumerator: "KELVIN"
- scalar_value: {
- int32_t: 50
- }
- enumerator: "MILLILITER"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "NANO_SECS"
- scalar_value: {
- int32_t: 80
- }
- enumerator: "SECS"
- scalar_value: {
- int32_t: 83
- }
- enumerator: "YEAR"
- scalar_value: {
- int32_t: 89
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyChangeMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STATIC"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ON_CHANGE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CONTINUOUS"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "POLL"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ON_SET"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyAccess"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "READ"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "WRITE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "READ_WRITE"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleDrivingStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNRESTRICTED"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NO_VIDEO"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "NO_KEYBOARD_INPUT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "NO_VOICE_INPUT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "NO_CONFIG"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "LIMIT_MESSAGE_LEN"
- scalar_value: {
- int32_t: 16
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleGear"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "GEAR_NEUTRAL"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "GEAR_REVERSE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "GEAR_PARK"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "GEAR_DRIVE"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "GEAR_LOW"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "GEAR_1"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "GEAR_2"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "GEAR_3"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "GEAR_4"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "GEAR_5"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "GEAR_6"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "GEAR_7"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "GEAR_8"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "GEAR_9"
- scalar_value: {
- int32_t: 4096
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaZone"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ROW_1_LEFT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ROW_1_CENTER"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ROW_1_RIGHT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ROW_1"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "ROW_2_LEFT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "ROW_2_CENTER"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "ROW_2_RIGHT"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "ROW_2"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "ROW_3_LEFT"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "ROW_3_CENTER"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "ROW_3_RIGHT"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "ROW_3"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "ROW_4_LEFT"
- scalar_value: {
- int32_t: 4096
- }
- enumerator: "ROW_4_CENTER"
- scalar_value: {
- int32_t: 8192
- }
- enumerator: "ROW_4_RIGHT"
- scalar_value: {
- int32_t: 16384
- }
- enumerator: "ROW_4"
- scalar_value: {
- int32_t: 32768
- }
- enumerator: "WHOLE_CABIN"
- scalar_value: {
- int32_t: -2147483648
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaSeat"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ROW_1_LEFT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ROW_1_CENTER"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ROW_1_RIGHT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ROW_2_LEFT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "ROW_2_CENTER"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "ROW_2_RIGHT"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "ROW_3_LEFT"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "ROW_3_CENTER"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "ROW_3_RIGHT"
- scalar_value: {
- int32_t: 1024
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaWindow"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FRONT_WINDSHIELD"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "REAR_WINDSHIELD"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ROOF_TOP"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ROW_1_LEFT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "ROW_1_RIGHT"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "ROW_2_LEFT"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "ROW_2_RIGHT"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "ROW_3_LEFT"
- scalar_value: {
- int32_t: 4096
- }
- enumerator: "ROW_3_RIGHT"
- scalar_value: {
- int32_t: 8192
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaDoor"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ROW_1_LEFT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ROW_1_RIGHT"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ROW_2_LEFT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "ROW_2_RIGHT"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "ROW_3_LEFT"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "ROW_3_RIGHT"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "HOOD"
- scalar_value: {
- int32_t: 268435456
- }
- enumerator: "REAR"
- scalar_value: {
- int32_t: 536870912
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaMirror"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "DRIVER_LEFT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DRIVER_RIGHT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "DRIVER_CENTER"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleTurnSignal"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "RIGHT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "LEFT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "EMERGENCY"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaConfig"
- type: TYPE_STRUCT
- struct_value: {
- name: "areaId"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "minInt32Value"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "maxInt32Value"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "minInt64Value"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "maxInt64Value"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "minFloatValue"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "maxFloatValue"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropConfig"
- type: TYPE_STRUCT
- struct_value: {
- name: "prop"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "access"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyAccess"
- }
- struct_value: {
- name: "changeMode"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyChangeMode"
- }
- struct_value: {
- name: "supportedAreas"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "areaConfigs"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehicleAreaConfig"
- }
- }
- struct_value: {
- name: "configFlags"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "configArray"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
- struct_value: {
- name: "configString"
- type: TYPE_STRING
- }
- struct_value: {
- name: "minSampleRate"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "maxSampleRate"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue"
- type: TYPE_STRUCT
- sub_struct: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue::RawValue"
- type: TYPE_STRUCT
- struct_value: {
- name: "int32Values"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
- struct_value: {
- name: "floatValues"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- }
- struct_value: {
- name: "int64Values"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- }
- struct_value: {
- name: "bytes"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- struct_value: {
- name: "stringValue"
- type: TYPE_STRING
- }
- }
- struct_value: {
- name: "prop"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "timestamp"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "areaId"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "value"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::VehiclePropValue::RawValue"
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehicleIgnitionState"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNDEFINED"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "LOCK"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "OFF"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ACC"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ON"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "START"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VehiclePropertyOperation"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "GENERIC"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SET"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "GET"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SUBSCRIBE"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::SubscribeFlags"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNDEFINED"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "HAL_EVENT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "SET_CALL"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "DEFAULT"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::SubscribeOptions"
- type: TYPE_STRUCT
- struct_value: {
- name: "propId"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "vehicleAreas"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "sampleRate"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "flags"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::automotive::vehicle::V2_0::SubscribeFlags"
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::StatusCode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "TRY_AGAIN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "INVALID_ARG"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "NOT_AVAILABLE"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ACCESS_DENIED"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "INTERNAL_ERROR"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::FuelSystemStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OPEN_INSUFFICIENT_ENGINE_TEMPERATURE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CLOSED_LOOP"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "OPEN_ENGINE_LOAD_OR_DECELERATION"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "OPEN_SYSTEM_FAILURE"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "CLOSED_LOOP_BUT_FEEDBACK_FAULT"
- scalar_value: {
- int32_t: 16
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::IgnitionMonitorKind"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SPARK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "COMPRESSION"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::CommonIgnitionMonitors"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "COMPONENTS_AVAILABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "COMPONENTS_INCOMPLETE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FUEL_SYSTEM_AVAILABLE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "FUEL_SYSTEM_INCOMPLETE"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "MISFIRE_AVAILABLE"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "MISFIRE_INCOMPLETE"
- scalar_value: {
- int32_t: 32
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::SparkIgnitionMonitors"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "COMPONENTS_AVAILABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "COMPONENTS_INCOMPLETE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FUEL_SYSTEM_AVAILABLE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "FUEL_SYSTEM_INCOMPLETE"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "MISFIRE_AVAILABLE"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "MISFIRE_INCOMPLETE"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "EGR_AVAILABLE"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "EGR_INCOMPLETE"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "OXYGEN_SENSOR_HEATER_AVAILABLE"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "OXYGEN_SENSOR_HEATER_INCOMPLETE"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "OXYGEN_SENSOR_AVAILABLE"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "OXYGEN_SENSOR_INCOMPLETE"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "AC_REFRIGERANT_AVAILABLE"
- scalar_value: {
- int32_t: 4096
- }
- enumerator: "AC_REFRIGERANT_INCOMPLETE"
- scalar_value: {
- int32_t: 8192
- }
- enumerator: "SECONDARY_AIR_SYSTEM_AVAILABLE"
- scalar_value: {
- int32_t: 16384
- }
- enumerator: "SECONDARY_AIR_SYSTEM_INCOMPLETE"
- scalar_value: {
- int32_t: 32768
- }
- enumerator: "EVAPORATIVE_SYSTEM_AVAILABLE"
- scalar_value: {
- int32_t: 65536
- }
- enumerator: "EVAPORATIVE_SYSTEM_INCOMPLETE"
- scalar_value: {
- int32_t: 131072
- }
- enumerator: "HEATED_CATALYST_AVAILABLE"
- scalar_value: {
- int32_t: 262144
- }
- enumerator: "HEATED_CATALYST_INCOMPLETE"
- scalar_value: {
- int32_t: 524288
- }
- enumerator: "CATALYST_AVAILABLE"
- scalar_value: {
- int32_t: 1048576
- }
- enumerator: "CATALYST_INCOMPLETE"
- scalar_value: {
- int32_t: 2097152
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::CompressionIgnitionMonitors"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "COMPONENTS_AVAILABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "COMPONENTS_INCOMPLETE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FUEL_SYSTEM_AVAILABLE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "FUEL_SYSTEM_INCOMPLETE"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "MISFIRE_AVAILABLE"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "MISFIRE_INCOMPLETE"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "EGR_OR_VVT_AVAILABLE"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "EGR_OR_VVT_INCOMPLETE"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "PM_FILTER_AVAILABLE"
- scalar_value: {
- int32_t: 256
- }
- enumerator: "PM_FILTER_INCOMPLETE"
- scalar_value: {
- int32_t: 512
- }
- enumerator: "EXHAUST_GAS_SENSOR_AVAILABLE"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "EXHAUST_GAS_SENSOR_INCOMPLETE"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "BOOST_PRESSURE_AVAILABLE"
- scalar_value: {
- int32_t: 4096
- }
- enumerator: "BOOST_PRESSURE_INCOMPLETE"
- scalar_value: {
- int32_t: 8192
- }
- enumerator: "NOx_SCR__AVAILABLE"
- scalar_value: {
- int32_t: 16384
- }
- enumerator: "NOx_SCR_INCOMPLETE"
- scalar_value: {
- int32_t: 32768
- }
- enumerator: "NMHC_CATALYST_AVAILABLE"
- scalar_value: {
- int32_t: 65536
- }
- enumerator: "NMHC_CATALYST_INCOMPLETE"
- scalar_value: {
- int32_t: 131072
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::Wheel"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNKNOWN"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "LEFT_FRONT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "RIGHT_FRONT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "LEFT_REAR"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "RIGHT_REAR"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::SecondaryAirStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UPSTREAM"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DOWNSTREAM_OF_CATALYCIC_CONVERTER"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FROM_OUTSIDE_OR_OFF"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "PUMP_ON_FOR_DIAGNOSTICS"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::FuelType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NOT_AVAILABLE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "GASOLINE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "METHANOL"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ETHANOL"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "DIESEL"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "LPG"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "CNG"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "PROPANE"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "ELECTRIC"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "BIFUEL_RUNNING_GASOLINE"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "BIFUEL_RUNNING_METHANOL"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "BIFUEL_RUNNING_ETHANOL"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "BIFUEL_RUNNING_LPG"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "BIFUEL_RUNNING_CNG"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "BIFUEL_RUNNING_PROPANE"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "BIFUEL_RUNNING_ELECTRIC"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "BIFUEL_RUNNING_ELECTRIC_AND_COMBUSTION"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "HYBRID_GASOLINE"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "HYBRID_ETHANOL"
- scalar_value: {
- int32_t: 18
- }
- enumerator: "HYBRID_DIESEL"
- scalar_value: {
- int32_t: 19
- }
- enumerator: "HYBRID_ELECTRIC"
- scalar_value: {
- int32_t: 20
- }
- enumerator: "HYBRID_RUNNING_ELECTRIC_AND_COMBUSTION"
- scalar_value: {
- int32_t: 21
- }
- enumerator: "HYBRID_REGENERATIVE"
- scalar_value: {
- int32_t: 22
- }
- enumerator: "BIFUEL_RUNNING_DIESEL"
- scalar_value: {
- int32_t: 23
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::Obd2IntegerSensorIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FUEL_SYSTEM_STATUS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "MALFUNCTION_INDICATOR_LIGHT_ON"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "IGNITION_MONITORS_SUPPORTED"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "IGNITION_SPECIFIC_MONITORS"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "INTAKE_AIR_TEMPERATURE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "COMMANDED_SECONDARY_AIR_STATUS"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "NUM_OXYGEN_SENSORS_PRESENT"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "RUNTIME_SINCE_ENGINE_START"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "DISTANCE_TRAVELED_WITH_MALFUNCTION_INDICATOR_LIGHT_ON"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "WARMUPS_SINCE_CODES_CLEARED"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "DISTANCE_TRAVELED_SINCE_CODES_CLEARED"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "ABSOLUTE_BAROMETRIC_PRESSURE"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "CONTROL_MODULE_VOLTAGE"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "AMBIENT_AIR_TEMPERATURE"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "TIME_WITH_MALFUNCTION_LIGHT_ON"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "TIME_SINCE_TROUBLE_CODES_CLEARED"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "MAX_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "MAX_OXYGEN_SENSOR_VOLTAGE"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "MAX_OXYGEN_SENSOR_CURRENT"
- scalar_value: {
- int32_t: 18
- }
- enumerator: "MAX_INTAKE_MANIFOLD_ABSOLUTE_PRESSURE"
- scalar_value: {
- int32_t: 19
- }
- enumerator: "MAX_AIR_FLOW_RATE_FROM_MASS_AIR_FLOW_SENSOR"
- scalar_value: {
- int32_t: 20
- }
- enumerator: "FUEL_TYPE"
- scalar_value: {
- int32_t: 21
- }
- enumerator: "FUEL_RAIL_ABSOLUTE_PRESSURE"
- scalar_value: {
- int32_t: 22
- }
- enumerator: "ENGINE_OIL_TEMPERATURE"
- scalar_value: {
- int32_t: 23
- }
- enumerator: "DRIVER_DEMAND_PERCENT_TORQUE"
- scalar_value: {
- int32_t: 24
- }
- enumerator: "ENGINE_ACTUAL_PERCENT_TORQUE"
- scalar_value: {
- int32_t: 25
- }
- enumerator: "ENGINE_REFERENCE_PERCENT_TORQUE"
- scalar_value: {
- int32_t: 26
- }
- enumerator: "ENGINE_PERCENT_TORQUE_DATA_IDLE"
- scalar_value: {
- int32_t: 27
- }
- enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT1"
- scalar_value: {
- int32_t: 28
- }
- enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT2"
- scalar_value: {
- int32_t: 29
- }
- enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT3"
- scalar_value: {
- int32_t: 30
- }
- enumerator: "ENGINE_PERCENT_TORQUE_DATA_POINT4"
- scalar_value: {
- int32_t: 31
- }
- enumerator: "LAST_SYSTEM_INDEX"
- scalar_value: {
- int32_t: 31
- }
- enumerator: "VENDOR_START_INDEX"
- scalar_value: {
- int32_t: 32
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::Obd2FloatSensorIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "CALCULATED_ENGINE_LOAD"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ENGINE_COOLANT_TEMPERATURE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "SHORT_TERM_FUEL_TRIM_BANK1"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "LONG_TERM_FUEL_TRIM_BANK1"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "SHORT_TERM_FUEL_TRIM_BANK2"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "LONG_TERM_FUEL_TRIM_BANK2"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "FUEL_PRESSURE"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "INTAKE_MANIFOLD_ABSOLUTE_PRESSURE"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "ENGINE_RPM"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "VEHICLE_SPEED"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "TIMING_ADVANCE"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "MAF_AIR_FLOW_RATE"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "THROTTLE_POSITION"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "OXYGEN_SENSOR1_VOLTAGE"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "OXYGEN_SENSOR1_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "OXYGEN_SENSOR1_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "OXYGEN_SENSOR2_VOLTAGE"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "OXYGEN_SENSOR2_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "OXYGEN_SENSOR2_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 18
- }
- enumerator: "OXYGEN_SENSOR3_VOLTAGE"
- scalar_value: {
- int32_t: 19
- }
- enumerator: "OXYGEN_SENSOR3_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 20
- }
- enumerator: "OXYGEN_SENSOR3_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 21
- }
- enumerator: "OXYGEN_SENSOR4_VOLTAGE"
- scalar_value: {
- int32_t: 22
- }
- enumerator: "OXYGEN_SENSOR4_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 23
- }
- enumerator: "OXYGEN_SENSOR4_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 24
- }
- enumerator: "OXYGEN_SENSOR5_VOLTAGE"
- scalar_value: {
- int32_t: 25
- }
- enumerator: "OXYGEN_SENSOR5_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 26
- }
- enumerator: "OXYGEN_SENSOR5_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 27
- }
- enumerator: "OXYGEN_SENSOR6_VOLTAGE"
- scalar_value: {
- int32_t: 28
- }
- enumerator: "OXYGEN_SENSOR6_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 29
- }
- enumerator: "OXYGEN_SENSOR6_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 30
- }
- enumerator: "OXYGEN_SENSOR7_VOLTAGE"
- scalar_value: {
- int32_t: 31
- }
- enumerator: "OXYGEN_SENSOR7_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "OXYGEN_SENSOR7_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 33
- }
- enumerator: "OXYGEN_SENSOR8_VOLTAGE"
- scalar_value: {
- int32_t: 34
- }
- enumerator: "OXYGEN_SENSOR8_SHORT_TERM_FUEL_TRIM"
- scalar_value: {
- int32_t: 35
- }
- enumerator: "OXYGEN_SENSOR8_FUEL_AIR_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 36
- }
- enumerator: "FUEL_RAIL_PRESSURE"
- scalar_value: {
- int32_t: 37
- }
- enumerator: "FUEL_RAIL_GAUGE_PRESSURE"
- scalar_value: {
- int32_t: 38
- }
- enumerator: "COMMANDED_EXHAUST_GAS_RECIRCULATION"
- scalar_value: {
- int32_t: 39
- }
- enumerator: "EXHAUST_GAS_RECIRCULATION_ERROR"
- scalar_value: {
- int32_t: 40
- }
- enumerator: "COMMANDED_EVAPORATIVE_PURGE"
- scalar_value: {
- int32_t: 41
- }
- enumerator: "FUEL_TANK_LEVEL_INPUT"
- scalar_value: {
- int32_t: 42
- }
- enumerator: "EVAPORATION_SYSTEM_VAPOR_PRESSURE"
- scalar_value: {
- int32_t: 43
- }
- enumerator: "CATALYST_TEMPERATURE_BANK1_SENSOR1"
- scalar_value: {
- int32_t: 44
- }
- enumerator: "CATALYST_TEMPERATURE_BANK2_SENSOR1"
- scalar_value: {
- int32_t: 45
- }
- enumerator: "CATALYST_TEMPERATURE_BANK1_SENSOR2"
- scalar_value: {
- int32_t: 46
- }
- enumerator: "CATALYST_TEMPERATURE_BANK2_SENSOR2"
- scalar_value: {
- int32_t: 47
- }
- enumerator: "ABSOLUTE_LOAD_VALUE"
- scalar_value: {
- int32_t: 48
- }
- enumerator: "FUEL_AIR_COMMANDED_EQUIVALENCE_RATIO"
- scalar_value: {
- int32_t: 49
- }
- enumerator: "RELATIVE_THROTTLE_POSITION"
- scalar_value: {
- int32_t: 50
- }
- enumerator: "ABSOLUTE_THROTTLE_POSITION_B"
- scalar_value: {
- int32_t: 51
- }
- enumerator: "ABSOLUTE_THROTTLE_POSITION_C"
- scalar_value: {
- int32_t: 52
- }
- enumerator: "ACCELERATOR_PEDAL_POSITION_D"
- scalar_value: {
- int32_t: 53
- }
- enumerator: "ACCELERATOR_PEDAL_POSITION_E"
- scalar_value: {
- int32_t: 54
- }
- enumerator: "ACCELERATOR_PEDAL_POSITION_F"
- scalar_value: {
- int32_t: 55
- }
- enumerator: "COMMANDED_THROTTLE_ACTUATOR"
- scalar_value: {
- int32_t: 56
- }
- enumerator: "ETHANOL_FUEL_PERCENTAGE"
- scalar_value: {
- int32_t: 57
- }
- enumerator: "ABSOLUTE_EVAPORATION_SYSTEM_VAPOR_PRESSURE"
- scalar_value: {
- int32_t: 58
- }
- enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1"
- scalar_value: {
- int32_t: 59
- }
- enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2"
- scalar_value: {
- int32_t: 60
- }
- enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3"
- scalar_value: {
- int32_t: 61
- }
- enumerator: "SHORT_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4"
- scalar_value: {
- int32_t: 62
- }
- enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK1"
- scalar_value: {
- int32_t: 63
- }
- enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK2"
- scalar_value: {
- int32_t: 64
- }
- enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK3"
- scalar_value: {
- int32_t: 65
- }
- enumerator: "LONG_TERM_SECONDARY_OXYGEN_SENSOR_TRIM_BANK4"
- scalar_value: {
- int32_t: 66
- }
- enumerator: "RELATIVE_ACCELERATOR_PEDAL_POSITION"
- scalar_value: {
- int32_t: 67
- }
- enumerator: "HYBRID_BATTERY_PACK_REMAINING_LIFE"
- scalar_value: {
- int32_t: 68
- }
- enumerator: "FUEL_INJECTION_TIMING"
- scalar_value: {
- int32_t: 69
- }
- enumerator: "ENGINE_FUEL_RATE"
- scalar_value: {
- int32_t: 70
- }
- enumerator: "LAST_SYSTEM_INDEX"
- scalar_value: {
- int32_t: 70
- }
- enumerator: "VENDOR_START_INDEX"
- scalar_value: {
- int32_t: 71
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VmsMessageType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SUBSCRIBE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "UNSUBSCRIBE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "DATA"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::automotive::vehicle::V2_0::VmsMessageIntegerValuesIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "VMS_MESSAGE_TYPE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "VMS_LAYER_ID"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VMS_LAYER_VERSION"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
diff --git a/automotive/vehicle/2.1/Android.mk b/automotive/vehicle/2.1/Android.mk
index 2a8d1dd..f5a121d 100644
--- a/automotive/vehicle/2.1/Android.mk
+++ b/automotive/vehicle/2.1/Android.mk
@@ -18,6 +18,177 @@
#
+# 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
@@ -73,6 +244,177 @@
#
+# 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
diff --git a/automotive/vehicle/2.1/default/Android.mk b/automotive/vehicle/2.1/default/Android.mk
index 5956743..3075956 100644
--- a/automotive/vehicle/2.1/default/Android.mk
+++ b/automotive/vehicle/2.1/default/Android.mk
@@ -18,17 +18,47 @@
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_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 := \
+ libbinder \
+ 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/DefaultVehicleHal.cpp \
LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/impl/vhal_v2_1
+ $(LOCAL_PATH)/impl/vhal_v2_1 \
+ $(LOCAL_PATH)/common/include
LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/impl
+ $(LOCAL_PATH)/impl \
+ $(LOCAL_PATH)/common/include
# LOCAL_WHOLE_STATIC_LIBRARIES := \
@@ -36,6 +66,7 @@
LOCAL_STATIC_LIBRARIES := \
$(vhal_v2_0)-default-impl-lib \
$(vhal_v2_0)-manager-lib \
+ $(vhal_v2_1)-manager-lib \
$(vhal_v2_0)-libproto-native
LOCAL_SHARED_LIBRARIES := \
@@ -72,6 +103,7 @@
$(vhal_v2_0)-manager-lib \
$(vhal_v2_0)-default-impl-lib \
$(vhal_v2_1)-default-impl-lib \
+ $(vhal_v2_1)-manager-lib \
LOCAL_SHARED_LIBRARIES := \
libbase \
diff --git a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h b/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
similarity index 80%
rename from automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
rename to automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
index fe231be..945e3e0 100644
--- a/automotive/vehicle/2.0/default/common/include/vhal_v2_0/Obd2SensorStore.h
+++ b/automotive/vehicle/2.1/default/common/include/vhal_v2_1/Obd2SensorStore.h
@@ -14,18 +14,18 @@
* limitations under the License.
*/
-#ifndef android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
-#define android_hardware_automotive_vehicle_V2_0_Obd2SensorStore_H_
+#ifndef android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
+#define android_hardware_automotive_vehicle_V2_1_Obd2SensorStore_H_
#include <vector>
-#include "VehicleHal.h"
+#include <android/hardware/automotive/vehicle/2.1/types.h>
namespace android {
namespace hardware {
namespace automotive {
namespace vehicle {
-namespace V2_0 {
+namespace V2_1 {
// This class wraps all the logic required to create an OBD2 frame.
// It allows storing sensor values, setting appropriate bitmasks as needed,
@@ -38,14 +38,14 @@
size_t numVendorFloatSensors);
// Stores an integer-valued sensor.
- StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value);
+ V2_0::StatusCode setIntegerSensor(Obd2IntegerSensorIndex index, int32_t value);
// Stores an integer-valued sensor.
- StatusCode setIntegerSensor(size_t index, int32_t value);
+ V2_0::StatusCode setIntegerSensor(size_t index, int32_t value);
// Stores a float-valued sensor.
- StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value);
+ V2_0::StatusCode setFloatSensor(Obd2FloatSensorIndex index, float value);
// Stores a float-valued sensor.
- StatusCode setFloatSensor(size_t index, float value);
+ V2_0::StatusCode setFloatSensor(size_t index, float value);
// Returns a vector that contains all integer sensors stored.
const std::vector<int32_t>& getIntegerSensors() const;
@@ -55,7 +55,7 @@
const std::vector<uint8_t>& getSensorsBitmask() const;
// Given a stringValue, fill in a VehiclePropValue
- void fillPropValue(VehiclePropValue *propValue,
+ void fillPropValue(V2_0::VehiclePropValue *propValue,
std::string dtc) const;
private:
@@ -77,7 +77,7 @@
BitmaskInVector mSensorsBitmask;
};
-} // namespace V2_0
+} // namespace V2_1
} // namespace vehicle
} // namespace automotive
} // namespace hardware
diff --git a/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp b/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
similarity index 79%
rename from automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
rename to automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
index 4ee0a71..b07717b 100644
--- a/automotive/vehicle/2.0/default/common/src/Obd2SensorStore.cpp
+++ b/automotive/vehicle/2.1/default/common/src/Obd2SensorStore.cpp
@@ -23,7 +23,7 @@
namespace hardware {
namespace automotive {
namespace vehicle {
-namespace V2_0 {
+namespace V2_1 {
Obd2SensorStore::BitmaskInVector::BitmaskInVector(size_t numBits)
{
@@ -57,8 +57,8 @@
Obd2SensorStore::Obd2SensorStore(size_t numVendorIntegerSensors,
size_t numVendorFloatSensors) {
// because the last index is valid *inclusive*
- const size_t numSystemIntegerSensors = toInt(Obd2IntegerSensorIndex::LAST_SYSTEM_INDEX)+1;
- const size_t numSystemFloatSensors = toInt(Obd2FloatSensorIndex::LAST_SYSTEM_INDEX)+1;
+ 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<int32_t>(
numSystemIntegerSensors+numVendorIntegerSensors, 0);
mFloatSensors = std::vector<float>(
@@ -66,25 +66,25 @@
mSensorsBitmask.resize(mIntegerSensors.size()+mFloatSensors.size());
}
-StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index,
+V2_0::StatusCode Obd2SensorStore::setIntegerSensor(Obd2IntegerSensorIndex index,
int32_t value) {
- return setIntegerSensor(toInt(index), value);
+ return setIntegerSensor(V2_0::toInt(index), value);
}
-StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index,
+V2_0::StatusCode Obd2SensorStore::setFloatSensor(Obd2FloatSensorIndex index,
float value) {
- return setFloatSensor(toInt(index), value);
+ return setFloatSensor(V2_0::toInt(index), value);
}
-StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
+V2_0::StatusCode Obd2SensorStore::setIntegerSensor(size_t index, int32_t value) {
mIntegerSensors[index] = value;
mSensorsBitmask.set(index, true);
- return StatusCode::OK;
+ return V2_0::StatusCode::OK;
}
-StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
+V2_0::StatusCode Obd2SensorStore::setFloatSensor(size_t index, float value) {
mFloatSensors[index] = value;
mSensorsBitmask.set(index + mIntegerSensors.size(), true);
- return StatusCode::OK;
+ return V2_0::StatusCode::OK;
}
const std::vector<int32_t>& Obd2SensorStore::getIntegerSensors() const {
@@ -99,7 +99,7 @@
return mSensorsBitmask.getBitmask();
}
-void Obd2SensorStore::fillPropValue(VehiclePropValue *propValue,
+void Obd2SensorStore::fillPropValue(V2_0::VehiclePropValue *propValue,
std::string dtc) const {
propValue->timestamp = elapsedRealtimeNano();
propValue->value.int32Values = getIntegerSensors();
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
index ab08cec..769ae6d 100644
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultConfig.h
@@ -33,6 +33,32 @@
.prop = V2_0::toInt(V2_1::VehicleProperty::WHEEL_TICK),
.access = V2_0::VehiclePropertyAccess::READ,
.changeMode = V2_0::VehiclePropertyChangeMode::CONTINUOUS,
+ },
+
+ {
+ .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME),
+ .access = V2_0::VehiclePropertyAccess::READ,
+ .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0,0}
+ },
+
+ {
+ .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME),
+ .access = V2_0::VehiclePropertyAccess::READ,
+ .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE,
+ .configArray = {0,0}
+ },
+
+ {
+ .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_INFO),
+ .access = V2_0::VehiclePropertyAccess::READ,
+ .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
+ },
+
+ {
+ .prop = V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_CLEAR),
+ .access = V2_0::VehiclePropertyAccess::WRITE,
+ .changeMode = V2_0::VehiclePropertyChangeMode::ON_CHANGE
}
};
diff --git a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp
new file mode 100644
index 0000000..dc96bf9
--- /dev/null
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.cpp
@@ -0,0 +1,284 @@
+/*
+ * 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 <android/log.h>
+
+#include <algorithm>
+#include <netinet/in.h>
+#include <sys/socket.h>
+
+#include "DefaultVehicleHal.h"
+#include "VehicleHalProto.pb.h"
+
+#define DEBUG_SOCKET (33452)
+
+namespace android {
+namespace hardware {
+namespace automotive {
+namespace vehicle {
+namespace V2_1 {
+
+namespace impl {
+
+static std::unique_ptr<Obd2SensorStore> fillDefaultObd2Frame(
+ size_t numVendorIntegerSensors,
+ size_t numVendorFloatSensors) {
+ std::unique_ptr<Obd2SensorStore> 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 DefaultVehicleHal::initObd2LiveFrame(V2_0::VehiclePropConfig& propConfig) {
+ auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
+ propConfig.configArray[1]);
+ mLiveObd2Frame = createVehiclePropValue(
+ V2_0::VehiclePropertyType::COMPLEX, 0);
+ sensorStore->fillPropValue(mLiveObd2Frame.get(), "");
+}
+
+void DefaultVehicleHal::initObd2FreezeFrame(V2_0::VehiclePropConfig& propConfig) {
+ auto sensorStore = fillDefaultObd2Frame(propConfig.configArray[0],
+ propConfig.configArray[1]);
+
+ mFreezeObd2Frames.push_back(
+ createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+ mFreezeObd2Frames.push_back(
+ createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+ mFreezeObd2Frames.push_back(
+ createVehiclePropValue(V2_0::VehiclePropertyType::COMPLEX,0));
+
+ sensorStore->fillPropValue(mFreezeObd2Frames[0].get(), "P0070");
+ sensorStore->fillPropValue(mFreezeObd2Frames[1].get(), "P0102");
+ sensorStore->fillPropValue(mFreezeObd2Frames[2].get(), "P0123");
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2LiveFrame(V2_0::VehiclePropValue* v) {
+ v->prop = V2_0::toInt(VehicleProperty::OBD2_LIVE_FRAME);
+ v->value.int32Values = mLiveObd2Frame->value.int32Values;
+ v->value.floatValues = mLiveObd2Frame->value.floatValues;
+ v->value.bytes = mLiveObd2Frame->value.bytes;
+ return V2_0::StatusCode::OK;
+}
+
+template<typename Iterable>
+typename Iterable::const_iterator findPropValueAtTimestamp(
+ const Iterable& frames,
+ int64_t timestamp) {
+ return std::find_if(frames.begin(),
+ frames.end(),
+ [timestamp] (const std::unique_ptr<V2_0::VehiclePropValue>&
+ propValue) -> bool {
+ return propValue->timestamp == timestamp;
+ });
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2FreezeFrame(
+ const V2_0::VehiclePropValue& requestedPropValue,
+ V2_0::VehiclePropValue* v) {
+ 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 freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
+ timestamp);
+ if(mFreezeObd2Frames.end() == freezeFrameIter) {
+ ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+ return V2_0::StatusCode::INVALID_ARG;
+ }
+ const auto& freezeFrame = *freezeFrameIter;
+ v->prop = V2_0::toInt(VehicleProperty::OBD2_FREEZE_FRAME);
+ v->value.int32Values = freezeFrame->value.int32Values;
+ v->value.floatValues = freezeFrame->value.floatValues;
+ v->value.bytes = freezeFrame->value.bytes;
+ v->value.stringValue = freezeFrame->value.stringValue;
+ v->timestamp = freezeFrame->timestamp;
+ return V2_0::StatusCode::OK;
+}
+
+V2_0::StatusCode DefaultVehicleHal::clearObd2FreezeFrames(
+ const V2_0::VehiclePropValue& propValue) {
+ if (propValue.value.int64Values.size() == 0) {
+ mFreezeObd2Frames.clear();
+ return V2_0::StatusCode::OK;
+ } else {
+ for(int64_t timestamp: propValue.value.int64Values) {
+ auto freezeFrameIter = findPropValueAtTimestamp(mFreezeObd2Frames,
+ timestamp);
+ if(mFreezeObd2Frames.end() == freezeFrameIter) {
+ ALOGE("asked for OBD2_FREEZE_FRAME at invalid timestamp");
+ return V2_0::StatusCode::INVALID_ARG;
+ }
+ mFreezeObd2Frames.erase(freezeFrameIter);
+ }
+ }
+ return V2_0::StatusCode::OK;
+}
+
+V2_0::StatusCode DefaultVehicleHal::fillObd2DtcInfo(V2_0::VehiclePropValue* v) {
+ std::vector<int64_t> timestamps;
+ for(const auto& freezeFrame: mFreezeObd2Frames) {
+ timestamps.push_back(freezeFrame->timestamp);
+ }
+ v->value.int64Values = timestamps;
+ return V2_0::StatusCode::OK;
+}
+
+void DefaultVehicleHal::onCreate() {
+ mVehicleHal20->init(getValuePool(),
+ std::bind(&DefaultVehicleHal::doHalEvent, this, _1),
+ std::bind(&DefaultVehicleHal::doHalPropertySetError, this, _1, _2, _3));
+
+ std::vector<V2_0::VehiclePropConfig> configs = listProperties();
+ for (auto& cfg : configs) {
+ switch(cfg.prop) {
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME):
+ initObd2LiveFrame(cfg);
+ break;
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME):
+ initObd2FreezeFrame(cfg);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+DefaultVehicleHal::VehiclePropValuePtr DefaultVehicleHal::get(
+ const V2_0::VehiclePropValue& requestedPropValue,
+ V2_0::StatusCode* outStatus) {
+
+ auto propId = requestedPropValue.prop;
+ VehiclePropValuePtr v = nullptr;
+ auto& pool = *getValuePool();
+
+ switch (propId) {
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_LIVE_FRAME):
+ v = pool.obtainComplex();
+ *outStatus = fillObd2LiveFrame(v.get());
+ return v;
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME):
+ v = pool.obtainComplex();
+ *outStatus = fillObd2FreezeFrame(requestedPropValue, v.get());
+ return v;
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_INFO):
+ v = pool.obtainComplex();
+ *outStatus = fillObd2DtcInfo(v.get());
+ return v;
+ default:
+ return mVehicleHal20->get(requestedPropValue, outStatus);
+ }
+}
+
+V2_0::StatusCode DefaultVehicleHal::set(
+ const V2_0::VehiclePropValue& propValue) {
+
+ auto propId = propValue.prop;
+ switch (propId) {
+ case V2_0::toInt(V2_1::VehicleProperty::OBD2_FREEZE_FRAME_CLEAR):
+ return clearObd2FreezeFrames(propValue);
+ break;
+ default:
+ return mVehicleHal20->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/DefaultVehicleHal.h b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
index 7ccb354..ac65fc6 100644
--- a/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
+++ b/automotive/vehicle/2.1/default/impl/vhal_v2_1/DefaultVehicleHal.h
@@ -23,6 +23,7 @@
#include <vhal_v2_0/VehicleHal.h>
#include <vhal_v2_0/DefaultVehicleHal.h>
+#include <vhal_v2_1/Obd2SensorStore.h>
#include "DefaultConfig.h"
@@ -52,14 +53,9 @@
}
VehiclePropValuePtr get(const V2_0::VehiclePropValue& requestedPropValue,
- V2_0::StatusCode* outStatus) override {
- // TODO(pavelm): put logic related to VHAL 2.1 here (OBD, VMS, etc)
- return mVehicleHal20->get(requestedPropValue, outStatus);
- }
+ V2_0::StatusCode* outStatus) override;
- V2_0::StatusCode set(const V2_0::VehiclePropValue& propValue) override {
- return mVehicleHal20->set(propValue);
- }
+ V2_0::StatusCode set(const V2_0::VehiclePropValue& propValue) override;
V2_0::StatusCode subscribe(int32_t property,
int32_t areas,
@@ -71,14 +67,21 @@
return mVehicleHal20->unsubscribe(property);
}
- void onCreate() override {
- mVehicleHal20->init(getValuePool(),
- std::bind(&DefaultVehicleHal::doHalEvent, this, _1),
- std::bind(&DefaultVehicleHal::doHalPropertySetError, this, _1, _2, _3));
- }
+ void onCreate() override;
+
+private:
+ void initObd2LiveFrame(V2_0::VehiclePropConfig& propConfig);
+ void initObd2FreezeFrame(V2_0::VehiclePropConfig& propConfig);
+ V2_0::StatusCode fillObd2LiveFrame(V2_0::VehiclePropValue* v);
+ V2_0::StatusCode fillObd2FreezeFrame(const V2_0::VehiclePropValue& requestedPropValue,
+ V2_0::VehiclePropValue* v);
+ V2_0::StatusCode fillObd2DtcInfo(V2_0::VehiclePropValue *v);
+ V2_0::StatusCode clearObd2FreezeFrames(const V2_0::VehiclePropValue& propValue);
private:
V2_0::VehicleHal* mVehicleHal20;
+ std::unique_ptr<V2_0::VehiclePropValue> mLiveObd2Frame {nullptr};
+ std::vector<std::unique_ptr<V2_0::VehiclePropValue>> mFreezeObd2Frames;
};
} // impl
diff --git a/automotive/vehicle/2.1/default/service.cpp b/automotive/vehicle/2.1/default/service.cpp
index aaadf17..0844622 100644
--- a/automotive/vehicle/2.1/default/service.cpp
+++ b/automotive/vehicle/2.1/default/service.cpp
@@ -88,7 +88,7 @@
Vehicle_V2_1 vehicle21(vehicleManager.get());
ALOGI("Registering as service...");
- vehicle21.registerAsService("Vehicle");
+ vehicle21.registerAsService();
configureRpcThreadpool(1, true /* callerWillJoin */);
diff --git a/automotive/vehicle/2.0/default/tests/Obd2SensorStore_test.cpp b/automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
similarity index 100%
rename from automotive/vehicle/2.0/default/tests/Obd2SensorStore_test.cpp
rename to automotive/vehicle/2.1/default/tests/Obd2SensorStore_test.cpp
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
index 5df1fbc..f0dd95f 100644
--- a/automotive/vehicle/2.1/types.hal
+++ b/automotive/vehicle/2.1/types.hal
@@ -43,4 +43,511 @@
| 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),
+};
+
+/* 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,
};
diff --git a/biometrics/Android.bp b/biometrics/Android.bp
index b4681e4..c87e3af 100644
--- a/biometrics/Android.bp
+++ b/biometrics/Android.bp
@@ -1,5 +1,5 @@
// This is an autogenerated file, do not edit.
subdirs = [
"fingerprint/2.1",
- "fingerprint/2.1/vts/functional"
+ "fingerprint/2.1/vts/functional",
]
diff --git a/biometrics/fingerprint/2.1/default/Android.mk b/biometrics/fingerprint/2.1/default/Android.mk
index ea20130..3d06397 100644
--- a/biometrics/fingerprint/2.1/default/Android.mk
+++ b/biometrics/fingerprint/2.1/default/Android.mk
@@ -15,7 +15,6 @@
libhidlbase \
libhidltransport \
libhardware \
- libhwbinder \
libkeystore_binder \
libutils \
android.hardware.biometrics.fingerprint@2.1 \
diff --git a/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts b/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts
deleted file mode 100644
index 0581da0..0000000
--- a/biometrics/fingerprint/2.1/vts/BiometricsFingerprint.vts
+++ /dev/null
@@ -1,191 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IBiometricsFingerprint"
-
-package: "android.hardware.biometrics.fingerprint"
-
-import: "android.hardware.biometrics.fingerprint@2.1::IBiometricsFingerprintClientCallback"
-import: "android.hardware.biometrics.fingerprint@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "setNotify"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprintClientCallback"
- }
- callflow: {
- next: "setActiveGroup"
- }
- callflow: {
- entry: true
- }
- }
-
- api: {
- name: "preEnroll"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "enroll"
- next: "postEnroll"
- }
- }
-
- api: {
- name: "enroll"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- arg: {
- type: TYPE_ARRAY
- vector_size: 69
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "cancel"
- next: "enroll"
- next: "postEnroll"
- next: "remove"
- }
- }
-
- api: {
- name: "postEnroll"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- callflow: {
- next: "authenticate"
- next: "setActiveGroup"
- next: "enumerate"
- next: "remove"
- }
- }
-
- api: {
- name: "getAuthenticatorId"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "authenticate"
- }
- }
-
- api: {
- name: "cancel"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- callflow: {
- next: "authenticate"
- next: "enroll"
- next: "enumerate"
- next: "remove"
- next: "setActiveGroup"
- }
- }
-
- api: {
- name: "enumerate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- callflow: {
- next: "remove"
- next: "enroll"
- next: "authenticate"
- next: "setActiveGroup"
- }
- }
-
- api: {
- name: "remove"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "enumerate"
- next: "authenticate"
- next: "cancel"
- next: "getAuthenticatorId"
- next: "setActiveGroup"
- }
- }
-
- api: {
- name: "setActiveGroup"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_STRING
- }
- callflow: {
- next: "authenticate"
- next: "preEnroll"
- next: "enumerate"
- next: "remove"
- }
- }
-
- api: {
- name: "authenticate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "cancel"
- next: "preEnroll"
- next: "remove"
- }
- }
-
-}
diff --git a/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts b/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts
deleted file mode 100644
index dedda65..0000000
--- a/biometrics/fingerprint/2.1/vts/BiometricsFingerprintClientCallback.vts
+++ /dev/null
@@ -1,126 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IBiometricsFingerprintClientCallback"
-
-package: "android.hardware.biometrics.fingerprint"
-
-import: "android.hardware.biometrics.fingerprint@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "onEnrollResult"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "onAcquired"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "onAuthenticated"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- }
-
- api: {
- name: "onError"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintError"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "onRemoved"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "onEnumerate"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
-}
diff --git a/biometrics/fingerprint/2.1/vts/functional/Android.bp b/biometrics/fingerprint/2.1/vts/functional/Android.bp
index 7e5e699..ee1a9fe 100644
--- a/biometrics/fingerprint/2.1/vts/functional/Android.bp
+++ b/biometrics/fingerprint/2.1/vts/functional/Android.bp
@@ -22,7 +22,6 @@
"libbase",
"libhidltransport",
"libhardware",
- "libhwbinder",
"libhidlbase",
"liblog",
"libutils",
diff --git a/biometrics/fingerprint/2.1/vts/types.vts b/biometrics/fingerprint/2.1/vts/types.vts
deleted file mode 100644
index 9f9fd37..0000000
--- a/biometrics/fingerprint/2.1/vts/types.vts
+++ /dev/null
@@ -1,262 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "types"
-
-package: "android.hardware.biometrics.fingerprint"
-
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::RequestStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SYS_UNKNOWN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "SYS_OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SYS_ENOENT"
- scalar_value: {
- int32_t: -2
- }
- enumerator: "SYS_EINTR"
- scalar_value: {
- int32_t: -4
- }
- enumerator: "SYS_EIO"
- scalar_value: {
- int32_t: -5
- }
- enumerator: "SYS_EAGAIN"
- scalar_value: {
- int32_t: -11
- }
- enumerator: "SYS_ENOMEM"
- scalar_value: {
- int32_t: -12
- }
- enumerator: "SYS_EACCES"
- scalar_value: {
- int32_t: -13
- }
- enumerator: "SYS_EFAULT"
- scalar_value: {
- int32_t: -14
- }
- enumerator: "SYS_EBUSY"
- scalar_value: {
- int32_t: -16
- }
- enumerator: "SYS_EINVAL"
- scalar_value: {
- int32_t: -22
- }
- enumerator: "SYS_ENOSPC"
- scalar_value: {
- int32_t: -28
- }
- enumerator: "SYS_ETIMEDOUT"
- scalar_value: {
- int32_t: -110
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintError"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ERROR_NO_ERROR"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ERROR_HW_UNAVAILABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ERROR_UNABLE_TO_PROCESS"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ERROR_TIMEOUT"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ERROR_NO_SPACE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ERROR_CANCELED"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "ERROR_UNABLE_TO_REMOVE"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "ERROR_LOCKOUT"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "ERROR_VENDOR"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ACQUIRED_GOOD"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ACQUIRED_PARTIAL"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ACQUIRED_INSUFFICIENT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ACQUIRED_IMAGER_DIRTY"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ACQUIRED_TOO_SLOW"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ACQUIRED_TOO_FAST"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "ACQUIRED_VENDOR"
- scalar_value: {
- int32_t: 6
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
- type: TYPE_STRUCT
- struct_value: {
- name: "gid"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "fid"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintEnroll"
- type: TYPE_STRUCT
- struct_value: {
- name: "finger"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
- }
- struct_value: {
- name: "samplesRemaining"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "msg"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintIterator"
- type: TYPE_STRUCT
- struct_value: {
- name: "finger"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
- }
- struct_value: {
- name: "remainingTemplates"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquired"
- type: TYPE_STRUCT
- struct_value: {
- name: "acquiredInfo"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAcquiredInfo"
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintAuthenticated"
- type: TYPE_STRUCT
- struct_value: {
- name: "finger"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintFingerId"
- }
- struct_value: {
- name: "hat"
- type: TYPE_ARRAY
- vector_size: 69
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::biometrics::fingerprint::V2_1::FingerprintMsgType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ERROR"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "ACQUIRED"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "TEMPLATE_ENROLLING"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "TEMPLATE_REMOVED"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "AUTHENTICATED"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "TEMPLATE_ENUMERATING"
- scalar_value: {
- int32_t: 6
- }
- }
-}
-
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index f82bc1f..fb20195 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -15,6 +15,7 @@
cc_library_shared {
name: "android.hardware.bluetooth@1.0-impl",
+ proprietary: true,
relative_install_path: "hw",
srcs: [
"bluetooth_hci.cc",
@@ -26,7 +27,6 @@
"libbase",
"libcutils",
"libhardware",
- "libhwbinder",
"libhidlbase",
"libhidltransport",
"liblog",
@@ -34,6 +34,7 @@
],
static_libs: [
"android.hardware.bluetooth-async",
+ "android.hardware.bluetooth-hci",
],
}
@@ -51,6 +52,21 @@
],
}
+cc_library_static {
+ name: "android.hardware.bluetooth-hci",
+ srcs: [
+ "hci_packetizer.cc",
+ ],
+ export_include_dirs: ["."],
+ shared_libs: [
+ "libbase",
+ "libcutils",
+ "libhidlbase",
+ "liblog",
+ "libutils",
+ ],
+}
+
cc_test {
name: "bluetooth-vendor-interface-unit-tests",
srcs: [
diff --git a/bluetooth/1.0/default/Android.mk b/bluetooth/1.0/default/Android.mk
index 08bfb4e..7530925 100644
--- a/bluetooth/1.0/default/Android.mk
+++ b/bluetooth/1.0/default/Android.mk
@@ -17,6 +17,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE := android.hardware.bluetooth@1.0-service
LOCAL_INIT_RC := android.hardware.bluetooth@1.0-service.rc
LOCAL_SRC_FILES := \
@@ -32,7 +33,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.bluetooth@1.0 \
diff --git a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
index 8c5c02a..8545d2f 100644
--- a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
+++ b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
@@ -1,4 +1,4 @@
-service bluetooth-1-0 /system/bin/hw/android.hardware.bluetooth@1.0-service
+service bluetooth-1-0 /vendor/bin/hw/android.hardware.bluetooth@1.0-service
class hal
user bluetooth
group bluetooth
diff --git a/bluetooth/1.0/default/bluetooth_hci.cc b/bluetooth/1.0/default/bluetooth_hci.cc
index 6cea623..1d6e600 100644
--- a/bluetooth/1.0/default/bluetooth_hci.cc
+++ b/bluetooth/1.0/default/bluetooth_hci.cc
@@ -30,9 +30,13 @@
static const uint8_t HCI_DATA_TYPE_ACL = 2;
static const uint8_t HCI_DATA_TYPE_SCO = 3;
+BluetoothHci::BluetoothHci()
+ : deathRecipient(new BluetoothDeathRecipient(this)) {}
+
Return<void> BluetoothHci::initialize(
const ::android::sp<IBluetoothHciCallbacks>& cb) {
ALOGW("BluetoothHci::initialize()");
+ cb->linkToDeath(deathRecipient, 0);
event_cb_ = cb;
bool rc = VendorInterface::Initialize(
@@ -62,6 +66,7 @@
Return<void> BluetoothHci::close() {
ALOGW("BluetoothHci::close()");
+ event_cb_->unlinkToDeath(deathRecipient);
VendorInterface::Shutdown();
return Void();
}
diff --git a/bluetooth/1.0/default/bluetooth_hci.h b/bluetooth/1.0/default/bluetooth_hci.h
index da1b411..67d6c37 100644
--- a/bluetooth/1.0/default/bluetooth_hci.h
+++ b/bluetooth/1.0/default/bluetooth_hci.h
@@ -30,8 +30,20 @@
using ::android::hardware::Return;
using ::android::hardware::hidl_vec;
+struct BluetoothDeathRecipient : hidl_death_recipient {
+ BluetoothDeathRecipient(const sp<IBluetoothHci> hci) : mHci(hci) {}
+
+ virtual void serviceDied(
+ uint64_t /*cookie*/,
+ const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ mHci->close();
+ }
+ sp<IBluetoothHci> mHci;
+};
+
class BluetoothHci : public IBluetoothHci {
public:
+ BluetoothHci();
Return<void> initialize(
const ::android::sp<IBluetoothHciCallbacks>& cb) override;
Return<void> sendHciCommand(const hidl_vec<uint8_t>& packet) override;
@@ -42,6 +54,7 @@
private:
void sendDataToController(const uint8_t type, const hidl_vec<uint8_t>& data);
::android::sp<IBluetoothHciCallbacks> event_cb_;
+ ::android::sp<BluetoothDeathRecipient> deathRecipient;
};
extern "C" IBluetoothHci* HIDL_FETCH_IBluetoothHci(const char* name);
diff --git a/bluetooth/1.0/default/hci_internals.h b/bluetooth/1.0/default/hci_internals.h
index d5714be..1e1f300 100644
--- a/bluetooth/1.0/default/hci_internals.h
+++ b/bluetooth/1.0/default/hci_internals.h
@@ -16,6 +16,8 @@
#pragma once
+#include <stdlib.h>
+
// HCI UART transport packet types (Volume 4, Part A, 2)
enum HciPacketType {
HCI_PACKET_TYPE_UNKNOWN = 0,
diff --git a/bluetooth/1.0/default/hci_packetizer.cc b/bluetooth/1.0/default/hci_packetizer.cc
new file mode 100644
index 0000000..1a50196
--- /dev/null
+++ b/bluetooth/1.0/default/hci_packetizer.cc
@@ -0,0 +1,115 @@
+//
+// Copyright 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 "hci_packetizer.h"
+
+#define LOG_TAG "android.hardware.bluetooth.hci_packetizer"
+#include <android-base/logging.h>
+#include <cutils/properties.h>
+#include <utils/Log.h>
+
+#include <dlfcn.h>
+#include <fcntl.h>
+
+namespace {
+
+const size_t preamble_size_for_type[] = {
+ 0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE,
+ HCI_EVENT_PREAMBLE_SIZE};
+const size_t packet_length_offset_for_type[] = {
+ 0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
+ HCI_LENGTH_OFFSET_EVT};
+
+size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
+ size_t offset = packet_length_offset_for_type[type];
+ if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset];
+ return (((preamble[offset + 1]) << 8) | preamble[offset]);
+}
+
+} // namespace
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+HciPacketType HciPacketizer::GetPacketType() const {
+ return hci_packet_type_;
+}
+
+const hidl_vec<uint8_t>& HciPacketizer::GetPacket() const {
+ return hci_packet_;
+}
+
+void HciPacketizer::OnDataReady(int fd) {
+ switch (hci_parser_state_) {
+ case HCI_IDLE: {
+ uint8_t buffer[1] = {0};
+ size_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1));
+ CHECK(bytes_read == 1);
+ hci_packet_type_ = static_cast<HciPacketType>(buffer[0]);
+ CHECK(hci_packet_type_ >= HCI_PACKET_TYPE_ACL_DATA &&
+ hci_packet_type_ <= HCI_PACKET_TYPE_EVENT)
+ << "buffer[0] = " << static_cast<unsigned int>(buffer[0]);
+ hci_parser_state_ = HCI_TYPE_READY;
+ hci_packet_bytes_remaining_ = preamble_size_for_type[hci_packet_type_];
+ hci_packet_bytes_read_ = 0;
+ break;
+ }
+
+ case HCI_TYPE_READY: {
+ size_t bytes_read = TEMP_FAILURE_RETRY(
+ read(fd, hci_packet_preamble_ + hci_packet_bytes_read_,
+ hci_packet_bytes_remaining_));
+ CHECK(bytes_read > 0);
+ hci_packet_bytes_remaining_ -= bytes_read;
+ hci_packet_bytes_read_ += bytes_read;
+ if (hci_packet_bytes_remaining_ == 0) {
+ size_t packet_length =
+ HciGetPacketLengthForType(hci_packet_type_, hci_packet_preamble_);
+ hci_packet_.resize(preamble_size_for_type[hci_packet_type_] +
+ packet_length);
+ memcpy(hci_packet_.data(), hci_packet_preamble_,
+ preamble_size_for_type[hci_packet_type_]);
+ hci_packet_bytes_remaining_ = packet_length;
+ hci_parser_state_ = HCI_PAYLOAD;
+ hci_packet_bytes_read_ = 0;
+ }
+ break;
+ }
+
+ case HCI_PAYLOAD: {
+ size_t bytes_read = TEMP_FAILURE_RETRY(
+ read(fd,
+ hci_packet_.data() + preamble_size_for_type[hci_packet_type_] +
+ hci_packet_bytes_read_,
+ hci_packet_bytes_remaining_));
+ CHECK(bytes_read > 0);
+ hci_packet_bytes_remaining_ -= bytes_read;
+ hci_packet_bytes_read_ += bytes_read;
+ if (hci_packet_bytes_remaining_ == 0) {
+ hci_packet_ready_cb_();
+ hci_parser_state_ = HCI_IDLE;
+ }
+ break;
+ }
+ }
+}
+
+} // namespace hci
+} // namespace bluetooth
+} // namespace hardware
+} // namespace android
diff --git a/bluetooth/1.0/default/hci_packetizer.h b/bluetooth/1.0/default/hci_packetizer.h
new file mode 100644
index 0000000..e9c01dc
--- /dev/null
+++ b/bluetooth/1.0/default/hci_packetizer.h
@@ -0,0 +1,54 @@
+//
+// Copyright 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.
+//
+
+#pragma once
+
+#include <functional>
+
+#include <hidl/HidlSupport.h>
+
+#include "hci_internals.h"
+
+namespace android {
+namespace hardware {
+namespace bluetooth {
+namespace hci {
+
+using ::android::hardware::hidl_vec;
+using HciPacketReadyCallback = std::function<void(void)>;
+
+class HciPacketizer {
+ public:
+ HciPacketizer(HciPacketReadyCallback packet_cb) : hci_packet_ready_cb_(packet_cb) {};
+ void OnDataReady(int fd);
+ const hidl_vec<uint8_t>& GetPacket() const;
+ HciPacketType GetPacketType() const;
+
+ protected:
+ enum HciParserState { HCI_IDLE, HCI_TYPE_READY, HCI_PAYLOAD };
+ HciParserState hci_parser_state_{HCI_IDLE};
+ HciPacketType hci_packet_type_{HCI_PACKET_TYPE_UNKNOWN};
+ uint8_t hci_packet_preamble_[HCI_PREAMBLE_SIZE_MAX];
+ hidl_vec<uint8_t> hci_packet_;
+ size_t hci_packet_bytes_remaining_;
+ size_t hci_packet_bytes_read_;
+ HciPacketReadyCallback hci_packet_ready_cb_;
+};
+
+} // namespace hci
+} // namespace bluetooth
+} // namespace hardware
+} // namespace android
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 7737dd2..3878129 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -51,19 +51,6 @@
VendorInterface* g_vendor_interface = nullptr;
-const size_t preamble_size_for_type[] = {
- 0, HCI_COMMAND_PREAMBLE_SIZE, HCI_ACL_PREAMBLE_SIZE, HCI_SCO_PREAMBLE_SIZE,
- HCI_EVENT_PREAMBLE_SIZE};
-const size_t packet_length_offset_for_type[] = {
- 0, HCI_LENGTH_OFFSET_CMD, HCI_LENGTH_OFFSET_ACL, HCI_LENGTH_OFFSET_SCO,
- HCI_LENGTH_OFFSET_EVT};
-
-size_t HciGetPacketLengthForType(HciPacketType type, const uint8_t* preamble) {
- size_t offset = packet_length_offset_for_type[type];
- if (type != HCI_PACKET_TYPE_ACL_DATA) return preamble[offset];
- return (((preamble[offset + 1]) << 8) | preamble[offset]);
-}
-
HC_BT_HDR* WrapPacketAndCopy(uint16_t event, const hidl_vec<uint8_t>& data) {
size_t packet_size = data.size() + sizeof(HC_BT_HDR);
HC_BT_HDR* packet = reinterpret_cast<HC_BT_HDR*>(new uint8_t[packet_size]);
@@ -274,7 +261,7 @@
ALOGI("%s UART fd: %d", __func__, uart_fd_);
fd_watcher_.WatchFdForNonBlockingReads(uart_fd_,
- [this](int fd) { OnDataReady(fd); });
+ [this](int fd) { hci_packetizer_.OnDataReady(fd); });
// Initially, the power management is off.
lpm_wake_deasserted = true;
@@ -370,72 +357,26 @@
recent_activity_flag = false;
}
-void VendorInterface::OnDataReady(int fd) {
- switch (hci_parser_state_) {
- case HCI_IDLE: {
- uint8_t buffer[1] = {0};
- size_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1));
- CHECK(bytes_read == 1);
- hci_packet_type_ = static_cast<HciPacketType>(buffer[0]);
- // TODO(eisenbach): Check for workaround(s)
- CHECK(hci_packet_type_ >= HCI_PACKET_TYPE_ACL_DATA &&
- hci_packet_type_ <= HCI_PACKET_TYPE_EVENT)
- << "buffer[0] = " << static_cast<unsigned int>(buffer[0]);
- hci_parser_state_ = HCI_TYPE_READY;
- hci_packet_bytes_remaining_ = preamble_size_for_type[hci_packet_type_];
- hci_packet_bytes_read_ = 0;
- break;
- }
+void VendorInterface::OnPacketReady() {
+ VendorInterface::get()->HandleIncomingPacket();
+}
- case HCI_TYPE_READY: {
- size_t bytes_read = TEMP_FAILURE_RETRY(
- read(fd, hci_packet_preamble_ + hci_packet_bytes_read_,
- hci_packet_bytes_remaining_));
- CHECK(bytes_read > 0);
- hci_packet_bytes_remaining_ -= bytes_read;
- hci_packet_bytes_read_ += bytes_read;
- if (hci_packet_bytes_remaining_ == 0) {
- size_t packet_length =
- HciGetPacketLengthForType(hci_packet_type_, hci_packet_preamble_);
- hci_packet_.resize(preamble_size_for_type[hci_packet_type_] +
- packet_length);
- memcpy(hci_packet_.data(), hci_packet_preamble_,
- preamble_size_for_type[hci_packet_type_]);
- hci_packet_bytes_remaining_ = packet_length;
- hci_parser_state_ = HCI_PAYLOAD;
- hci_packet_bytes_read_ = 0;
- }
- break;
- }
-
- case HCI_PAYLOAD: {
- size_t bytes_read = TEMP_FAILURE_RETRY(
- read(fd,
- hci_packet_.data() + preamble_size_for_type[hci_packet_type_] +
- hci_packet_bytes_read_,
- hci_packet_bytes_remaining_));
- CHECK(bytes_read > 0);
- hci_packet_bytes_remaining_ -= bytes_read;
- hci_packet_bytes_read_ += bytes_read;
- if (hci_packet_bytes_remaining_ == 0) {
+void VendorInterface::HandleIncomingPacket() {
+ HciPacketType hci_packet_type = hci_packetizer_.GetPacketType();
+ hidl_vec<uint8_t> hci_packet = hci_packetizer_.GetPacket();
if (internal_command.cb != nullptr &&
- hci_packet_type_ == HCI_PACKET_TYPE_EVENT &&
- internal_command_event_match(hci_packet_)) {
+ hci_packet_type == HCI_PACKET_TYPE_EVENT &&
+ internal_command_event_match(hci_packet)) {
HC_BT_HDR* bt_hdr =
- WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet_);
+ WrapPacketAndCopy(HCI_PACKET_TYPE_EVENT, hci_packet);
// The callbacks can send new commands, so don't zero after calling.
tINT_CMD_CBACK saved_cb = internal_command.cb;
internal_command.cb = nullptr;
saved_cb(bt_hdr);
} else {
- packet_read_cb_(hci_packet_type_, hci_packet_);
+ packet_read_cb_(hci_packet_type, hci_packet);
}
- hci_parser_state_ = HCI_IDLE;
- }
- break;
- }
- }
}
} // namespace implementation
diff --git a/bluetooth/1.0/default/vendor_interface.h b/bluetooth/1.0/default/vendor_interface.h
index 98357f5..8115640 100644
--- a/bluetooth/1.0/default/vendor_interface.h
+++ b/bluetooth/1.0/default/vendor_interface.h
@@ -20,7 +20,7 @@
#include "async_fd_watcher.h"
#include "bt_vendor_lib.h"
-#include "hci_internals.h"
+#include "hci_packetizer.h"
namespace android {
namespace hardware {
@@ -46,6 +46,8 @@
void OnFirmwareConfigured(uint8_t result);
+ static void OnPacketReady();
+
private:
virtual ~VendorInterface() = default;
@@ -55,7 +57,7 @@
void OnTimeout();
- void OnDataReady(int fd);
+ void HandleIncomingPacket();
void *lib_handle_;
bt_vendor_interface_t *lib_interface_;
@@ -64,13 +66,7 @@
PacketReadCallback packet_read_cb_;
InitializeCompleteCallback initialize_complete_cb_;
- enum HciParserState { HCI_IDLE, HCI_TYPE_READY, HCI_PAYLOAD };
- HciParserState hci_parser_state_{HCI_IDLE};
- HciPacketType hci_packet_type_{HCI_PACKET_TYPE_UNKNOWN};
- uint8_t hci_packet_preamble_[HCI_PREAMBLE_SIZE_MAX];
- hidl_vec<uint8_t> hci_packet_;
- size_t hci_packet_bytes_remaining_;
- size_t hci_packet_bytes_read_;
+ hci::HciPacketizer hci_packetizer_ {VendorInterface::OnPacketReady};
FirmwareStartupTimer *firmware_startup_timer_;
};
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index 2012c20..a57a55a 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalBluetoothV1_0TargetTest",
- gtest: true,
srcs: ["VtsHalBluetoothV1_0TargetTest.cpp"],
shared_libs: [
"libbase",
@@ -24,12 +23,11 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.bluetooth@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 5a6c29a..ce15875 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,7 +23,7 @@
#include <hardware/bluetooth.h>
#include <utils/Log.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <condition_variable>
#include <mutex>
#include <queue>
@@ -117,11 +117,11 @@
};
// The main test class for Bluetooth HIDL HAL.
-class BluetoothHidlTest : public ::testing::Test {
+class BluetoothHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {
// currently test passthrough mode only
- bluetooth = IBluetoothHci::getService();
+ bluetooth = testing::VtsHalHidlTargetBaseTest::getService<IBluetoothHci>();
ASSERT_NE(bluetooth, nullptr);
ALOGI("%s: getService() for bluetooth is %s", __func__,
bluetooth->isRemote() ? "remote" : "local");
diff --git a/boot/1.0/default/Android.mk b/boot/1.0/default/Android.mk
index 99a6cf9..5e7ecb4 100644
--- a/boot/1.0/default/Android.mk
+++ b/boot/1.0/default/Android.mk
@@ -11,7 +11,6 @@
liblog \
libhidlbase \
libhidltransport \
- libhwbinder \
libhardware \
libutils \
android.hardware.boot@1.0 \
@@ -28,7 +27,6 @@
LOCAL_SHARED_LIBRARIES := \
liblog \
- libhwbinder \
libhardware \
libhidlbase \
libhidltransport \
diff --git a/boot/1.0/vts/BootControl.vts b/boot/1.0/vts/BootControl.vts
deleted file mode 100644
index b400f0e..0000000
--- a/boot/1.0/vts/BootControl.vts
+++ /dev/null
@@ -1,94 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IBootControl"
-
-package: "android.hardware.boot"
-
-import: "android.hardware.boot@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getNumberSlots"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "getCurrentSlot"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "markBootSuccessful"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::boot::V1_0::CommandResult"
- }
- }
-
- api: {
- name: "setActiveBootSlot"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::boot::V1_0::CommandResult"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "setSlotAsUnbootable"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::boot::V1_0::CommandResult"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "isSlotBootable"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::boot::V1_0::BoolResult"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "isSlotMarkedSuccessful"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::boot::V1_0::BoolResult"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "getSuffix"
- return_type_hidl: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
-}
diff --git a/boot/1.0/vts/functional/Android.bp b/boot/1.0/vts/functional/Android.bp
index 2fd3ee4..5081162 100644
--- a/boot/1.0/vts/functional/Android.bp
+++ b/boot/1.0/vts/functional/Android.bp
@@ -23,7 +23,6 @@
"liblog",
"libcutils",
"libhidlbase",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.boot@1.0",
diff --git a/boot/1.0/vts/types.vts b/boot/1.0/vts/types.vts
deleted file mode 100644
index ebeaa60..0000000
--- a/boot/1.0/vts/types.vts
+++ /dev/null
@@ -1,42 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.boot"
-
-
-attribute: {
- name: "::android::hardware::boot::V1_0::CommandResult"
- type: TYPE_STRUCT
- struct_value: {
- name: "success"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "errMsg"
- type: TYPE_STRING
- }
-}
-
-attribute: {
- name: "::android::hardware::boot::V1_0::BoolResult"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FALSE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "TRUE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "INVALID_SLOT"
- scalar_value: {
- int32_t: -1
- }
- }
-}
-
diff --git a/broadcastradio/1.0/default/Android.mk b/broadcastradio/1.0/default/Android.mk
index 569291e..bb32595 100644
--- a/broadcastradio/1.0/default/Android.mk
+++ b/broadcastradio/1.0/default/Android.mk
@@ -13,7 +13,6 @@
LOCAL_SHARED_LIBRARIES := \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
liblog \
libhardware \
diff --git a/broadcastradio/1.0/vts/functional/Android.bp b/broadcastradio/1.0/vts/functional/Android.bp
index 2316edb..d608877 100644
--- a/broadcastradio/1.0/vts/functional/Android.bp
+++ b/broadcastradio/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.broadcastradio@1.0",
diff --git a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
index bcbfbb7..28a913c 100644
--- a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
+++ b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
@@ -48,7 +48,7 @@
using ::android::hardware::broadcastradio::V1_0::MetaData;
-// The main test class for Sound Trigger HIDL HAL.
+// The main test class for Broadcast Radio HIDL HAL.
class BroadcastRadioHidlTest : public ::testing::Test {
protected:
@@ -63,7 +63,7 @@
}
}
sp<IBroadcastRadioFactory> factory =
- IBroadcastRadioFactory::getService("broadcastradio", getStub);
+ IBroadcastRadioFactory::getService(getStub);
if (factory != 0) {
factory->connectModule(Class::AM_FM,
[&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
new file mode 100644
index 0000000..c9a8b10
--- /dev/null
+++ b/broadcastradio/1.1/Android.bp
@@ -0,0 +1,76 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "android.hardware.broadcastradio@1.1_hal",
+ srcs: [
+ "types.hal",
+ "IBroadcastRadioFactory.hal",
+ "ITuner.hal",
+ "ITunerCallback.hal",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.1_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+ srcs: [
+ ":android.hardware.broadcastradio@1.1_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.1/types.cpp",
+ "android/hardware/broadcastradio/1.1/BroadcastRadioFactoryAll.cpp",
+ "android/hardware/broadcastradio/1.1/TunerAll.cpp",
+ "android/hardware/broadcastradio/1.1/TunerCallbackAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.broadcastradio@1.1_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.broadcastradio@1.1",
+ srcs: [
+ ":android.hardware.broadcastradio@1.1_hal",
+ ],
+ out: [
+ "android/hardware/broadcastradio/1.1/types.h",
+ "android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/IHwBroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/BnHwBroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/BpHwBroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/BsBroadcastRadioFactory.h",
+ "android/hardware/broadcastradio/1.1/ITuner.h",
+ "android/hardware/broadcastradio/1.1/IHwTuner.h",
+ "android/hardware/broadcastradio/1.1/BnHwTuner.h",
+ "android/hardware/broadcastradio/1.1/BpHwTuner.h",
+ "android/hardware/broadcastradio/1.1/BsTuner.h",
+ "android/hardware/broadcastradio/1.1/ITunerCallback.h",
+ "android/hardware/broadcastradio/1.1/IHwTunerCallback.h",
+ "android/hardware/broadcastradio/1.1/BnHwTunerCallback.h",
+ "android/hardware/broadcastradio/1.1/BpHwTunerCallback.h",
+ "android/hardware/broadcastradio/1.1/BsTunerCallback.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.broadcastradio@1.1",
+ generated_sources: ["android.hardware.broadcastradio@1.1_genc++"],
+ generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
+ export_generated_headers: ["android.hardware.broadcastradio@1.1_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hardware.broadcastradio@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.broadcastradio@1.0",
+ ],
+}
diff --git a/broadcastradio/1.1/Android.mk b/broadcastradio/1.1/Android.mk
new file mode 100644
index 0000000..0c4c55d
--- /dev/null
+++ b/broadcastradio/1.1/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/broadcastradio/1.1/IBroadcastRadioFactory.hal b/broadcastradio/1.1/IBroadcastRadioFactory.hal
new file mode 100644
index 0000000..fce1cc0
--- /dev/null
+++ b/broadcastradio/1.1/IBroadcastRadioFactory.hal
@@ -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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::IBroadcastRadioFactory;
+
+/**
+ * To use 1.1 features you must cast specific interfaces after being returned from 1.0 HAL,
+ * for example V1_1::ITuner::castFrom() after retrieving it from IBroadcastRadio::openTuner().
+ * The 1.1 server must always return the 1.1 version of specific interface.
+ */
+interface IBroadcastRadioFactory extends @1.0::IBroadcastRadioFactory {
+};
diff --git a/broadcastradio/1.1/ITuner.hal b/broadcastradio/1.1/ITuner.hal
new file mode 100644
index 0000000..72b2847
--- /dev/null
+++ b/broadcastradio/1.1/ITuner.hal
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::ITuner;
+
+interface ITuner extends @1.0::ITuner {
+ /*
+ * Retrieve current station information.
+ * @return result OK if scan successfully started
+ * NOT_INITIALIZED if another error occurs
+ * @return info Current program information.
+ */
+ getProgramInformation_1_1() generates(Result result, ProgramInfo info);
+};
diff --git a/broadcastradio/1.1/ITunerCallback.hal b/broadcastradio/1.1/ITunerCallback.hal
new file mode 100644
index 0000000..4af6b1f
--- /dev/null
+++ b/broadcastradio/1.1/ITunerCallback.hal
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::ITunerCallback;
+
+/**
+ * Some methods of @1.1::ITunerCallback are updated versions of those from @1.0:ITunerCallback.
+ * All 1.1 drivers should call both (eg. tuneComplete and tuneComplete_1_1), while 1.1 clients
+ * should ignore 1.0 ones, to avoid receiving a callback twice.
+ */
+interface ITunerCallback extends @1.0::ITunerCallback {
+ /*
+ * Method called by the HAL when a tuning operation completes
+ * following a step(), scan() or tune() command.
+ * @param result OK if tune succeeded or TIMEOUT in case of time out.
+ * @param info A ProgramInfo structure describing the tuned station.
+ */
+ oneway tuneComplete_1_1(Result result, ProgramInfo info);
+
+ /*
+ * Method called by the HAL when a frequency switch occurs.
+ * @param info A ProgramInfo structure describing the new tuned station.
+ */
+ oneway afSwitch_1_1(ProgramInfo info);
+};
diff --git a/broadcastradio/1.1/WARNING b/broadcastradio/1.1/WARNING
new file mode 100644
index 0000000..e867cfa
--- /dev/null
+++ b/broadcastradio/1.1/WARNING
@@ -0,0 +1 @@
+This is experimental interface, do not use it yet.
diff --git a/broadcastradio/1.1/default/Android.mk b/broadcastradio/1.1/default/Android.mk
new file mode 100644
index 0000000..bb32d50
--- /dev/null
+++ b/broadcastradio/1.1/default/Android.mk
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.broadcastradio@1.1-impl
+LOCAL_PROPRIETARY_MODULE := true
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_CFLAGS += -Werror -Wall -Wextra
+LOCAL_SRC_FILES := \
+ BroadcastRadio.cpp \
+ BroadcastRadioFactory.cpp \
+ Tuner.cpp \
+ Utils.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+ libhidlbase \
+ libhidltransport \
+ libutils \
+ liblog \
+ libhardware \
+ android.hardware.broadcastradio@1.0 \
+ android.hardware.broadcastradio@1.1 \
+ libradio_metadata
+
+ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
+LOCAL_MULTILIB := 32
+else
+LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
+endif
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/broadcastradio/1.1/default/BroadcastRadio.cpp b/broadcastradio/1.1/default/BroadcastRadio.cpp
new file mode 100644
index 0000000..611267b
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadio.cpp
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+#define LOG_TAG "BroadcastRadio"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+
+#include "BroadcastRadio.h"
+#include "Tuner.h"
+#include "Utils.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using ::android::sp;
+
+BroadcastRadio::BroadcastRadio(Class classId)
+ : mStatus(Result::NOT_INITIALIZED), mClassId(classId), mHwDevice(NULL)
+{
+}
+
+BroadcastRadio::~BroadcastRadio()
+{
+ if (mHwDevice != NULL) {
+ radio_hw_device_close(mHwDevice);
+ }
+}
+
+void BroadcastRadio::onFirstRef()
+{
+ const hw_module_t *mod;
+ int rc;
+ ALOGI("%s mClassId %d", __FUNCTION__, mClassId);
+
+ mHwDevice = NULL;
+ const char *classString = Utils::getClassString(mClassId);
+ if (classString == NULL) {
+ ALOGE("invalid class ID %d", mClassId);
+ mStatus = Result::INVALID_ARGUMENTS;
+ return;
+ }
+
+ ALOGI("%s RADIO_HARDWARE_MODULE_ID %s %s",
+ __FUNCTION__, RADIO_HARDWARE_MODULE_ID, classString);
+
+ rc = hw_get_module_by_class(RADIO_HARDWARE_MODULE_ID, classString, &mod);
+ if (rc != 0) {
+ ALOGE("couldn't load radio module %s.%s (%s)",
+ RADIO_HARDWARE_MODULE_ID, classString, strerror(-rc));
+ return;
+ }
+ rc = radio_hw_device_open(mod, &mHwDevice);
+ if (rc != 0) {
+ ALOGE("couldn't open radio hw device in %s.%s (%s)",
+ RADIO_HARDWARE_MODULE_ID, "primary", strerror(-rc));
+ mHwDevice = NULL;
+ return;
+ }
+ if (mHwDevice->common.version != RADIO_DEVICE_API_VERSION_CURRENT) {
+ ALOGE("wrong radio hw device version %04x", mHwDevice->common.version);
+ radio_hw_device_close(mHwDevice);
+ mHwDevice = NULL;
+ } else {
+ mStatus = Result::OK;
+ }
+}
+
+int BroadcastRadio::closeHalTuner(const struct radio_tuner *halTuner)
+{
+ ALOGV("%s", __FUNCTION__);
+ if (mHwDevice == NULL) {
+ return -ENODEV;
+ }
+ if (halTuner == 0) {
+ return -EINVAL;
+ }
+ return mHwDevice->close_tuner(mHwDevice, halTuner);
+}
+
+
+// Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadio follow.
+Return<void> BroadcastRadio::getProperties(getProperties_cb _hidl_cb)
+{
+ int rc;
+ radio_hal_properties_t halProperties;
+ Properties properties;
+
+ if (mHwDevice == NULL) {
+ rc = -ENODEV;
+ goto exit;
+ }
+ rc = mHwDevice->get_properties(mHwDevice, &halProperties);
+ if (rc == 0) {
+ Utils::convertPropertiesFromHal(&properties, &halProperties);
+ }
+
+exit:
+ _hidl_cb(Utils::convertHalResult(rc), properties);
+ return Void();
+}
+
+Return<void> BroadcastRadio::openTuner(const BandConfig& config, bool audio,
+ const sp<V1_0::ITunerCallback>& callback, openTuner_cb _hidl_cb)
+{
+ sp<Tuner> tunerImpl = new Tuner(callback, this);
+
+ radio_hal_band_config_t halConfig;
+ const struct radio_tuner *halTuner;
+ Utils::convertBandConfigToHal(&halConfig, &config);
+ int rc = mHwDevice->open_tuner(mHwDevice, &halConfig, audio, Tuner::callback,
+ tunerImpl.get(), &halTuner);
+ if (rc == 0) {
+ tunerImpl->setHalTuner(halTuner);
+ }
+
+ _hidl_cb(Utils::convertHalResult(rc), tunerImpl);
+ return Void();
+}
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
diff --git a/broadcastradio/1.1/default/BroadcastRadio.h b/broadcastradio/1.1/default/BroadcastRadio.h
new file mode 100644
index 0000000..068979d
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadio.h
@@ -0,0 +1,72 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
+
+#include <android/hardware/broadcastradio/1.0/IBroadcastRadio.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
+#include <hardware/radio.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+using V1_0::BandConfig;
+using V1_0::Properties;
+
+struct BroadcastRadio : public V1_0::IBroadcastRadio {
+
+ BroadcastRadio(Class classId);
+
+ // Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadio follow.
+ Return<void> getProperties(getProperties_cb _hidl_cb) override;
+ Return<void> openTuner(const BandConfig& config, bool audio,
+ const sp<V1_0::ITunerCallback>& callback, openTuner_cb _hidl_cb) override;
+
+ // RefBase
+ virtual void onFirstRef() override;
+
+ Result initCheck() { return mStatus; }
+ int closeHalTuner(const struct radio_tuner *halTuner);
+
+private:
+ virtual ~BroadcastRadio();
+
+ static const char * sClassModuleNames[];
+
+ Result convertHalResult(int rc);
+ void convertBandConfigFromHal(BandConfig *config,
+ const radio_hal_band_config_t *halConfig);
+ void convertPropertiesFromHal(Properties *properties,
+ const radio_hal_properties_t *halProperties);
+ void convertBandConfigToHal(radio_hal_band_config_t *halConfig,
+ const BandConfig *config);
+
+ Result mStatus;
+ Class mClassId;
+ struct radio_hw_device *mHwDevice;
+};
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
diff --git a/broadcastradio/1.1/default/BroadcastRadioFactory.cpp b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
new file mode 100644
index 0000000..c8b6c39
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
@@ -0,0 +1,45 @@
+/*
+ * 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 "BroadcastRadioFactory.h"
+#include "BroadcastRadio.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+// Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory follow.
+Return<void> BroadcastRadioFactory::connectModule(Class classId, connectModule_cb _hidl_cb) {
+ sp<BroadcastRadio> impl = new BroadcastRadio(classId);
+ Result retval = Result::NOT_INITIALIZED;
+ if (impl != 0) {
+ retval = impl->initCheck();
+ }
+ _hidl_cb(retval, impl);
+ return Void();
+}
+
+
+IBroadcastRadioFactory* HIDL_FETCH_IBroadcastRadioFactory(const char* /* name */) {
+ return new BroadcastRadioFactory();
+}
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
diff --git a/broadcastradio/1.1/default/BroadcastRadioFactory.h b/broadcastradio/1.1/default/BroadcastRadioFactory.h
new file mode 100644
index 0000000..8eb8514
--- /dev/null
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.h
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
+
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+
+struct BroadcastRadioFactory : public IBroadcastRadioFactory {
+ // Methods from ::android::hardware::broadcastradio::V1_0::IBroadcastRadioFactory follow.
+ Return<void> connectModule(Class classId, connectModule_cb _hidl_cb) override;
+};
+
+extern "C" IBroadcastRadioFactory* HIDL_FETCH_IBroadcastRadioFactory(const char* name);
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
diff --git a/broadcastradio/1.1/default/Tuner.cpp b/broadcastradio/1.1/default/Tuner.cpp
new file mode 100644
index 0000000..6258569
--- /dev/null
+++ b/broadcastradio/1.1/default/Tuner.cpp
@@ -0,0 +1,207 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "Tuner"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+
+#include "BroadcastRadio.h"
+#include "Tuner.h"
+#include "Utils.h"
+#include <system/RadioMetadataWrapper.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+void Tuner::onCallback(radio_hal_event_t *halEvent)
+{
+ BandConfig config;
+ ProgramInfo info;
+ hidl_vec<MetaData> metadata;
+
+ if (mCallback != 0) {
+ switch(halEvent->type) {
+ case RADIO_EVENT_CONFIG:
+ Utils::convertBandConfigFromHal(&config, &halEvent->config);
+ mCallback->configChange(Utils::convertHalResult(halEvent->status), config);
+ break;
+ case RADIO_EVENT_ANTENNA:
+ mCallback->antennaStateChange(halEvent->on);
+ break;
+ case RADIO_EVENT_TUNED:
+ Utils::convertProgramInfoFromHal(&info, &halEvent->info);
+ if (mCallback1_1 != nullptr) {
+ mCallback1_1->tuneComplete_1_1(Utils::convertHalResult(halEvent->status), info);
+ }
+ mCallback->tuneComplete(Utils::convertHalResult(halEvent->status), info.base);
+ break;
+ case RADIO_EVENT_METADATA: {
+ uint32_t channel;
+ uint32_t sub_channel;
+ if (radio_metadata_get_channel(halEvent->metadata, &channel, &sub_channel) == 0) {
+ Utils::convertMetaDataFromHal(metadata, halEvent->metadata);
+ mCallback->newMetadata(channel, sub_channel, metadata);
+ }
+ } break;
+ case RADIO_EVENT_TA:
+ mCallback->trafficAnnouncement(halEvent->on);
+ break;
+ case RADIO_EVENT_AF_SWITCH:
+ Utils::convertProgramInfoFromHal(&info, &halEvent->info);
+ if (mCallback1_1 != nullptr) {
+ mCallback1_1->afSwitch_1_1(info);
+ }
+ mCallback->afSwitch(info.base);
+ break;
+ case RADIO_EVENT_EA:
+ mCallback->emergencyAnnouncement(halEvent->on);
+ break;
+ case RADIO_EVENT_HW_FAILURE:
+ default:
+ mCallback->hardwareFailure();
+ break;
+ }
+ }
+}
+
+//static
+void Tuner::callback(radio_hal_event_t *halEvent, void *cookie)
+{
+ wp<Tuner> weak(reinterpret_cast<Tuner*>(cookie));
+ sp<Tuner> tuner = weak.promote();
+ if (tuner == 0) return;
+ tuner->onCallback(halEvent);
+}
+
+Tuner::Tuner(const sp<V1_0::ITunerCallback>& callback, const wp<BroadcastRadio>& parentDevice)
+ : mHalTuner(NULL), mCallback(callback), mCallback1_1(ITunerCallback::castFrom(callback)),
+ mParentDevice(parentDevice)
+{
+ ALOGV("%s", __FUNCTION__);
+}
+
+
+Tuner::~Tuner()
+{
+ ALOGV("%s", __FUNCTION__);
+ const sp<BroadcastRadio> parentDevice = mParentDevice.promote();
+ if (parentDevice != 0) {
+ parentDevice->closeHalTuner(mHalTuner);
+ }
+}
+
+// Methods from ::android::hardware::broadcastradio::V1_1::ITuner follow.
+Return<Result> Tuner::setConfiguration(const BandConfig& config) {
+ ALOGV("%s", __FUNCTION__);
+ if (mHalTuner == NULL) {
+ return Utils::convertHalResult(-ENODEV);
+ }
+ radio_hal_band_config_t halConfig;
+ Utils::convertBandConfigToHal(&halConfig, &config);
+ int rc = mHalTuner->set_configuration(mHalTuner, &halConfig);
+ return Utils::convertHalResult(rc);
+}
+
+Return<void> Tuner::getConfiguration(getConfiguration_cb _hidl_cb) {
+ int rc;
+ radio_hal_band_config_t halConfig;
+ BandConfig config;
+
+ ALOGV("%s", __FUNCTION__);
+ if (mHalTuner == NULL) {
+ rc = -ENODEV;
+ goto exit;
+ }
+ rc = mHalTuner->get_configuration(mHalTuner, &halConfig);
+ if (rc == 0) {
+ Utils::convertBandConfigFromHal(&config, &halConfig);
+ }
+
+exit:
+ _hidl_cb(Utils::convertHalResult(rc), config);
+ return Void();
+}
+
+Return<Result> Tuner::scan(Direction direction, bool skipSubChannel) {
+ if (mHalTuner == NULL) {
+ return Utils::convertHalResult(-ENODEV);
+ }
+ int rc = mHalTuner->scan(mHalTuner, static_cast<radio_direction_t>(direction), skipSubChannel);
+ return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::step(Direction direction, bool skipSubChannel) {
+ if (mHalTuner == NULL) {
+ return Utils::convertHalResult(-ENODEV);
+ }
+ int rc = mHalTuner->step(mHalTuner, static_cast<radio_direction_t>(direction), skipSubChannel);
+ return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::tune(uint32_t channel, uint32_t subChannel) {
+ if (mHalTuner == NULL) {
+ return Utils::convertHalResult(-ENODEV);
+ }
+ int rc = mHalTuner->tune(mHalTuner, channel, subChannel);
+ return Utils::convertHalResult(rc);
+}
+
+Return<Result> Tuner::cancel() {
+ if (mHalTuner == NULL) {
+ return Utils::convertHalResult(-ENODEV);
+ }
+ int rc = mHalTuner->cancel(mHalTuner);
+ return Utils::convertHalResult(rc);
+}
+
+Return<void> Tuner::getProgramInformation(getProgramInformation_cb _hidl_cb) {
+ ALOGV("%s", __FUNCTION__);
+ return getProgramInformation_1_1([&](Result result, const ProgramInfo& info) {
+ _hidl_cb(result, info.base);
+ });
+}
+
+Return<void> Tuner::getProgramInformation_1_1(getProgramInformation_1_1_cb _hidl_cb) {
+ int rc;
+ radio_program_info_t halInfo;
+ RadioMetadataWrapper metadataWrapper(&halInfo.metadata);
+ ProgramInfo info;
+
+ ALOGV("%s", __FUNCTION__);
+ if (mHalTuner == NULL) {
+ rc = -ENODEV;
+ goto exit;
+ }
+
+ rc = mHalTuner->get_program_information(mHalTuner, &halInfo);
+ if (rc == 0) {
+ Utils::convertProgramInfoFromHal(&info, &halInfo);
+ }
+
+exit:
+ _hidl_cb(Utils::convertHalResult(rc), info);
+ return Void();
+}
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
diff --git a/broadcastradio/1.1/default/Tuner.h b/broadcastradio/1.1/default/Tuner.h
new file mode 100644
index 0000000..1f3dc7f
--- /dev/null
+++ b/broadcastradio/1.1/default/Tuner.h
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
+
+#include <android/hardware/broadcastradio/1.1/ITuner.h>
+#include <android/hardware/broadcastradio/1.1/ITunerCallback.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Direction;
+
+struct BroadcastRadio;
+
+struct Tuner : public ITuner {
+
+ Tuner(const sp<V1_0::ITunerCallback>& callback, const wp<BroadcastRadio>& mParentDevice);
+
+ // Methods from ::android::hardware::broadcastradio::V1_1::ITuner follow.
+ Return<Result> setConfiguration(const BandConfig& config) override;
+ Return<void> getConfiguration(getConfiguration_cb _hidl_cb) override;
+ Return<Result> scan(Direction direction, bool skipSubChannel) override;
+ Return<Result> step(Direction direction, bool skipSubChannel) override;
+ Return<Result> tune(uint32_t channel, uint32_t subChannel) override;
+ Return<Result> cancel() override;
+ Return<void> getProgramInformation(getProgramInformation_cb _hidl_cb) override;
+ Return<void> getProgramInformation_1_1(getProgramInformation_1_1_cb _hidl_cb) override;
+
+ static void callback(radio_hal_event_t *halEvent, void *cookie);
+ void onCallback(radio_hal_event_t *halEvent);
+
+ void setHalTuner(const struct radio_tuner *halTuner) { mHalTuner = halTuner; }
+ const struct radio_tuner *getHalTuner() { return mHalTuner; }
+
+private:
+ ~Tuner();
+
+ const struct radio_tuner *mHalTuner;
+ const sp<V1_0::ITunerCallback> mCallback;
+ const sp<V1_1::ITunerCallback> mCallback1_1;
+ const wp<BroadcastRadio> mParentDevice;
+};
+
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
diff --git a/broadcastradio/1.1/default/Utils.cpp b/broadcastradio/1.1/default/Utils.cpp
new file mode 100644
index 0000000..6d4777d
--- /dev/null
+++ b/broadcastradio/1.1/default/Utils.cpp
@@ -0,0 +1,299 @@
+/*
+ * 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.
+ */
+#define LOG_TAG "BroadcastRadioHalUtils"
+//#define LOG_NDEBUG 0
+
+#include <log/log.h>
+#include <system/radio_metadata.h>
+
+#include "Utils.h"
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Band;
+using V1_0::Deemphasis;
+using V1_0::Direction;
+using V1_0::MetadataKey;
+using V1_0::MetadataType;
+using V1_0::Rds;
+
+const char *Utils::sClassModuleNames[] = {
+ RADIO_HARDWARE_MODULE_ID_FM, /* corresponds to RADIO_CLASS_AM_FM */
+ RADIO_HARDWARE_MODULE_ID_SAT, /* corresponds to RADIO_CLASS_SAT */
+ RADIO_HARDWARE_MODULE_ID_DT, /* corresponds to RADIO_CLASS_DT */
+};
+
+// make sure HIDL enum values are aligned with legacy values
+static_assert(RADIO_CLASS_AM_FM == static_cast<int>(Class::AM_FM),
+ "AM/FM class mismatch with legacy");
+static_assert(RADIO_CLASS_SAT == static_cast<int>(Class::SAT),
+ "SAT class mismatch with legacy");
+static_assert(RADIO_CLASS_DT == static_cast<int>(Class::DT),
+ "DT class mismatch with legacy");
+
+static_assert(RADIO_BAND_AM == static_cast<int>(Band::AM),
+ "AM band mismatch with legacy");
+static_assert(RADIO_BAND_FM == static_cast<int>(Band::FM),
+ "FM band mismatch with legacy");
+static_assert(RADIO_BAND_AM_HD == static_cast<int>(Band::AM_HD),
+ "AM HD band mismatch with legacy");
+static_assert(RADIO_BAND_FM_HD == static_cast<int>(Band::FM_HD),
+ "FM HD band mismatch with legacy");
+
+static_assert(RADIO_RDS_NONE == static_cast<int>(Rds::NONE),
+ "RDS NONE mismatch with legacy");
+static_assert(RADIO_RDS_WORLD == static_cast<int>(Rds::WORLD),
+ "RDS WORLD mismatch with legacy");
+static_assert(RADIO_RDS_US == static_cast<int>(Rds::US),
+ "RDS US mismatch with legacy");
+
+static_assert(RADIO_DEEMPHASIS_50 == static_cast<int>(Deemphasis::D50),
+ "De-emphasis 50 mismatch with legacy");
+static_assert(RADIO_DEEMPHASIS_75 == static_cast<int>(Deemphasis::D75),
+ "De-emphasis 75 mismatch with legacy");
+
+static_assert(RADIO_DIRECTION_UP == static_cast<int>(Direction::UP),
+ "Direction Up mismatch with legacy");
+static_assert(RADIO_DIRECTION_DOWN == static_cast<int>(Direction::DOWN),
+ "Direction Up mismatch with legacy");
+
+static_assert(RADIO_METADATA_TYPE_INVALID == static_cast<int>(MetadataType::INVALID),
+ "Metadata type INVALID mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_INT == static_cast<int>(MetadataType::INT),
+ "Metadata type INT mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_TEXT == static_cast<int>(MetadataType::TEXT),
+ "Metadata type TEXT mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_RAW == static_cast<int>(MetadataType::RAW),
+ "Metadata type RAW mismatch with legacy");
+static_assert(RADIO_METADATA_TYPE_CLOCK == static_cast<int>(MetadataType::CLOCK),
+ "Metadata type CLOCK mismatch with legacy");
+
+static_assert(RADIO_METADATA_KEY_INVALID == static_cast<int>(MetadataKey::INVALID),
+ "Metadata key INVALID mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PI == static_cast<int>(MetadataKey::RDS_PI),
+ "Metadata key RDS_PI mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PS == static_cast<int>(MetadataKey::RDS_PS),
+ "Metadata key RDS_PS mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_PTY == static_cast<int>(MetadataKey::RDS_PTY),
+ "Metadata key RDS_PTY mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RBDS_PTY == static_cast<int>(MetadataKey::RBDS_PTY),
+ "Metadata key RBDS_PTY mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_RDS_RT == static_cast<int>(MetadataKey::RDS_RT),
+ "Metadata key RDS_RT mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_TITLE == static_cast<int>(MetadataKey::TITLE),
+ "Metadata key TITLE mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ARTIST == static_cast<int>(MetadataKey::ARTIST),
+ "Metadata key ARTIST mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ALBUM == static_cast<int>(MetadataKey::ALBUM),
+ "Metadata key ALBUM mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_GENRE == static_cast<int>(MetadataKey::GENRE),
+ "Metadata key GENRE mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ICON == static_cast<int>(MetadataKey::ICON),
+ "Metadata key ICON mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_ART == static_cast<int>(MetadataKey::ART),
+ "Metadata key ART mismatch with legacy");
+static_assert(RADIO_METADATA_KEY_CLOCK == static_cast<int>(MetadataKey::CLOCK),
+ "Metadata key CLOCK mismatch with legacy");
+
+
+//static
+const char * Utils::getClassString(Class ClassId)
+{
+ int id = static_cast<int>(ClassId);
+
+ if ((id < 0) ||
+ (id >= NELEM(sClassModuleNames))) {
+ ALOGE("invalid class ID %d", id);
+ return NULL;
+ }
+ return sClassModuleNames[id];
+}
+
+//static
+Result Utils::convertHalResult(int rc)
+{
+ switch (rc) {
+ case 0:
+ return Result::OK;
+ case -EINVAL:
+ return Result::INVALID_ARGUMENTS;
+ case -ENOSYS:
+ return Result::INVALID_STATE;
+ case -ETIMEDOUT:
+ return Result::TIMEOUT;
+ case -ENODEV:
+ default:
+ return Result::NOT_INITIALIZED;
+ }
+}
+
+//static
+void Utils::convertBandConfigFromHal(
+ BandConfig *config,
+ const radio_hal_band_config_t *halConfig)
+{
+
+ config->type = static_cast<Band>(halConfig->type);
+ config->antennaConnected = halConfig->antenna_connected;
+ config->lowerLimit = halConfig->lower_limit;
+ config->upperLimit = halConfig->upper_limit;
+ config->spacings.setToExternal(const_cast<unsigned int *>(&halConfig->spacings[0]),
+ halConfig->num_spacings * sizeof(uint32_t));
+ // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+ config->spacings.resize(halConfig->num_spacings);
+
+ if (config->type == Band::FM) {
+ config->ext.fm.deemphasis = static_cast<Deemphasis>(halConfig->fm.deemphasis);
+ config->ext.fm.stereo = halConfig->fm.stereo;
+ config->ext.fm.rds = static_cast<Rds>(halConfig->fm.rds);
+ config->ext.fm.ta = halConfig->fm.ta;
+ config->ext.fm.af = halConfig->fm.af;
+ config->ext.fm.ea = halConfig->fm.ea;
+ } else {
+ config->ext.am.stereo = halConfig->am.stereo;
+ }
+}
+
+//static
+void Utils::convertPropertiesFromHal(Properties *properties,
+ const radio_hal_properties_t *halProperties)
+{
+ properties->classId = static_cast<Class>(halProperties->class_id);
+ properties->implementor.setToExternal(halProperties->implementor, strlen(halProperties->implementor));
+ properties->product.setToExternal(halProperties->product, strlen(halProperties->product));
+ properties->version.setToExternal(halProperties->version, strlen(halProperties->version));
+ properties->serial.setToExternal(halProperties->serial, strlen(halProperties->serial));
+ properties->numTuners = halProperties->num_tuners;
+ properties->numAudioSources = halProperties->num_audio_sources;
+ properties->supportsCapture = halProperties->supports_capture;
+
+ BandConfig *bands =
+ new BandConfig[halProperties->num_bands];
+ for (size_t i = 0; i < halProperties->num_bands; i++) {
+ convertBandConfigFromHal(&bands[i], &halProperties->bands[i]);
+ }
+ properties->bands.setToExternal(bands, halProperties->num_bands);
+ // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+ properties->bands.resize(halProperties->num_bands);
+ delete[] bands;
+}
+
+//static
+void Utils::convertBandConfigToHal(radio_hal_band_config_t *halConfig, const BandConfig *config)
+{
+ halConfig->type = static_cast<radio_band_t>(config->type);
+ halConfig->antenna_connected = config->antennaConnected;
+ halConfig->lower_limit = config->lowerLimit;
+ halConfig->upper_limit = config->upperLimit;
+ halConfig->num_spacings = config->spacings.size();
+ if (halConfig->num_spacings > RADIO_NUM_SPACINGS_MAX) {
+ halConfig->num_spacings = RADIO_NUM_SPACINGS_MAX;
+ }
+ memcpy(halConfig->spacings, config->spacings.data(),
+ sizeof(uint32_t) * halConfig->num_spacings);
+
+ if (config->type == Band::FM) {
+ halConfig->fm.deemphasis = static_cast<radio_deemphasis_t>(config->ext.fm.deemphasis);
+ halConfig->fm.stereo = config->ext.fm.stereo;
+ halConfig->fm.rds = static_cast<radio_rds_t>(config->ext.fm.rds);
+ halConfig->fm.ta = config->ext.fm.ta;
+ halConfig->fm.af = config->ext.fm.af;
+ halConfig->fm.ea = config->ext.fm.ea;
+ } else {
+ halConfig->am.stereo = config->ext.am.stereo;
+ }
+}
+
+
+//static
+void Utils::convertProgramInfoFromHal(ProgramInfo *info, radio_program_info_t *halInfo)
+{
+ auto &info_1_1 = *info;
+ auto &info_1_0 = info->base;
+
+ info_1_0.channel = halInfo->channel;
+ info_1_0.subChannel = halInfo->sub_channel;
+ info_1_0.tuned = halInfo->tuned;
+ info_1_0.stereo = halInfo->stereo;
+ info_1_0.digital = halInfo->digital;
+ info_1_0.signalStrength = halInfo->signal_strength;
+ convertMetaDataFromHal(info_1_0.metadata, halInfo->metadata);
+ // TODO(b/34348946): add support for HAL 1.1 fields
+ info_1_1.digitalStatus = DigitalStatus::INVALID;
+}
+
+//static
+int Utils::convertMetaDataFromHal(hidl_vec<MetaData>& metadata, radio_metadata_t *halMetadata)
+{
+ if (halMetadata == NULL) {
+ ALOGE("Invalid argument: halMetadata is NULL");
+ return 0;
+ }
+
+ int count = radio_metadata_get_count(halMetadata);
+ if (count <= 0) {
+ return count;
+ }
+ MetaData *newMetadata = new MetaData[count];
+ int outCount = 0;
+ for (int i = 0; i < count; i++) {
+ radio_metadata_key_t key;
+ radio_metadata_type_t type;
+ void *value;
+ size_t size;
+ if (radio_metadata_get_at_index(halMetadata, i , &key, &type, &value, &size) != 0 ||
+ size == 0) {
+ continue;
+ }
+ switch (type) {
+ case RADIO_METADATA_TYPE_INT: {
+ newMetadata[outCount].intValue = *(static_cast<int32_t *>(value));
+ } break;
+ case RADIO_METADATA_TYPE_TEXT: {
+ newMetadata[outCount].stringValue = static_cast<char *>(value);
+ } break;
+ case RADIO_METADATA_TYPE_RAW: {
+ newMetadata[outCount].rawValue.setToExternal(static_cast<uint8_t *>(value), size);
+ // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+ newMetadata[outCount].rawValue.resize(size);
+ } break;
+ case RADIO_METADATA_TYPE_CLOCK: {
+ radio_metadata_clock_t *clock = static_cast<radio_metadata_clock_t *>(value);
+ newMetadata[outCount].clockValue.utcSecondsSinceEpoch =
+ clock->utc_seconds_since_epoch;
+ newMetadata[outCount].clockValue.timezoneOffsetInMinutes =
+ clock->timezone_offset_in_minutes;
+ } break;
+ }
+ newMetadata[outCount].type = static_cast<MetadataType>(type);
+ newMetadata[outCount].key = static_cast<MetadataKey>(key);
+ outCount++;
+ }
+ metadata.setToExternal(newMetadata, outCount);
+ // FIXME: transfer buffer ownership. should have a method for that in hidl_vec
+ metadata.resize(outCount);
+ return outCount;
+}
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
diff --git a/broadcastradio/1.1/default/Utils.h b/broadcastradio/1.1/default/Utils.h
new file mode 100644
index 0000000..22902ba
--- /dev/null
+++ b/broadcastradio/1.1/default/Utils.h
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
+
+#include <android/hardware/broadcastradio/1.1/types.h>
+#include <hardware/radio.h>
+
+namespace android {
+namespace hardware {
+namespace broadcastradio {
+namespace V1_1 {
+namespace implementation {
+
+using V1_0::Class;
+using V1_0::BandConfig;
+using V1_0::MetaData;
+using V1_0::Properties;
+
+class Utils {
+public:
+ static const char * getClassString(Class ClassId);
+ static Result convertHalResult(int rc);
+ static void convertBandConfigFromHal(BandConfig *config,
+ const radio_hal_band_config_t *halConfig);
+ static void convertPropertiesFromHal(Properties *properties,
+ const radio_hal_properties_t *halProperties);
+ static void convertBandConfigToHal(radio_hal_band_config_t *halConfig,
+ const BandConfig *config);
+ static void convertProgramInfoFromHal(ProgramInfo *info,
+ radio_program_info_t *halInfo);
+ static int convertMetaDataFromHal(hidl_vec<MetaData>& metadata,
+ radio_metadata_t *halMetadata);
+private:
+ static const char * sClassModuleNames[];
+
+};
+
+} // namespace implementation
+} // namespace V1_1
+} // namespace broadcastradio
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_UTILS_H
diff --git a/broadcastradio/1.1/types.hal b/broadcastradio/1.1/types.hal
new file mode 100644
index 0000000..38f4b39
--- /dev/null
+++ b/broadcastradio/1.1/types.hal
@@ -0,0 +1,37 @@
+/*
+ * Copyright 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.
+ */
+
+package android.hardware.broadcastradio@1.1;
+
+import @1.0::types;
+
+typedef @1.0::Result Result;
+
+enum DigitalStatus : int32_t {
+ INVALID = -1,
+ UNAVAILABLE = 1, // current program is analog-only
+ AVAILABLE = 2, // digital mode is available, but disabled
+ BUFFERING = 3, // digital mode is available and buffering has started
+ ACTIVE = 4, // digital mode is currently playing
+};
+
+/* Radio program information. Returned by the HAL with event RADIO_EVENT_TUNED.
+ * Contains information on currently tuned channel.
+ */
+struct ProgramInfo {
+ @1.0::ProgramInfo base;
+ DigitalStatus digitalStatus;
+};
diff --git a/broadcastradio/1.1/vts/Android.mk b/broadcastradio/1.1/vts/Android.mk
new file mode 100644
index 0000000..0c4c55d
--- /dev/null
+++ b/broadcastradio/1.1/vts/Android.mk
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+include $(call all-subdir-makefiles)
diff --git a/broadcastradio/1.1/vts/functional/Android.bp b/broadcastradio/1.1/vts/functional/Android.bp
new file mode 100644
index 0000000..e10ddab
--- /dev/null
+++ b/broadcastradio/1.1/vts/functional/Android.bp
@@ -0,0 +1,37 @@
+//
+// 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_test {
+ name: "VtsHalBroadcastradioV1_1TargetTest",
+ gtest: true,
+ srcs: ["VtsHalBroadcastradioV1_1TargetTest.cpp"],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "libnativehelper",
+ "libutils",
+ "android.hardware.broadcastradio@1.0",
+ "android.hardware.broadcastradio@1.1",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "-O0",
+ "-g",
+ ],
+}
diff --git a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
new file mode 100644
index 0000000..873a10b
--- /dev/null
+++ b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
@@ -0,0 +1,476 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "BroadcastRadioHidlHalTest"
+#include <gtest/gtest.h>
+#include <android-base/logging.h>
+#include <cutils/native_handle.h>
+#include <cutils/properties.h>
+#include <hidl/HidlTransportSupport.h>
+#include <utils/threads.h>
+
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.0/IBroadcastRadio.h>
+#include <android/hardware/broadcastradio/1.1/ITuner.h>
+#include <android/hardware/broadcastradio/1.1/ITunerCallback.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
+
+
+namespace V1_0 = ::android::hardware::broadcastradio::V1_0;
+
+using ::android::sp;
+using ::android::Mutex;
+using ::android::Condition;
+using ::android::hardware::Return;
+using ::android::hardware::Status;
+using ::android::hardware::Void;
+using ::android::hardware::broadcastradio::V1_0::BandConfig;
+using ::android::hardware::broadcastradio::V1_0::Class;
+using ::android::hardware::broadcastradio::V1_0::Direction;
+using ::android::hardware::broadcastradio::V1_0::IBroadcastRadio;
+using ::android::hardware::broadcastradio::V1_0::MetaData;
+using ::android::hardware::broadcastradio::V1_0::Properties;
+using ::android::hardware::broadcastradio::V1_1::IBroadcastRadioFactory;
+using ::android::hardware::broadcastradio::V1_1::ITuner;
+using ::android::hardware::broadcastradio::V1_1::ITunerCallback;
+using ::android::hardware::broadcastradio::V1_1::ProgramInfo;
+using ::android::hardware::broadcastradio::V1_1::Result;
+
+
+// The main test class for Broadcast Radio HIDL HAL.
+
+class BroadcastRadioHidlTest : public ::testing::Test {
+ protected:
+ virtual void SetUp() override {
+ bool getStub = false;
+ char getsubProperty[PROPERTY_VALUE_MAX];
+ if (property_get("vts.hidl.get_stub", getsubProperty, "") > 0) {
+ if (!strcmp(getsubProperty, "true") ||
+ !strcmp(getsubProperty, "True") ||
+ !strcmp(getsubProperty, "1")) {
+ getStub = true;
+ }
+ }
+ auto factory = IBroadcastRadioFactory::getService(getStub);
+ if (factory != 0) {
+ factory->connectModule(Class::AM_FM,
+ [&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
+ if (retval == Result::OK) {
+ mRadio = IBroadcastRadio::castFrom(result);
+ }
+ });
+ }
+ mTunerCallback = new MyCallback(this);
+ ASSERT_NE(nullptr, mRadio.get());
+ ASSERT_EQ(!getStub, mRadio->isRemote());
+ ASSERT_NE(nullptr, mTunerCallback.get());
+ }
+
+ virtual void TearDown() override {
+ mTuner.clear();
+ mRadio.clear();
+ }
+
+ class MyCallback : public ITunerCallback {
+ public:
+
+ // ITunerCallback methods (see doc in ITunerCallback.hal)
+ virtual Return<void> hardwareFailure() {
+ ALOGI("%s", __FUNCTION__);
+ mParentTest->onHwFailureCallback();
+ return Void();
+ }
+
+ virtual Return<void> configChange(Result result, const BandConfig& config __unused) {
+ ALOGI("%s result %d", __FUNCTION__, result);
+ mParentTest->onResultCallback(result);
+ return Void();
+ }
+
+ virtual Return<void> tuneComplete(Result result __unused, const V1_0::ProgramInfo& info __unused) {
+ return Void();
+ }
+
+ virtual Return<void> tuneComplete_1_1(Result result, const ProgramInfo& info __unused) {
+ ALOGI("%s result %d", __FUNCTION__, result);
+ mParentTest->onResultCallback(result);
+ return Void();
+ }
+
+ virtual Return<void> afSwitch(const V1_0::ProgramInfo& info __unused) {
+ return Void();
+ }
+
+ virtual Return<void> afSwitch_1_1(const ProgramInfo& info __unused) {
+ return Void();
+ }
+
+ virtual Return<void> antennaStateChange(bool connected) {
+ ALOGI("%s connected %d", __FUNCTION__, connected);
+ return Void();
+ }
+
+ virtual Return<void> trafficAnnouncement(bool active) {
+ ALOGI("%s active %d", __FUNCTION__, active);
+ return Void();
+ }
+
+ virtual Return<void> emergencyAnnouncement(bool active) {
+ ALOGI("%s active %d", __FUNCTION__, active);
+ return Void();
+ }
+
+ virtual Return<void> newMetadata(uint32_t channel __unused, uint32_t subChannel __unused,
+ const ::android::hardware::hidl_vec<MetaData>& metadata __unused) {
+ ALOGI("%s", __FUNCTION__);
+ return Void();
+ }
+
+ MyCallback(BroadcastRadioHidlTest *parentTest) : mParentTest(parentTest) {}
+
+ private:
+ // BroadcastRadioHidlTest instance to which callbacks will be notified.
+ BroadcastRadioHidlTest *mParentTest;
+ };
+
+
+ /**
+ * Method called by MyCallback when a callback with no status or boolean value is received
+ */
+ void onCallback() {
+ Mutex::Autolock _l(mLock);
+ onCallback_l();
+ }
+
+ /**
+ * Method called by MyCallback when hardwareFailure() callback is received
+ */
+ void onHwFailureCallback() {
+ Mutex::Autolock _l(mLock);
+ mHwFailure = true;
+ onCallback_l();
+ }
+
+ /**
+ * Method called by MyCallback when a callback with status is received
+ */
+ void onResultCallback(Result result) {
+ Mutex::Autolock _l(mLock);
+ mResultCallbackData = result;
+ onCallback_l();
+ }
+
+ /**
+ * Method called by MyCallback when a boolean indication is received
+ */
+ void onBoolCallback(bool result) {
+ Mutex::Autolock _l(mLock);
+ mBoolCallbackData = result;
+ onCallback_l();
+ }
+
+
+ BroadcastRadioHidlTest() :
+ mCallbackCalled(false), mBoolCallbackData(false),
+ mResultCallbackData(Result::OK), mHwFailure(false) {}
+
+ void onCallback_l() {
+ if (!mCallbackCalled) {
+ mCallbackCalled = true;
+ mCallbackCond.broadcast();
+ }
+ }
+
+
+ bool waitForCallback(nsecs_t reltime = 0) {
+ Mutex::Autolock _l(mLock);
+ nsecs_t endTime = systemTime() + reltime;
+ while (!mCallbackCalled) {
+ if (reltime == 0) {
+ mCallbackCond.wait(mLock);
+ } else {
+ nsecs_t now = systemTime();
+ if (now > endTime) {
+ return false;
+ }
+ mCallbackCond.waitRelative(mLock, endTime - now);
+ }
+ }
+ return true;
+ }
+
+ bool getProperties();
+ bool openTuner();
+ bool checkAntenna();
+
+ static const nsecs_t kConfigCallbacktimeoutNs = seconds_to_nanoseconds(10);
+ static const nsecs_t kTuneCallbacktimeoutNs = seconds_to_nanoseconds(30);
+
+ sp<IBroadcastRadio> mRadio;
+ Properties mHalProperties;
+ sp<ITuner> mTuner;
+ sp<MyCallback> mTunerCallback;
+ Mutex mLock;
+ Condition mCallbackCond;
+ bool mCallbackCalled;
+ bool mBoolCallbackData;
+ Result mResultCallbackData;
+ bool mHwFailure;
+};
+
+// A class for test environment setup (kept since this file is a template).
+class BroadcastRadioHidlEnvironment : public ::testing::Environment {
+ public:
+ virtual void SetUp() {}
+ virtual void TearDown() {}
+};
+
+bool BroadcastRadioHidlTest::getProperties()
+{
+ if (mHalProperties.bands.size() == 0) {
+ Result halResult = Result::NOT_INITIALIZED;
+ Return<void> hidlReturn =
+ mRadio->getProperties([&](Result result, const Properties& properties) {
+ halResult = result;
+ if (result == Result::OK) {
+ mHalProperties = properties;
+ }
+ });
+
+ EXPECT_TRUE(hidlReturn.isOk());
+ EXPECT_EQ(Result::OK, halResult);
+ EXPECT_EQ(Class::AM_FM, mHalProperties.classId);
+ EXPECT_GT(mHalProperties.numTuners, 0u);
+ EXPECT_GT(mHalProperties.bands.size(), 0u);
+ }
+ return mHalProperties.bands.size() > 0;
+}
+
+bool BroadcastRadioHidlTest::openTuner()
+{
+ if (!getProperties()) {
+ return false;
+ }
+ if (mTuner.get() == nullptr) {
+ Result halResult = Result::NOT_INITIALIZED;
+ auto hidlReturn = mRadio->openTuner(mHalProperties.bands[0], true, mTunerCallback,
+ [&](Result result, const sp<V1_0::ITuner>& tuner) {
+ halResult = result;
+ if (result == Result::OK) {
+ mTuner = ITuner::castFrom(tuner);
+ }
+ });
+ EXPECT_TRUE(hidlReturn.isOk());
+ EXPECT_EQ(Result::OK, halResult);
+ EXPECT_TRUE(waitForCallback(kConfigCallbacktimeoutNs));
+ }
+ EXPECT_NE(nullptr, mTuner.get());
+ return nullptr != mTuner.get();
+}
+
+bool BroadcastRadioHidlTest::checkAntenna()
+{
+ BandConfig halConfig;
+ Result halResult = Result::NOT_INITIALIZED;
+ Return<void> hidlReturn =
+ mTuner->getConfiguration([&](Result result, const BandConfig& config) {
+ halResult = result;
+ if (result == Result::OK) {
+ halConfig = config;
+ }
+ });
+
+ return ((halResult == Result::OK) && (halConfig.antennaConnected == true));
+}
+
+
+/**
+ * Test IBroadcastRadio::getProperties() method
+ *
+ * Verifies that:
+ * - the HAL implements the method
+ * - the method returns 0 (no error)
+ * - the implementation class is AM_FM
+ * - the implementation supports at least one tuner
+ * - the implementation supports at one band
+ */
+TEST_F(BroadcastRadioHidlTest, GetProperties) {
+ EXPECT_TRUE(getProperties());
+}
+
+/**
+ * Test IBroadcastRadio::openTuner() method
+ *
+ * Verifies that:
+ * - the HAL implements the method
+ * - the method returns 0 (no error) and a valid ITuner interface
+ */
+TEST_F(BroadcastRadioHidlTest, OpenTuner) {
+ EXPECT_TRUE(openTuner());
+}
+
+/**
+ * Test ITuner::setConfiguration() and getConfiguration methods
+ *
+ * Verifies that:
+ * - the HAL implements both methods
+ * - the methods return 0 (no error)
+ * - the configuration callback is received within kConfigCallbacktimeoutNs ns
+ * - the configuration read back from HAl has the same class Id
+ */
+TEST_F(BroadcastRadioHidlTest, SetAndGetConfiguration) {
+ ASSERT_TRUE(openTuner());
+ // test setConfiguration
+ mCallbackCalled = false;
+ Return<Result> hidlResult = mTuner->setConfiguration(mHalProperties.bands[0]);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kConfigCallbacktimeoutNs));
+ EXPECT_EQ(Result::OK, mResultCallbackData);
+
+ // test getConfiguration
+ BandConfig halConfig;
+ Result halResult;
+ Return<void> hidlReturn =
+ mTuner->getConfiguration([&](Result result, const BandConfig& config) {
+ halResult = result;
+ if (result == Result::OK) {
+ halConfig = config;
+ }
+ });
+ EXPECT_TRUE(hidlReturn.isOk());
+ EXPECT_EQ(Result::OK, halResult);
+ EXPECT_EQ(mHalProperties.bands[0].type, halConfig.type);
+}
+
+/**
+ * Test ITuner::scan
+ *
+ * Verifies that:
+ * - the HAL implements the method
+ * - the method returns 0 (no error)
+ * - the tuned callback is received within kTuneCallbacktimeoutNs ns
+ */
+TEST_F(BroadcastRadioHidlTest, Scan) {
+ ASSERT_TRUE(openTuner());
+ ASSERT_TRUE(checkAntenna());
+ // test scan UP
+ mCallbackCalled = false;
+ Return<Result> hidlResult = mTuner->scan(Direction::UP, true);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+
+ // test scan DOWN
+ mCallbackCalled = false;
+ hidlResult = mTuner->scan(Direction::DOWN, true);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+}
+
+/**
+ * Test ITuner::step
+ *
+ * Verifies that:
+ * - the HAL implements the method
+ * - the method returns 0 (no error)
+ * - the tuned callback is received within kTuneCallbacktimeoutNs ns
+ */
+TEST_F(BroadcastRadioHidlTest, Step) {
+ ASSERT_TRUE(openTuner());
+ ASSERT_TRUE(checkAntenna());
+ // test step UP
+ mCallbackCalled = false;
+ Return<Result> hidlResult = mTuner->step(Direction::UP, true);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+
+ // test step DOWN
+ mCallbackCalled = false;
+ hidlResult = mTuner->step(Direction::DOWN, true);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+}
+
+/**
+ * Test ITuner::tune, getProgramInformation and cancel methods
+ *
+ * Verifies that:
+ * - the HAL implements the methods
+ * - the methods return 0 (no error)
+ * - the tuned callback is received within kTuneCallbacktimeoutNs ns after tune()
+ */
+TEST_F(BroadcastRadioHidlTest, TuneAndGetProgramInformationAndCancel) {
+ ASSERT_TRUE(openTuner());
+ ASSERT_TRUE(checkAntenna());
+
+ // test tune
+ ASSERT_GT(mHalProperties.bands[0].spacings.size(), 0u);
+ ASSERT_GT(mHalProperties.bands[0].upperLimit, mHalProperties.bands[0].lowerLimit);
+
+ // test scan UP
+ uint32_t lowerLimit = mHalProperties.bands[0].lowerLimit;
+ uint32_t upperLimit = mHalProperties.bands[0].upperLimit;
+ uint32_t spacing = mHalProperties.bands[0].spacings[0];
+
+ uint32_t channel =
+ lowerLimit + (((upperLimit - lowerLimit) / 2 + spacing - 1) / spacing) * spacing;
+ mCallbackCalled = false;
+ mResultCallbackData = Result::NOT_INITIALIZED;
+ Return<Result> hidlResult = mTuner->tune(channel, 0);
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+ EXPECT_TRUE(waitForCallback(kTuneCallbacktimeoutNs));
+
+ // test getProgramInformation
+ ProgramInfo halInfo;
+ Result halResult = Result::NOT_INITIALIZED;
+ Return<void> hidlReturn = mTuner->getProgramInformation_1_1(
+ [&](Result result, const ProgramInfo& info) {
+ halResult = result;
+ if (result == Result::OK) {
+ halInfo = info;
+ }
+ });
+ EXPECT_TRUE(hidlReturn.isOk());
+ EXPECT_EQ(Result::OK, halResult);
+ auto &halInfo_1_1 = halInfo.base;
+ if (mResultCallbackData == Result::OK) {
+ EXPECT_TRUE(halInfo_1_1.tuned);
+ EXPECT_LE(halInfo_1_1.channel, upperLimit);
+ EXPECT_GE(halInfo_1_1.channel, lowerLimit);
+ } else {
+ EXPECT_EQ(false, halInfo_1_1.tuned);
+ }
+
+ // test cancel
+ mTuner->tune(lowerLimit, 0);
+ hidlResult = mTuner->cancel();
+ EXPECT_TRUE(hidlResult.isOk());
+ EXPECT_EQ(Result::OK, hidlResult);
+}
+
+
+int main(int argc, char** argv) {
+ ::testing::AddGlobalTestEnvironment(new BroadcastRadioHidlEnvironment);
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGI("Test result = %d", status);
+ return status;
+}
diff --git a/broadcastradio/Android.bp b/broadcastradio/Android.bp
index 33f70eb..5cacbf3 100644
--- a/broadcastradio/Android.bp
+++ b/broadcastradio/Android.bp
@@ -2,4 +2,6 @@
subdirs = [
"1.0",
"1.0/vts/functional",
+ "1.1",
+ "1.1/vts/functional",
]
diff --git a/camera/device/3.2/default/Android.bp b/camera/device/3.2/default/Android.bp
index 62e3c3e..f638f6f 100644
--- a/camera/device/3.2/default/Android.bp
+++ b/camera/device/3.2/default/Android.bp
@@ -6,7 +6,6 @@
shared_libs: [
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libutils",
"libcutils",
"android.hardware.camera.device@3.2",
diff --git a/camera/provider/2.4/default/Android.bp b/camera/provider/2.4/default/Android.bp
index e0ae12f..7315292 100644
--- a/camera/provider/2.4/default/Android.bp
+++ b/camera/provider/2.4/default/Android.bp
@@ -6,7 +6,6 @@
shared_libs: [
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libutils",
"libcutils",
"android.hardware.camera.device@1.0",
@@ -34,7 +33,6 @@
"libhidlbase",
"libhidltransport",
"liblog",
- "libhwbinder",
"libutils",
"libhardware",
"android.hardware.camera.device@1.0",
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index e1e10f8..038e1dd 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -66,6 +66,7 @@
#define MAX_VIDEO_WIDTH 4096
#define MAX_VIDEO_HEIGHT 2160
#define STREAM_BUFFER_TIMEOUT 3 // sec.
+#define DUMP_OUTPUT "/dev/null"
struct AvailableStream {
int32_t width;
@@ -462,9 +463,11 @@
});
native_handle_t* raw_handle = native_handle_create(1, 0);
- raw_handle->data[0] = 1; // std out
+ raw_handle->data[0] = open(DUMP_OUTPUT, O_RDWR);
+ ASSERT_GE(raw_handle->data[0], 0);
hidl_handle handle = raw_handle;
device3_2->dumpState(handle);
+ close(raw_handle->data[0]);
native_handle_delete(raw_handle);
}
}
@@ -500,9 +503,11 @@
});
native_handle_t* raw_handle = native_handle_create(1, 0);
- raw_handle->data[0] = 1; // std out
+ raw_handle->data[0] = open(DUMP_OUTPUT, O_RDWR);
+ ASSERT_GE(raw_handle->data[0], 0);
hidl_handle handle = raw_handle;
device3_2->dumpState(handle);
+ close(raw_handle->data[0]);
native_handle_delete(raw_handle);
session->close();
diff --git a/configstore/1.0/default/Android.mk b/configstore/1.0/default/Android.mk
index 116126d..b168029 100644
--- a/configstore/1.0/default/Android.mk
+++ b/configstore/1.0/default/Android.mk
@@ -13,7 +13,6 @@
libbase \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
android.hardware.configstore@1.0 \
android.hidl.base@1.0
@@ -35,7 +34,6 @@
libutils \
libhidlbase \
libhidltransport \
- libhwbinder \
android.hardware.configstore@1.0 \
include $(BUILD_EXECUTABLE)
diff --git a/configstore/utils/Android.bp b/configstore/utils/Android.bp
index 32053a7..09ab5b2 100644
--- a/configstore/utils/Android.bp
+++ b/configstore/utils/Android.bp
@@ -14,15 +14,13 @@
// limitations under the License.
//
-cc_library_static {
+cc_library_headers {
name: "android.hardware.configstore-utils",
export_include_dirs: ["include"],
- srcs: [],
shared_libs: [
- "android.hardware.configstore@1.0",
+ "libhidlbase"
],
export_shared_lib_headers: [
- "android.hardware.configstore@1.0",
+ "libhidlbase"
],
}
-
diff --git a/contexthub/1.0/default/Android.bp b/contexthub/1.0/default/Android.bp
index 0e1dc77..32ab0e0 100644
--- a/contexthub/1.0/default/Android.bp
+++ b/contexthub/1.0/default/Android.bp
@@ -23,7 +23,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libcutils",
"libutils",
diff --git a/contexthub/1.0/default/Android.mk b/contexthub/1.0/default/Android.mk
index cc36b7f..538a6b2 100644
--- a/contexthub/1.0/default/Android.mk
+++ b/contexthub/1.0/default/Android.mk
@@ -16,7 +16,6 @@
libhardware_legacy \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libutils \
android.hardware.contexthub@1.0 \
diff --git a/contexthub/1.0/default/service.cpp b/contexthub/1.0/default/service.cpp
index db9a4e7..8c676b4 100644
--- a/contexthub/1.0/default/service.cpp
+++ b/contexthub/1.0/default/service.cpp
@@ -23,5 +23,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IContexthub>("context_hub");
+ return defaultPassthroughServiceImplementation<IContexthub>();
}
diff --git a/contexthub/1.0/vts/Contexthub.vts b/contexthub/1.0/vts/Contexthub.vts
deleted file mode 100644
index a5cdc81..0000000
--- a/contexthub/1.0/vts/Contexthub.vts
+++ /dev/null
@@ -1,147 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IContexthub"
-
-package: "android.hardware.contexthub"
-
-import: "android.hardware.contexthub@1.0::IContexthubCallback"
-import: "android.hardware.contexthub@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getHubs"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::ContextHub"
- }
- }
- }
-
- api: {
- name: "registerCallback"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::contexthub::V1_0::IContexthubCallback"
- }
- }
-
- api: {
- name: "sendMessageToHub"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::ContextHubMsg"
- }
- }
-
- api: {
- name: "loadNanoApp"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::NanoAppBinary"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "unloadNanoApp"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "enableNanoApp"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "disableNanoApp"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "queryApps"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
-}
diff --git a/contexthub/1.0/vts/ContexthubCallback.vts b/contexthub/1.0/vts/ContexthubCallback.vts
deleted file mode 100644
index 59ff2fe..0000000
--- a/contexthub/1.0/vts/ContexthubCallback.vts
+++ /dev/null
@@ -1,62 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IContexthubCallback"
-
-package: "android.hardware.contexthub"
-
-import: "android.hardware.contexthub@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "handleClientMsg"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::ContextHubMsg"
- }
- }
-
- api: {
- name: "handleTxnResult"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::TransactionResult"
- }
- }
-
- api: {
- name: "handleHubEvent"
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::AsyncEventType"
- }
- }
-
- api: {
- name: "handleAppAbort"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "handleAppsInfo"
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::HubAppInfo"
- }
- }
- }
-
-}
diff --git a/contexthub/1.0/vts/types.vts b/contexthub/1.0/vts/types.vts
deleted file mode 100644
index 4f5dfcf..0000000
--- a/contexthub/1.0/vts/types.vts
+++ /dev/null
@@ -1,477 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.contexthub"
-
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::Result"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "OK"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "UNKNOWN_FAILURE"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "BAD_PARAMS"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "NOT_INIT"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "TRANSACTION_FAILED"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "TRANSACTION_PENDING"
- scalar_value: {
- uint32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::NanoAppFlags"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SIGNED"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "ENCRYPTED"
- scalar_value: {
- uint32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::NanoAppBinary"
- type: TYPE_STRUCT
- struct_value: {
- name: "appId"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "appVersion"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "flags"
- type: TYPE_MASK
- scalar_type: "uint32_t"
- predefined_type: "::android::hardware::contexthub::V1_0::NanoAppFlags"
- }
- struct_value: {
- name: "targetChreApiMajorVersion"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "targetChreApiMinorVersion"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "customBinary"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::SensorType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "RESERVED"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "ACCELEROMETER"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "GYROSCOPE"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "MAGNETOMETER"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "BAROMETER"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "PROXIMITY_SENSOR"
- scalar_value: {
- uint32_t: 5
- }
- enumerator: "AMBIENT_LIGHT_SENSOR"
- scalar_value: {
- uint32_t: 6
- }
- enumerator: "STATIONARY_DETECT"
- scalar_value: {
- uint32_t: 7
- }
- enumerator: "INSTANT_MOTION_DETECT"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "GPS"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "WIFI"
- scalar_value: {
- uint32_t: 512
- }
- enumerator: "AUDIO"
- scalar_value: {
- uint32_t: 768
- }
- enumerator: "CAMERA"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "BLE"
- scalar_value: {
- uint32_t: 1280
- }
- enumerator: "WWAN"
- scalar_value: {
- uint32_t: 1536
- }
- enumerator: "PRIVATE_SENSOR_BASE"
- scalar_value: {
- uint32_t: 65536
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::PhysicalSensor"
- type: TYPE_STRUCT
- struct_value: {
- name: "sensorType"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::SensorType"
- }
- struct_value: {
- name: "type"
- type: TYPE_STRING
- }
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "vendor"
- type: TYPE_STRING
- }
- struct_value: {
- name: "version"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "fifoReservedCount"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "fifoMaxCount"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "minDelayMs"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "maxDelayMs"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "peakPowerMw"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::ContextHub"
- type: TYPE_STRUCT
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "vendor"
- type: TYPE_STRING
- }
- struct_value: {
- name: "toolchain"
- type: TYPE_STRING
- }
- struct_value: {
- name: "platformVersion"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "toolchainVersion"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "hubId"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "peakMips"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "stoppedPowerDrawMw"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "sleepPowerDrawMw"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "peakPowerDrawMw"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "connectedSensors"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::PhysicalSensor"
- }
- }
- struct_value: {
- name: "maxSupportedMsgLen"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "chrePlatformId"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "chreApiMajorVersion"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "chreApiMinorVersion"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "chrePatchVersion"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::HostEndPoint"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint16_t"
-
- enumerator: "BROADCAST"
- scalar_value: {
- uint16_t: 65535
- }
- enumerator: "UNSPECIFIED"
- scalar_value: {
- uint16_t: 65534
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::ContextHubMsg"
- type: TYPE_STRUCT
- struct_value: {
- name: "appName"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "hostEndPoint"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
- struct_value: {
- name: "msgType"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "msg"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::HubMemoryType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "MAIN"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "SECONDARY"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "TCM"
- scalar_value: {
- uint32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "READ"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "WRITE"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "EXEC"
- scalar_value: {
- uint32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::MemRange"
- type: TYPE_STRUCT
- struct_value: {
- name: "totalBytes"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "freeBytes"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryType"
- }
- struct_value: {
- name: "flags"
- type: TYPE_MASK
- scalar_type: "uint32_t"
- predefined_type: "::android::hardware::contexthub::V1_0::HubMemoryFlag"
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::AsyncEventType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "RESTARTED"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::TransactionResult"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "FAILURE"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::contexthub::V1_0::HubAppInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "appId"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "version"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "memUsage"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::contexthub::V1_0::MemRange"
- }
- }
- struct_value: {
- name: "enabled"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
-}
-
diff --git a/drm/1.0/default/Android.mk b/drm/1.0/default/Android.mk
index ea6cca0..f2334a0 100644
--- a/drm/1.0/default/Android.mk
+++ b/drm/1.0/default/Android.mk
@@ -32,7 +32,6 @@
libhidlbase \
libhidltransport \
libhardware \
- libhwbinder \
liblog \
libutils \
@@ -64,7 +63,6 @@
libhidlbase \
libhidlmemory \
libhidltransport \
- libhwbinder \
liblog \
libmediadrm \
libstagefright_foundation \
diff --git a/drm/1.0/default/DrmPlugin.cpp b/drm/1.0/default/DrmPlugin.cpp
index 1b2f90e..6f51e0e 100644
--- a/drm/1.0/default/DrmPlugin.cpp
+++ b/drm/1.0/default/DrmPlugin.cpp
@@ -321,6 +321,7 @@
Return<void> DrmPlugin::setListener(const sp<IDrmPluginListener>& listener) {
mListener = listener;
+ mLegacyPlugin->setListener(listener == NULL ? NULL : this);
return Void();
}
@@ -372,8 +373,10 @@
break;
}
if (sendEvent) {
- mListener->sendEvent(eventType, toHidlVec(*sessionId),
- toHidlVec(*data));
+ Vector<uint8_t> emptyVector;
+ mListener->sendEvent(eventType,
+ toHidlVec(sessionId == NULL ? emptyVector: *sessionId),
+ toHidlVec(data == NULL ? emptyVector: *data));
}
}
diff --git a/dumpstate/1.0/default/Android.mk b/dumpstate/1.0/default/Android.mk
index ed9ef97..0b07f49 100644
--- a/dumpstate/1.0/default/Android.mk
+++ b/dumpstate/1.0/default/Android.mk
@@ -16,7 +16,6 @@
libdumpstateutil \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libutils
diff --git a/dumpstate/1.0/default/service.cpp b/dumpstate/1.0/default/service.cpp
index 0d5bd94..85bea12 100644
--- a/dumpstate/1.0/default/service.cpp
+++ b/dumpstate/1.0/default/service.cpp
@@ -29,6 +29,6 @@
int main (int /* argc */, char * /* argv */ []) {
sp<IDumpstateDevice> dumpstate = new DumpstateDevice;
configureRpcThreadpool(1, true);
- dumpstate->registerAsService("dumpstate");
+ dumpstate->registerAsService();
joinRpcThreadpool();
}
diff --git a/evs/1.0/default/Android.bp b/evs/1.0/default/Android.bp
index 7be365a..c47f035 100644
--- a/evs/1.0/default/Android.bp
+++ b/evs/1.0/default/Android.bp
@@ -19,7 +19,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
],
diff --git a/gatekeeper/1.0/default/Android.mk b/gatekeeper/1.0/default/Android.mk
index 94dc1ea..d084535 100644
--- a/gatekeeper/1.0/default/Android.mk
+++ b/gatekeeper/1.0/default/Android.mk
@@ -14,7 +14,6 @@
libhardware \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
liblog \
@@ -35,7 +34,6 @@
libhardware \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
liblog \
diff --git a/gatekeeper/1.0/default/service.cpp b/gatekeeper/1.0/default/service.cpp
index 407cf71..5cbdafb 100644
--- a/gatekeeper/1.0/default/service.cpp
+++ b/gatekeeper/1.0/default/service.cpp
@@ -24,5 +24,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IGatekeeper>("gatekeeper");
+ return defaultPassthroughServiceImplementation<IGatekeeper>();
}
diff --git a/gatekeeper/1.0/vts/Gatekeeper.vts b/gatekeeper/1.0/vts/Gatekeeper.vts
deleted file mode 100644
index 9e63488..0000000
--- a/gatekeeper/1.0/vts/Gatekeeper.vts
+++ /dev/null
@@ -1,94 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IGatekeeper"
-
-package: "android.hardware.gatekeeper"
-
-import: "android.hardware.gatekeeper@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "enroll"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- }
-
- api: {
- name: "verify"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- }
-
- api: {
- name: "deleteUser"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "deleteAllUsers"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
- }
- }
-
-}
diff --git a/gatekeeper/1.0/vts/functional/Android.bp b/gatekeeper/1.0/vts/functional/Android.bp
index 0b6ecfe..080152d 100644
--- a/gatekeeper/1.0/vts/functional/Android.bp
+++ b/gatekeeper/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.gatekeeper@1.0",
diff --git a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
index 67b4482..bdc3956 100644
--- a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
+++ b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
@@ -187,7 +187,7 @@
GatekeeperHidlTest() : uid_(0) {}
virtual void SetUp() override {
GatekeeperResponse rsp;
- gatekeeper_ = IGatekeeper::getService("gatekeeper");
+ gatekeeper_ = IGatekeeper::getService();
ASSERT_NE(nullptr, gatekeeper_.get());
doDeleteAllUsers(rsp);
}
@@ -281,7 +281,6 @@
*/
TEST_F(GatekeeperHidlTest, UntrustedReenroll) {
GatekeeperResponse enrollRsp;
- GatekeeperRequest reenrollReq;
GatekeeperResponse reenrollRsp;
GatekeeperResponse verifyRsp;
GatekeeperResponse reenrollVerifyRsp;
@@ -349,6 +348,37 @@
}
/**
+ * Ensure we can not delete a user that does not exist
+ */
+TEST_F(GatekeeperHidlTest, DeleteInvalidUserTest) {
+ hidl_vec<uint8_t> password;
+ GatekeeperResponse enrollRsp;
+ GatekeeperResponse verifyRsp;
+ GatekeeperResponse delRsp1;
+ GatekeeperResponse delRsp2;
+ ALOGI("Testing deleteUser (expected failure)");
+ setUid(10002);
+ generatePassword(password, 0);
+ enrollNewPassword(password, enrollRsp, true);
+ verifyPassword(password, enrollRsp.data, 0, verifyRsp, true);
+ ALOGI("Enroll+Verify done");
+
+ // Delete the user
+ doDeleteUser(delRsp1);
+ EXPECT_EQ(UINT32_C(0), delRsp1.data.size());
+ EXPECT_TRUE(delRsp1.code == GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED ||
+ delRsp1.code == GatekeeperStatusCode::STATUS_OK);
+
+ // Delete the user again
+ doDeleteUser(delRsp2);
+ EXPECT_EQ(UINT32_C(0), delRsp2.data.size());
+ EXPECT_TRUE(delRsp2.code == GatekeeperStatusCode::ERROR_NOT_IMPLEMENTED ||
+ delRsp2.code == GatekeeperStatusCode::ERROR_GENERAL_FAILURE);
+ ALOGI("DeleteUser done");
+ ALOGI("Testing deleteUser done: rsp=%" PRIi32, delRsp2.code);
+}
+
+/**
* Ensure we can not verify passwords after we enrolled them and then deleted
* all users
*/
diff --git a/gatekeeper/1.0/vts/types.vts b/gatekeeper/1.0/vts/types.vts
deleted file mode 100644
index 3de9a14..0000000
--- a/gatekeeper/1.0/vts/types.vts
+++ /dev/null
@@ -1,59 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.gatekeeper"
-
-
-attribute: {
- name: "::android::hardware::gatekeeper::V1_0::GatekeeperStatusCode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STATUS_REENROLL"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "STATUS_OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ERROR_GENERAL_FAILURE"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "ERROR_RETRY_TIMEOUT"
- scalar_value: {
- int32_t: -2
- }
- enumerator: "ERROR_NOT_IMPLEMENTED"
- scalar_value: {
- int32_t: -3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::gatekeeper::V1_0::GatekeeperResponse"
- type: TYPE_STRUCT
- struct_value: {
- name: "code"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::gatekeeper::V1_0::GatekeeperStatusCode"
- }
- struct_value: {
- name: "timeout"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "data"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
diff --git a/gnss/1.0/default/Android.mk b/gnss/1.0/default/Android.mk
index b4ef9a8..5ad5e50 100644
--- a/gnss/1.0/default/Android.mk
+++ b/gnss/1.0/default/Android.mk
@@ -23,7 +23,6 @@
liblog \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
android.hardware.gnss@1.0 \
libhardware
@@ -50,7 +49,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.gnss@1.0 \
diff --git a/gnss/1.0/default/Gnss.cpp b/gnss/1.0/default/Gnss.cpp
index 10024fb..9493737 100644
--- a/gnss/1.0/default/Gnss.cpp
+++ b/gnss/1.0/default/Gnss.cpp
@@ -676,7 +676,7 @@
return mGnssBatching;
}
-IGnss* HIDL_FETCH_IGnss(const char* hal) {
+IGnss* HIDL_FETCH_IGnss(const char* /* hal */) {
hw_module_t* module;
IGnss* iface = nullptr;
int err = hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module);
@@ -687,10 +687,10 @@
if (err == 0) {
iface = new Gnss(reinterpret_cast<gps_device_t*>(device));
} else {
- ALOGE("gnssDevice open %s failed: %d", hal, err);
+ ALOGE("gnssDevice open %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
}
} else {
- ALOGE("gnss hw_get_module %s failed: %d", hal, err);
+ ALOGE("gnss hw_get_module %s failed: %d", GPS_HARDWARE_MODULE_ID, err);
}
return iface;
}
diff --git a/gnss/1.0/default/service.cpp b/gnss/1.0/default/service.cpp
index 4e040c5..5a8acc1 100644
--- a/gnss/1.0/default/service.cpp
+++ b/gnss/1.0/default/service.cpp
@@ -8,5 +8,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IGnss>("gnss");
+ return defaultPassthroughServiceImplementation<IGnss>();
}
diff --git a/gnss/1.0/vts/functional/Android.bp b/gnss/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..5e27b67
--- /dev/null
+++ b/gnss/1.0/vts/functional/Android.bp
@@ -0,0 +1,36 @@
+//
+// 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_test {
+ name: "VtsHalGnssV1_0TargetTest",
+ gtest: true,
+ srcs: ["VtsHalGnssV1_0TargetTest.cpp"],
+ shared_libs: [
+ "android.hardware.gnss@1.0",
+ "libbase",
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libnativehelper",
+ "libutils",
+ ],
+ static_libs: ["libgtest"],
+ cflags: [
+ "-O0",
+ "-g",
+ ],
+}
\ No newline at end of file
diff --git a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
new file mode 100644
index 0000000..3a9de9a
--- /dev/null
+++ b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
@@ -0,0 +1,279 @@
+/*
+ * 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.
+ */
+
+#define LOG_TAG "VtsHalGnssV1_0TargetTest"
+#include <android/hardware/gnss/1.0/IGnss.h>
+#include <android/log.h>
+
+#include <gtest/gtest.h>
+
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+using android::hardware::Return;
+using android::hardware::Void;
+
+using android::hardware::gnss::V1_0::GnssLocation;
+using android::hardware::gnss::V1_0::GnssLocationFlags;
+using android::hardware::gnss::V1_0::IGnss;
+using android::hardware::gnss::V1_0::IGnssCallback;
+using android::sp;
+
+#define TIMEOUT_SECONDS 5 // for basic commands/responses
+
+// The main test class for GNSS HAL.
+class GnssHalTest : public ::testing::Test {
+ public:
+ virtual void SetUp() override {
+ /* TODO(b/35678469): Setup the init.rc for VTS such that there's a
+ * single caller
+ * to the GNSS HAL - as part of confirming that the info & capabilities
+ * callbacks trigger.
+ */
+
+ gnss_hal_ = IGnss::getService();
+ ASSERT_NE(gnss_hal_, nullptr);
+
+ gnss_cb_ = new GnssCallback(*this);
+ ASSERT_NE(gnss_cb_, nullptr);
+
+ auto result = gnss_hal_->setCallback(gnss_cb_);
+ if (!result.isOk()) {
+ ALOGE("result of failed callback set %s", result.description().c_str());
+ }
+
+ ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result);
+
+ /* TODO(b/35678469): Implement the capabilities & info (year) checks &
+ * value store here.
+ */
+ }
+
+ virtual void TearDown() override {
+ if (gnss_hal_ != nullptr) {
+ gnss_hal_->cleanup();
+ }
+ }
+
+ /* Used as a mechanism to inform the test that a callback has occurred */
+ inline void notify() {
+ std::unique_lock<std::mutex> lock(mtx_);
+ count++;
+ cv_.notify_one();
+ }
+
+ /* Test code calls this function to wait for a callback */
+ inline std::cv_status wait(int timeoutSeconds) {
+ std::unique_lock<std::mutex> lock(mtx_);
+
+ std::cv_status status = std::cv_status::no_timeout;
+ auto now = std::chrono::system_clock::now();
+ while (count == 0) {
+ status = cv_.wait_until(lock, now + std::chrono::seconds(timeoutSeconds));
+ if (status == std::cv_status::timeout) return status;
+ }
+ count--;
+ return status;
+ }
+
+ /* Callback class for data & Event. */
+ class GnssCallback : public IGnssCallback {
+ GnssHalTest& parent_;
+
+ public:
+ GnssCallback(GnssHalTest& parent) : parent_(parent){};
+
+ virtual ~GnssCallback() = default;
+
+ // Dummy callback handlers
+ Return<void> gnssStatusCb(
+ const IGnssCallback::GnssStatusValue status) override {
+ return Void();
+ }
+ Return<void> gnssSvStatusCb(
+ const IGnssCallback::GnssSvStatus& svStatus) override {
+ return Void();
+ }
+ Return<void> gnssNmeaCb(
+ int64_t timestamp,
+ const android::hardware::hidl_string& nmea) override {
+ return Void();
+ }
+ Return<void> gnssAcquireWakelockCb() override { return Void(); }
+ Return<void> gnssReleaseWakelockCb() override { return Void(); }
+ Return<void> gnssRequestTimeCb() override { return Void(); }
+
+ // Actual (test) callback handlers
+ Return<void> gnssLocationCb(const GnssLocation& location) override {
+ ALOGI("Location received");
+ parent_.location_called_count_++;
+ parent_.last_location_ = location;
+ parent_.notify();
+ return Void();
+ }
+
+ Return<void> gnssSetCapabilitesCb(uint32_t capabilities) override {
+ ALOGI("Capabilities received %d", capabilities);
+ parent_.capabilities_called_count_++;
+ parent_.last_capabilities_ = capabilities;
+ parent_.notify();
+ return Void();
+ }
+
+ Return<void> gnssSetSystemInfoCb(
+ const IGnssCallback::GnssSystemInfo& info) override {
+ ALOGI("Info received, year %d", info.yearOfHw);
+ parent_.info_called_count_++;
+ parent_.last_info_ = info;
+ parent_.notify();
+ return Void();
+ }
+ };
+
+ sp<IGnss> gnss_hal_; // GNSS HAL to call into
+ sp<IGnssCallback> gnss_cb_; // Primary callback interface
+
+ /* Count of calls to set the following items, and the latest item (used by
+ * test.)
+ */
+ int capabilities_called_count_;
+ uint32_t last_capabilities_;
+
+ int location_called_count_;
+ GnssLocation last_location_;
+
+ int info_called_count_;
+ IGnssCallback::GnssSystemInfo last_info_;
+
+ private:
+ std::mutex mtx_;
+ std::condition_variable cv_;
+ int count;
+};
+
+/*
+ * SetCallbackCapabilitiesCleanup:
+ * Sets up the callback, awaits the capabilities, and calls cleanup
+ *
+ * Since this is just the basic operation of SetUp() and TearDown(),
+ * the function definition is intentionally kept empty
+ */
+TEST_F(GnssHalTest, SetCallbackCapabilitiesCleanup) {}
+
+void CheckLocation(GnssLocation& location) {
+ EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_LAT_LONG);
+ EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_ALTITUDE);
+ EXPECT_TRUE(location.gnssLocationFlags & GnssLocationFlags::HAS_SPEED);
+ EXPECT_TRUE(location.gnssLocationFlags &
+ GnssLocationFlags::HAS_HORIZONTAL_ACCURACY);
+ EXPECT_GE(location.latitudeDegrees, -90.0);
+ EXPECT_LE(location.latitudeDegrees, 90.0);
+ EXPECT_GE(location.longitudeDegrees, -180.0);
+ EXPECT_LE(location.longitudeDegrees, 180.0);
+ EXPECT_GE(location.altitudeMeters, -1000.0);
+ EXPECT_LE(location.altitudeMeters, 30000.0);
+ EXPECT_GE(location.speedMetersPerSec, 0.0);
+ EXPECT_LE(location.speedMetersPerSec, 5.0); // VTS tests are stationary.
+
+ /*
+ * Tolerating some especially high values for accuracy estimate, in case of
+ * first fix with especially poor geoemtry (happens occasionally)
+ */
+ EXPECT_GT(location.horizontalAccuracyMeters, 0.0);
+ EXPECT_LE(location.horizontalAccuracyMeters, 200.0);
+
+ /*
+ * Some devices may define bearing as -180 to +180, others as 0 to 360.
+ * Both are okay & understandable.
+ */
+ if (location.gnssLocationFlags & GnssLocationFlags::HAS_BEARING) {
+ EXPECT_GE(location.bearingDegrees, -180.0);
+ EXPECT_LE(location.bearingDegrees, 360.0);
+ }
+ if (location.gnssLocationFlags & GnssLocationFlags::HAS_VERTICAL_ACCURACY) {
+ EXPECT_GT(location.verticalAccuracyMeters, 0.0);
+ EXPECT_LE(location.verticalAccuracyMeters, 500.0);
+ }
+ if (location.gnssLocationFlags & GnssLocationFlags::HAS_SPEED_ACCURACY) {
+ EXPECT_GT(location.speedAccuracyMetersPerSecond, 0.0);
+ EXPECT_LE(location.speedAccuracyMetersPerSecond, 50.0);
+ }
+ if (location.gnssLocationFlags & GnssLocationFlags::HAS_BEARING_ACCURACY) {
+ EXPECT_GT(location.bearingAccuracyDegrees, 0.0);
+ EXPECT_LE(location.bearingAccuracyDegrees, 360.0);
+ }
+
+ // Check timestamp > 1.48e12 (47 years in msec - 1970->2017+)
+ EXPECT_GT(location.timestamp, 1.48e12);
+
+ /* TODO(b/35678469): Check if the hardware year is 2017+, and if so,
+ * that bearing, plus vertical, speed & bearing accuracy are present.
+ * And allow bearing to be not present, only if associated with a speed of 0.0
+ */
+}
+
+/*
+ * GetLocation:
+ * Turns on location, waits 45 second for at least 5 locations,
+ * and checks them for reasonable validity.
+ */
+TEST_F(GnssHalTest, GetLocation) {
+#define MIN_INTERVAL_MSEC 500
+#define PREFERRED_ACCURACY 0 // Ideally perfect (matches GnssLocationProvider)
+#define PREFERRED_TIME_MSEC 0 // Ideally immediate
+
+#define LOCATION_TIMEOUT_FIRST_SEC 45
+#define LOCATION_TIMEOUT_SUBSEQUENT_SEC 3
+#define LOCATIONS_TO_CHECK 5
+
+ auto result = gnss_hal_->setPositionMode(
+ IGnss::GnssPositionMode::MS_BASED,
+ IGnss::GnssPositionRecurrence::RECURRENCE_PERIODIC, MIN_INTERVAL_MSEC,
+ PREFERRED_ACCURACY, PREFERRED_TIME_MSEC);
+
+ ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result);
+
+ result = gnss_hal_->start();
+
+ ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result);
+
+ EXPECT_EQ(std::cv_status::no_timeout, wait(LOCATION_TIMEOUT_FIRST_SEC));
+ EXPECT_EQ(location_called_count_, 1);
+ CheckLocation(last_location_);
+
+ for (int i = 1; i < LOCATIONS_TO_CHECK; i++) {
+ EXPECT_EQ(std::cv_status::no_timeout,
+ wait(LOCATION_TIMEOUT_SUBSEQUENT_SEC));
+ EXPECT_EQ(location_called_count_, i + 1);
+ CheckLocation(last_location_);
+ }
+
+ result = gnss_hal_->stop();
+
+ ASSERT_TRUE(result.isOk());
+ ASSERT_TRUE(result);
+}
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ int status = RUN_ALL_TESTS();
+ ALOGI("Test result = %d", status);
+ return status;
+}
diff --git a/gnss/Android.bp b/gnss/Android.bp
index bbb3e4b..33f70eb 100644
--- a/gnss/Android.bp
+++ b/gnss/Android.bp
@@ -1,4 +1,5 @@
// This is an autogenerated file, do not edit.
subdirs = [
"1.0",
+ "1.0/vts/functional",
]
diff --git a/graphics/allocator/2.0/default/Android.bp b/graphics/allocator/2.0/default/Android.bp
index 315893f..67409d7 100644
--- a/graphics/allocator/2.0/default/Android.bp
+++ b/graphics/allocator/2.0/default/Android.bp
@@ -11,7 +11,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
],
@@ -28,7 +27,6 @@
"android.hardware.graphics.allocator@2.0",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
],
diff --git a/graphics/allocator/2.0/default/service.cpp b/graphics/allocator/2.0/default/service.cpp
index 525b342..a43740c 100644
--- a/graphics/allocator/2.0/default/service.cpp
+++ b/graphics/allocator/2.0/default/service.cpp
@@ -24,5 +24,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IAllocator>("gralloc");
+ return defaultPassthroughServiceImplementation<IAllocator>();
}
diff --git a/graphics/allocator/2.0/vts/Allocator.vts b/graphics/allocator/2.0/vts/Allocator.vts
deleted file mode 100644
index b26876d..0000000
--- a/graphics/allocator/2.0/vts/Allocator.vts
+++ /dev/null
@@ -1,88 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IAllocator"
-
-package: "android.hardware.graphics.allocator"
-
-import: "android.hardware.graphics.allocator@2.0::IAllocatorClient"
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::IAllocator::Capability"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "TEST_ALLOCATE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "LAYERED_BUFFERS"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- api: {
- name: "getCapabilities"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocator::Capability"
- }
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "dumpDebugInfo"
- return_type_hidl: {
- type: TYPE_STRING
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "createClient"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_HIDL_INTERFACE
- predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient"
- }
- callflow: {
- entry: true
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/graphics/allocator/2.0/vts/AllocatorClient.vts b/graphics/allocator/2.0/vts/AllocatorClient.vts
deleted file mode 100644
index 585c36c..0000000
--- a/graphics/allocator/2.0/vts/AllocatorClient.vts
+++ /dev/null
@@ -1,170 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IAllocatorClient"
-
-package: "android.hardware.graphics.allocator"
-
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "width"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "height"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "layerCount"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
- }
- struct_value: {
- name: "producerUsageMask"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "consumerUsageMask"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
-
- api: {
- name: "createDescriptor"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::allocator::V2_0::IAllocatorClient::BufferDescriptorInfo"
- }
- callflow: {
- entry: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "destroyDescriptor"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "testAllocate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- callflow: {
- next: "allocate"
- }
- }
-
- api: {
- name: "allocate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- }
- callflow: {
- next: "exportHandle"
- }
- }
-
- api: {
- name: "free"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "exportHandle"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_HANDLE
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "free"
- }
- }
-
-}
diff --git a/graphics/allocator/2.0/vts/functional/Android.bp b/graphics/allocator/2.0/vts/functional/Android.bp
index 498fbb6..8c0480b 100644
--- a/graphics/allocator/2.0/vts/functional/Android.bp
+++ b/graphics/allocator/2.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.graphics.allocator@2.0",
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
index a0443d6..d45463e 100644
--- a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
@@ -72,7 +72,7 @@
class GraphicsAllocatorHidlTest : public ::testing::Test {
protected:
void SetUp() override {
- mAllocator = IAllocator::getService("gralloc");
+ mAllocator = IAllocator::getService();
ASSERT_NE(mAllocator, nullptr);
mAllocator->createClient([this](const auto& error, const auto& client) {
diff --git a/graphics/allocator/2.0/vts/types.vts b/graphics/allocator/2.0/vts/types.vts
deleted file mode 100644
index 4a8376c..0000000
--- a/graphics/allocator/2.0/vts/types.vts
+++ /dev/null
@@ -1,142 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.graphics.allocator"
-
-
-attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::Error"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "BAD_DESCRIPTOR"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BAD_BUFFER"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "BAD_VALUE"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "NOT_SHARED"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "NO_RESOURCES"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "UNDEFINED"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "UNSUPPORTED"
- scalar_value: {
- int32_t: 7
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::ProducerUsage"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint64_t"
-
- enumerator: "CPU_READ"
- scalar_value: {
- uint64_t: 2
- }
- enumerator: "CPU_READ_OFTEN"
- scalar_value: {
- uint64_t: 4
- }
- enumerator: "CPU_WRITE"
- scalar_value: {
- uint64_t: 32
- }
- enumerator: "CPU_WRITE_OFTEN"
- scalar_value: {
- uint64_t: 64
- }
- enumerator: "GPU_RENDER_TARGET"
- scalar_value: {
- uint64_t: 512
- }
- enumerator: "PROTECTED"
- scalar_value: {
- uint64_t: 16384
- }
- enumerator: "CAMERA"
- scalar_value: {
- uint64_t: 131072
- }
- enumerator: "VIDEO_DECODER"
- scalar_value: {
- uint64_t: 4194304
- }
- enumerator: "SENSOR_DIRECT_DATA"
- scalar_value: {
- uint64_t: 8388608
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::graphics::allocator::V2_0::ConsumerUsage"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint64_t"
-
- enumerator: "CPU_READ"
- scalar_value: {
- uint64_t: 2
- }
- enumerator: "CPU_READ_OFTEN"
- scalar_value: {
- uint64_t: 4
- }
- enumerator: "GPU_TEXTURE"
- scalar_value: {
- uint64_t: 256
- }
- enumerator: "HWCOMPOSER"
- scalar_value: {
- uint64_t: 2048
- }
- enumerator: "CLIENT_TARGET"
- scalar_value: {
- uint64_t: 4096
- }
- enumerator: "CURSOR"
- scalar_value: {
- uint64_t: 32768
- }
- enumerator: "VIDEO_ENCODER"
- scalar_value: {
- uint64_t: 65536
- }
- enumerator: "CAMERA"
- scalar_value: {
- uint64_t: 262144
- }
- enumerator: "RENDERSCRIPT"
- scalar_value: {
- uint64_t: 1048576
- }
- enumerator: "GPU_DATA_BUFFER"
- scalar_value: {
- uint64_t: 8388608
- }
- }
-}
-
diff --git a/graphics/composer/2.1/default/Android.bp b/graphics/composer/2.1/default/Android.bp
index 4a5c70d..d1173eb 100644
--- a/graphics/composer/2.1/default/Android.bp
+++ b/graphics/composer/2.1/default/Android.bp
@@ -11,7 +11,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libsync",
"libutils",
@@ -33,7 +32,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libsync",
"libutils",
@@ -57,7 +55,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libsync",
"libutils",
diff --git a/graphics/composer/2.1/default/service.cpp b/graphics/composer/2.1/default/service.cpp
index 656673e..712dac1 100644
--- a/graphics/composer/2.1/default/service.cpp
+++ b/graphics/composer/2.1/default/service.cpp
@@ -39,5 +39,5 @@
ALOGE("Couldn't set SCHED_FIFO: %d", errno);
}
- return defaultPassthroughServiceImplementation<IComposer>("hwcomposer");
+ return defaultPassthroughServiceImplementation<IComposer>();
}
diff --git a/graphics/composer/2.1/vts/Composer.vts b/graphics/composer/2.1/vts/Composer.vts
deleted file mode 100644
index e60e39c..0000000
--- a/graphics/composer/2.1/vts/Composer.vts
+++ /dev/null
@@ -1,89 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposer"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.composer@2.1::IComposerCallback"
-import: "android.hardware.graphics.composer@2.1::IComposerClient"
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposer::Capability"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SIDEBAND_STREAM"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "SKIP_CLIENT_COLOR_TRANSFORM"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- api: {
- name: "getCapabilities"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposer::Capability"
- }
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "dumpDebugInfo"
- return_type_hidl: {
- type: TYPE_STRING
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "createClient"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_HIDL_INTERFACE
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient"
- }
- callflow: {
- entry: true
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/graphics/composer/2.1/vts/ComposerCallback.vts b/graphics/composer/2.1/vts/ComposerCallback.vts
deleted file mode 100644
index b83cf94..0000000
--- a/graphics/composer/2.1/vts/ComposerCallback.vts
+++ /dev/null
@@ -1,73 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposerCallback"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "CONNECTED"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DISCONNECTED"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- api: {
- name: "onHotplug"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerCallback::Connection"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "onRefresh"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "onVsync"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/graphics/composer/2.1/vts/ComposerClient.vts b/graphics/composer/2.1/vts/ComposerClient.vts
deleted file mode 100644
index ac1d7fb..0000000
--- a/graphics/composer/2.1/vts/ComposerClient.vts
+++ /dev/null
@@ -1,916 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "IComposerClient"
-
-package: "android.hardware.graphics.composer"
-
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.composer@2.1::IComposerCallback"
-import: "android.hardware.graphics.composer@2.1::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "WIDTH"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "HEIGHT"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VSYNC_PERIOD"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "DPI_X"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "DPI_Y"
- scalar_value: {
- int32_t: 5
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayRequest"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "FLIP_CLIENT_TARGET"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "WRITE_CLIENT_TARGET_TO_OUTPUT"
- scalar_value: {
- uint32_t: 2
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::LayerRequest"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "CLEAR_CLIENT_TARGET"
- scalar_value: {
- uint32_t: 1
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OFF"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "DOZE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DOZE_SUSPEND"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "ON"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ENABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DISABLE"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::BlendMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NONE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "PREMULTIPLIED"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "COVERAGE"
- scalar_value: {
- int32_t: 3
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Composition"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "CLIENT"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DEVICE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SOLID_COLOR"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "CURSOR"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "SIDEBAND"
- scalar_value: {
- int32_t: 5
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "PHYSICAL"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "VIRTUAL"
- scalar_value: {
- int32_t: 2
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::HandleIndex"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "EMPTY"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "CACHED"
- scalar_value: {
- int32_t: -2
- }
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Rect"
- type: TYPE_STRUCT
- struct_value: {
- name: "left"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "top"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "right"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "bottom"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::FRect"
- type: TYPE_STRUCT
- struct_value: {
- name: "left"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "top"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "right"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "bottom"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Color"
- type: TYPE_STRUCT
- struct_value: {
- name: "r"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "g"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "b"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- struct_value: {
- name: "a"
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-
- attribute: {
- name: "::android::hardware::graphics::composer::V2_1::IComposerClient::Command"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "LENGTH_MASK"
- scalar_value: {
- int32_t: 65535
- }
- enumerator: "OPCODE_SHIFT"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "OPCODE_MASK"
- scalar_value: {
- int32_t: -65536
- }
- enumerator: "SELECT_DISPLAY"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SELECT_LAYER"
- scalar_value: {
- int32_t: 65536
- }
- enumerator: "SET_ERROR"
- scalar_value: {
- int32_t: 16777216
- }
- enumerator: "SET_CHANGED_COMPOSITION_TYPES"
- scalar_value: {
- int32_t: 16842752
- }
- enumerator: "SET_DISPLAY_REQUESTS"
- scalar_value: {
- int32_t: 16908288
- }
- enumerator: "SET_PRESENT_FENCE"
- scalar_value: {
- int32_t: 16973824
- }
- enumerator: "SET_RELEASE_FENCES"
- scalar_value: {
- int32_t: 17039360
- }
- enumerator: "SET_COLOR_TRANSFORM"
- scalar_value: {
- int32_t: 33554432
- }
- enumerator: "SET_CLIENT_TARGET"
- scalar_value: {
- int32_t: 33619968
- }
- enumerator: "SET_OUTPUT_BUFFER"
- scalar_value: {
- int32_t: 33685504
- }
- enumerator: "VALIDATE_DISPLAY"
- scalar_value: {
- int32_t: 33751040
- }
- enumerator: "ACCEPT_DISPLAY_CHANGES"
- scalar_value: {
- int32_t: 33816576
- }
- enumerator: "PRESENT_DISPLAY"
- scalar_value: {
- int32_t: 33882112
- }
- enumerator: "SET_LAYER_CURSOR_POSITION"
- scalar_value: {
- int32_t: 50331648
- }
- enumerator: "SET_LAYER_BUFFER"
- scalar_value: {
- int32_t: 50397184
- }
- enumerator: "SET_LAYER_SURFACE_DAMAGE"
- scalar_value: {
- int32_t: 50462720
- }
- enumerator: "SET_LAYER_BLEND_MODE"
- scalar_value: {
- int32_t: 67108864
- }
- enumerator: "SET_LAYER_COLOR"
- scalar_value: {
- int32_t: 67174400
- }
- enumerator: "SET_LAYER_COMPOSITION_TYPE"
- scalar_value: {
- int32_t: 67239936
- }
- enumerator: "SET_LAYER_DATASPACE"
- scalar_value: {
- int32_t: 67305472
- }
- enumerator: "SET_LAYER_DISPLAY_FRAME"
- scalar_value: {
- int32_t: 67371008
- }
- enumerator: "SET_LAYER_PLANE_ALPHA"
- scalar_value: {
- int32_t: 67436544
- }
- enumerator: "SET_LAYER_SIDEBAND_STREAM"
- scalar_value: {
- int32_t: 67502080
- }
- enumerator: "SET_LAYER_SOURCE_CROP"
- scalar_value: {
- int32_t: 67567616
- }
- enumerator: "SET_LAYER_TRANSFORM"
- scalar_value: {
- int32_t: 67633152
- }
- enumerator: "SET_LAYER_VISIBLE_REGION"
- scalar_value: {
- int32_t: 67698688
- }
- enumerator: "SET_LAYER_Z_ORDER"
- scalar_value: {
- int32_t: 67764224
- }
- }
- }
-
- api: {
- name: "registerCallback"
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerCallback"
- }
- callflow: {
- entry: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getMaxVirtualDisplayCount"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "createVirtualDisplay"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "destroyVirtualDisplay"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "createLayer"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "destroyLayer"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getActiveConfig"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getClientTargetSupport"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::Dataspace"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getColorModes"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getDisplayAttribute"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Attribute"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getDisplayConfigs"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getDisplayName"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getDisplayType"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::DisplayType"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getDozeSupport"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getHdrCapabilities"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::Hdr"
- }
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setClientTargetSlotCount"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setActiveConfig"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setColorMode"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::ColorMode"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setPowerMode"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::PowerMode"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setVsyncEnabled"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::IComposerClient::Vsync"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setInputCommandQueue"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- arg: {
- type: TYPE_FMQ_SYNC
- fmq_value: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getOutputCommandQueue"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_FMQ_SYNC
- fmq_value: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "executeCommands"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::composer::V2_1::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_HANDLE
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_HANDLE
- }
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp
index cc9ae3a..1b8f351 100644
--- a/graphics/composer/2.1/vts/functional/Android.bp
+++ b/graphics/composer/2.1/vts/functional/Android.bp
@@ -27,7 +27,6 @@
"libfmq",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libnativehelper",
"libsync",
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
index e3e35bb..d9352e7 100644
--- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
@@ -134,7 +134,7 @@
class GraphicsComposerHidlTest : public ::testing::Test {
protected:
void SetUp() override {
- mComposer = IComposer::getService("hwcomposer");
+ mComposer = IComposer::getService();
ASSERT_NE(nullptr, mComposer.get());
mComposerClient = createClient();
@@ -749,7 +749,7 @@
private:
void SetUpGralloc() {
- mAllocator = IAllocator::getService("gralloc");
+ mAllocator = IAllocator::getService();
ASSERT_NE(nullptr, mAllocator.get());
mAllocator->createClient([this](const auto& error, const auto& client) {
@@ -759,7 +759,7 @@
});
ASSERT_NE(nullptr, mAllocatorClient.get());
- mMapper = IMapper::getService("gralloc-mapper");
+ mMapper = IMapper::getService();
ASSERT_NE(nullptr, mMapper.get());
ASSERT_FALSE(mMapper->isRemote());
}
diff --git a/graphics/composer/2.1/vts/types.vts b/graphics/composer/2.1/vts/types.vts
deleted file mode 100644
index ccbd9d8..0000000
--- a/graphics/composer/2.1/vts/types.vts
+++ /dev/null
@@ -1,48 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.1
-component_name: "types"
-
-package: "android.hardware.graphics.composer"
-
-
-attribute: {
- name: "::android::hardware::graphics::composer::V2_1::Error"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "BAD_CONFIG"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BAD_DISPLAY"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "BAD_LAYER"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "BAD_PARAMETER"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "NO_RESOURCES"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "NOT_VALIDATED"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "UNSUPPORTED"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
diff --git a/graphics/mapper/2.0/default/Android.bp b/graphics/mapper/2.0/default/Android.bp
index ca15961..7e98faa 100644
--- a/graphics/mapper/2.0/default/Android.bp
+++ b/graphics/mapper/2.0/default/Android.bp
@@ -27,7 +27,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
],
diff --git a/graphics/mapper/2.0/vts/Mapper.vts b/graphics/mapper/2.0/vts/Mapper.vts
deleted file mode 100644
index baf95dc..0000000
--- a/graphics/mapper/2.0/vts/Mapper.vts
+++ /dev/null
@@ -1,281 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "IMapper"
-
-package: "android.hardware.graphics.mapper"
-
-import: "android.hardware.graphics.allocator@2.0::types"
-import: "android.hardware.graphics.common@1.0::types"
-import: "android.hardware.graphics.mapper@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- attribute: {
- name: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
- type: TYPE_STRUCT
- struct_value: {
- name: "left"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "top"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "width"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "height"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "retain"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- entry: true
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "release"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- exit: true
- }
- }
-
- api: {
- name: "getDimensions"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getFormat"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::common::V1_0::PixelFormat"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getLayerCount"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getProducerUsageMask"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getConsumerUsageMask"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getBackingStore"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getStride"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "lock"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_POINTER
- }
- arg: {
- type: TYPE_HANDLE
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "unlock"
- }
- }
-
- api: {
- name: "lockFlex"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
- }
- arg: {
- type: TYPE_HANDLE
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::mapper::V2_0::IMapper::Rect"
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "unlock"
- }
- }
-
- api: {
- name: "unlock"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::allocator::V2_0::Error"
- }
- return_type_hidl: {
- type: TYPE_HANDLE
- }
- arg: {
- type: TYPE_HANDLE
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/graphics/mapper/2.0/vts/functional/Android.bp b/graphics/mapper/2.0/vts/functional/Android.bp
index fbba38e..79e1a44 100644
--- a/graphics/mapper/2.0/vts/functional/Android.bp
+++ b/graphics/mapper/2.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libsync",
"libutils",
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
index 840da1a..65ad63a 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
@@ -36,7 +36,7 @@
class GraphicsMapperHidlTest : public ::testing::Test {
protected:
void SetUp() override {
- mAllocator = IAllocator::getService("gralloc");
+ mAllocator = IAllocator::getService();
ASSERT_NE(mAllocator, nullptr);
mAllocator->createClient([this](const auto& error, const auto& client) {
@@ -46,7 +46,7 @@
});
ASSERT_NE(mAllocatorClient, nullptr);
- mMapper = IMapper::getService("gralloc-mapper");
+ mMapper = IMapper::getService();
ASSERT_NE(nullptr, mMapper.get());
ASSERT_FALSE(mMapper->isRemote());
diff --git a/graphics/mapper/2.0/vts/types.vts b/graphics/mapper/2.0/vts/types.vts
deleted file mode 100644
index fee8535..0000000
--- a/graphics/mapper/2.0/vts/types.vts
+++ /dev/null
@@ -1,139 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.graphics.mapper"
-
-
-attribute: {
- name: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "Y"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CB"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "CR"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "R"
- scalar_value: {
- int32_t: 1024
- }
- enumerator: "G"
- scalar_value: {
- int32_t: 2048
- }
- enumerator: "B"
- scalar_value: {
- int32_t: 4096
- }
- enumerator: "A"
- scalar_value: {
- int32_t: 1073741824
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INVALID"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "Y"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "YCBCR"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "YCBCRA"
- scalar_value: {
- int32_t: 1073741831
- }
- enumerator: "RGB"
- scalar_value: {
- int32_t: 7168
- }
- enumerator: "RGBA"
- scalar_value: {
- int32_t: 1073748992
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
- type: TYPE_STRUCT
- struct_value: {
- name: "topLeft"
- type: TYPE_POINTER
- }
- struct_value: {
- name: "component"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexComponent"
- }
- struct_value: {
- name: "bitsPerComponent"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "bitsUsed"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "hIncrement"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "vIncrement"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "hSubsampling"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "vSubsampling"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::graphics::mapper::V2_0::FlexLayout"
- type: TYPE_STRUCT
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexFormat"
- }
- struct_value: {
- name: "planes"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::graphics::mapper::V2_0::FlexPlane"
- }
- }
-}
-
diff --git a/health/1.0/default/Android.mk b/health/1.0/default/Android.mk
index 3c97185..96ff91f 100644
--- a/health/1.0/default/Android.mk
+++ b/health/1.0/default/Android.mk
@@ -12,7 +12,6 @@
libcutils \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libutils \
android.hardware.health@1.0 \
@@ -51,7 +50,6 @@
libdl \
libbase \
libutils \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.health@1.0 \
diff --git a/health/1.0/default/HealthService.cpp b/health/1.0/default/HealthService.cpp
index 107f33d..55848d2 100644
--- a/health/1.0/default/HealthService.cpp
+++ b/health/1.0/default/HealthService.cpp
@@ -23,5 +23,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IHealth>("health");
+ return defaultPassthroughServiceImplementation<IHealth>();
}
diff --git a/ir/1.0/default/Android.bp b/ir/1.0/default/Android.bp
index ed0b807..151a9af 100644
--- a/ir/1.0/default/Android.bp
+++ b/ir/1.0/default/Android.bp
@@ -21,7 +21,6 @@
"libhidlbase",
"libhidltransport",
"libhardware",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.ir@1.0",
@@ -37,7 +36,6 @@
shared_libs: [
"liblog",
- "libhwbinder",
"libhardware",
"libhidlbase",
"libhidltransport",
diff --git a/ir/1.0/vts/functional/Android.bp b/ir/1.0/vts/functional/Android.bp
index 5689474..fe0a595 100644
--- a/ir/1.0/vts/functional/Android.bp
+++ b/ir/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalIrV1_0TargetTest",
- gtest: true,
srcs: ["VtsHalIrV1_0TargetTest.cpp"],
shared_libs: [
"libbase",
@@ -24,11 +23,10 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libutils",
"android.hardware.ir@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
index 08c7974..1dd0405 100644
--- a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
+++ b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/ir/1.0/IConsumerIr.h>
#include <android/hardware/ir/1.0/types.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <algorithm>
using ::android::hardware::ir::V1_0::IConsumerIr;
@@ -31,10 +31,10 @@
using ::android::sp;
// The main test class for IR HIDL HAL.
-class ConsumerIrHidlTest : public ::testing::Test {
+class ConsumerIrHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {
- ir = IConsumerIr::getService();
+ ir = testing::VtsHalHidlTargetBaseTest::getService<IConsumerIr>();
ASSERT_NE(ir, nullptr);
}
diff --git a/keymaster/3.0/default/Android.mk b/keymaster/3.0/default/Android.mk
index 87a8a05..c537346 100644
--- a/keymaster/3.0/default/Android.mk
+++ b/keymaster/3.0/default/Android.mk
@@ -14,7 +14,6 @@
libkeymaster1 \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
libhardware \
android.hardware.keymaster@3.0
@@ -37,7 +36,6 @@
libutils \
libhardware_legacy \
libhardware \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.keymaster@3.0
diff --git a/keymaster/3.0/default/service.cpp b/keymaster/3.0/default/service.cpp
index c4387c3..a6a9a93 100644
--- a/keymaster/3.0/default/service.cpp
+++ b/keymaster/3.0/default/service.cpp
@@ -29,5 +29,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IKeymasterDevice>("keymaster", 1);
+ return defaultPassthroughServiceImplementation<IKeymasterDevice>();
}
diff --git a/light/2.0/default/Android.mk b/light/2.0/default/Android.mk
index 7bd096c..3439c9b 100644
--- a/light/2.0/default/Android.mk
+++ b/light/2.0/default/Android.mk
@@ -10,7 +10,6 @@
LOCAL_SHARED_LIBRARIES := \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
liblog \
libcutils \
@@ -39,7 +38,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.light@2.0 \
diff --git a/light/2.0/vts/Light.vts b/light/2.0/vts/Light.vts
deleted file mode 100644
index 163405f..0000000
--- a/light/2.0/vts/Light.vts
+++ /dev/null
@@ -1,38 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "ILight"
-
-package: "android.hardware.light"
-
-import: "android.hardware.light@2.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "setLight"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::light::V2_0::Status"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::light::V2_0::Type"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::light::V2_0::LightState"
- }
- }
-
- api: {
- name: "getSupportedTypes"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::light::V2_0::Type"
- }
- }
- }
-
-}
diff --git a/light/2.0/vts/types.vts b/light/2.0/vts/types.vts
deleted file mode 100644
index a9c8cab..0000000
--- a/light/2.0/vts/types.vts
+++ /dev/null
@@ -1,149 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 2.0
-component_name: "types"
-
-package: "android.hardware.light"
-
-
-attribute: {
- name: "::android::hardware::light::V2_0::Status"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "LIGHT_NOT_SUPPORTED"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BRIGHTNESS_NOT_SUPPORTED"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "UNKNOWN"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::light::V2_0::Flash"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NONE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "TIMED"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "HARDWARE"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::light::V2_0::Brightness"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "USER"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "SENSOR"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "LOW_PERSISTENCE"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::light::V2_0::Type"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "BACKLIGHT"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "KEYBOARD"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BUTTONS"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "BATTERY"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "NOTIFICATIONS"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "ATTENTION"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "BLUETOOTH"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "WIFI"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "COUNT"
- scalar_value: {
- int32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::light::V2_0::LightState"
- type: TYPE_STRUCT
- struct_value: {
- name: "color"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "flashMode"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::light::V2_0::Flash"
- }
- struct_value: {
- name: "flashOnMs"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "flashOffMs"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "brightnessMode"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::light::V2_0::Brightness"
- }
-}
-
diff --git a/memtrack/1.0/default/Android.bp b/memtrack/1.0/default/Android.bp
index b43a159..dcb5025 100644
--- a/memtrack/1.0/default/Android.bp
+++ b/memtrack/1.0/default/Android.bp
@@ -24,7 +24,6 @@
"libhidlbase",
"libhidltransport",
"libhardware",
- "libhwbinder",
"libutils",
"android.hardware.memtrack@1.0",
],
@@ -46,7 +45,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"android.hardware.memtrack@1.0",
],
diff --git a/memtrack/1.0/vts/Memtrack.vts b/memtrack/1.0/vts/Memtrack.vts
deleted file mode 100644
index 42a422e..0000000
--- a/memtrack/1.0/vts/Memtrack.vts
+++ /dev/null
@@ -1,34 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IMemtrack"
-
-package: "android.hardware.memtrack"
-
-import: "android.hardware.memtrack@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getMemory"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::memtrack::V1_0::MemtrackStatus"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::memtrack::V1_0::MemtrackRecord"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::memtrack::V1_0::MemtrackType"
- }
- }
-
-}
diff --git a/memtrack/1.0/vts/functional/Android.bp b/memtrack/1.0/vts/functional/Android.bp
index 1cbcc59..b9d89be 100644
--- a/memtrack/1.0/vts/functional/Android.bp
+++ b/memtrack/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhardware",
"libhidlbase",
- "libhwbinder",
"libutils",
"android.hardware.memtrack@1.0",
],
diff --git a/memtrack/1.0/vts/types.vts b/memtrack/1.0/vts/types.vts
deleted file mode 100644
index bec090f..0000000
--- a/memtrack/1.0/vts/types.vts
+++ /dev/null
@@ -1,121 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.memtrack"
-
-
-attribute: {
- name: "::android::hardware::memtrack::V1_0::MemtrackFlag"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SMAPS_ACCOUNTED"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "SMAPS_UNACCOUNTED"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "SHARED"
- scalar_value: {
- uint32_t: 8
- }
- enumerator: "SHARED_PSS"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "PRIVATE"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "SYSTEM"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "DEDICATED"
- scalar_value: {
- uint32_t: 128
- }
- enumerator: "NONSECURE"
- scalar_value: {
- uint32_t: 256
- }
- enumerator: "SECURE"
- scalar_value: {
- uint32_t: 512
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::memtrack::V1_0::MemtrackType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "OTHER"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "GL"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "GRAPHICS"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "MULTIMEDIA"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "CAMERA"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "NUM_TYPES"
- scalar_value: {
- uint32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::memtrack::V1_0::MemtrackStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "MEMORY_TRACKING_NOT_SUPPORTED"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "TYPE_NOT_SUPPORTED"
- scalar_value: {
- uint32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::memtrack::V1_0::MemtrackRecord"
- type: TYPE_STRUCT
- struct_value: {
- name: "sizeInBytes"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "flags"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
diff --git a/nfc/1.0/default/Android.bp b/nfc/1.0/default/Android.bp
index 02f5664..051ca54 100644
--- a/nfc/1.0/default/Android.bp
+++ b/nfc/1.0/default/Android.bp
@@ -7,7 +7,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libcutils",
"libutils",
diff --git a/nfc/1.0/default/Android.mk b/nfc/1.0/default/Android.mk
index fbb340f..2e1f17f 100644
--- a/nfc/1.0/default/Android.mk
+++ b/nfc/1.0/default/Android.mk
@@ -18,7 +18,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.nfc@1.0 \
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 3bd5e41..c610406 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -14,12 +14,14 @@
sp<INfcClientCallback> Nfc::mCallback = NULL;
-Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {
+Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device),
+ mDeathRecipient(new NfcDeathRecipient(this)) {
}
// Methods from ::android::hardware::nfc::V1_0::INfc follow.
::android::hardware::Return<NfcStatus> Nfc::open(const sp<INfcClientCallback>& clientCallback) {
mCallback = clientCallback;
+ mCallback->linkToDeath(mDeathRecipient, 0 /*cookie*/);
int ret = mDevice->open(mDevice, eventCallback, dataCallback);
return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
}
@@ -39,6 +41,7 @@
}
::android::hardware::Return<NfcStatus> Nfc::close() {
+ mCallback->unlinkToDeath(mDeathRecipient);
return mDevice->close(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
}
diff --git a/nfc/1.0/default/Nfc.h b/nfc/1.0/default/Nfc.h
index 13004a5..d8787fd 100644
--- a/nfc/1.0/default/Nfc.h
+++ b/nfc/1.0/default/Nfc.h
@@ -19,6 +19,16 @@
using ::android::hardware::hidl_string;
using ::android::sp;
+struct NfcDeathRecipient : hidl_death_recipient {
+ NfcDeathRecipient(const sp<INfc> nfc) : mNfc(nfc) {
+ }
+
+ virtual void serviceDied(uint64_t /*cookie*/, const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ mNfc->close();
+ }
+ sp<INfc> mNfc;
+};
+
struct Nfc : public INfc {
Nfc(nfc_nci_device_t* device);
::android::hardware::Return<NfcStatus> open(const sp<INfcClientCallback>& clientCallback) override;
@@ -31,21 +41,28 @@
static void eventCallback(uint8_t event, uint8_t status) {
if (mCallback != nullptr) {
- mCallback->sendEvent(
+ auto ret = mCallback->sendEvent(
(::android::hardware::nfc::V1_0::NfcEvent) event,
(::android::hardware::nfc::V1_0::NfcStatus) status);
+ if (!ret.isOk()) {
+ ALOGW("Failed to call back into NFC process.");
+ }
}
}
static void dataCallback(uint16_t data_len, uint8_t* p_data) {
hidl_vec<uint8_t> data;
data.setToExternal(p_data, data_len);
if (mCallback != nullptr) {
- mCallback->sendData(data);
+ auto ret = mCallback->sendData(data);
+ if (!ret.isOk()) {
+ ALOGW("Failed to call back into NFC process.");
+ }
}
}
private:
static sp<INfcClientCallback> mCallback;
const nfc_nci_device_t* mDevice;
+ sp<NfcDeathRecipient> mDeathRecipient;
};
extern "C" INfc* HIDL_FETCH_INfc(const char* name);
diff --git a/nfc/1.0/vts/functional/Android.bp b/nfc/1.0/vts/functional/Android.bp
index 080887f..0ab8dc5 100644
--- a/nfc/1.0/vts/functional/Android.bp
+++ b/nfc/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalNfcV1_0TargetTest",
- gtest: true,
srcs: ["VtsHalNfcV1_0TargetTest.cpp"],
shared_libs: [
"libbase",
@@ -24,12 +23,11 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.nfc@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
index a0c5f1a..ae21f9a 100644
--- a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
+++ b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
#include <android/hardware/nfc/1.0/types.h>
#include <hardware/nfc.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
@@ -56,10 +56,10 @@
#define TIMEOUT_PERIOD 5
// The main test class for NFC HIDL HAL.
-class NfcHidlTest : public ::testing::Test {
+class NfcHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {
- nfc_ = INfc::getService();
+ nfc_ = testing::VtsHalHidlTargetBaseTest::getService<INfc>();
ASSERT_NE(nfc_, nullptr);
nfc_cb_ = new NfcClientCallback(*this);
diff --git a/power/1.0/default/Android.bp b/power/1.0/default/Android.bp
index 71daaeb..b3876df 100644
--- a/power/1.0/default/Android.bp
+++ b/power/1.0/default/Android.bp
@@ -28,7 +28,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libutils",
"android.hardware.power@1.0",
],
@@ -54,7 +53,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"android.hardware.power@1.0",
],
diff --git a/power/1.0/vts/Power.vts b/power/1.0/vts/Power.vts
deleted file mode 100644
index 4d3d4ff..0000000
--- a/power/1.0/vts/Power.vts
+++ /dev/null
@@ -1,58 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IPower"
-
-package: "android.hardware.power"
-
-import: "android.hardware.power@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "setInteractive"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "powerHint"
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::power::V1_0::PowerHint"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "setFeature"
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::power::V1_0::Feature"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "getPlatformLowPowerStats"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::power::V1_0::PowerStatePlatformSleepState"
- }
- }
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::power::V1_0::Status"
- }
- }
-
-}
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index b2389a5..9d1118e 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.power@1.0",
diff --git a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
index b114944..7a34f00 100644
--- a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
+++ b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
@@ -19,10 +19,13 @@
#include <cutils/properties.h>
+#include <android-base/unique_fd.h>
#include <android/hardware/power/1.0/IPower.h>
#include <gtest/gtest.h>
+#include <algorithm>
+
using ::android::hardware::power::V1_0::IPower;
using ::android::hardware::power::V1_0::Feature;
using ::android::hardware::power::V1_0::PowerHint;
@@ -31,6 +34,14 @@
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::sp;
+using ::android::base::unique_fd;
+
+using std::vector;
+
+#define CPU_GOVERNOR_PATH \
+ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
+#define AVAILABLE_GOVERNORS_PATH \
+ "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
class PowerHidlTest : public ::testing::Test {
public:
@@ -55,6 +66,48 @@
ASSERT_TRUE(ret.isOk());
}
+// Test Power::setInteractive and Power::powerHint(Launch)
+// with each available CPU governor, if available
+TEST_F(PowerHidlTest, TryDifferentGovernors) {
+ Return<void> ret;
+
+ unique_fd fd1(open(CPU_GOVERNOR_PATH, O_RDWR));
+ unique_fd fd2(open(AVAILABLE_GOVERNORS_PATH, O_RDONLY));
+ if (fd1 < 0 || fd2 < 0) {
+ // Files don't exist, so skip the rest of the test case
+ SUCCEED();
+ }
+
+ char old_governor[80];
+ ASSERT_LE(0, read(fd1, old_governor, 80));
+
+ char governors[1024];
+ unsigned len = read(fd2, governors, 1024);
+ ASSERT_LE(0, len);
+ governors[len] = '\0';
+
+ char *saveptr;
+ char *name = strtok_r(governors, " \n", &saveptr);
+ while (name) {
+ ASSERT_LE(0, write(fd1, name, strlen(name)));
+ ret = power->setInteractive(true);
+ ASSERT_TRUE(ret.isOk());
+
+ ret = power->setInteractive(false);
+ ASSERT_TRUE(ret.isOk());
+
+ ret = power->setInteractive(false);
+ ASSERT_TRUE(ret.isOk());
+
+ power->powerHint(PowerHint::LAUNCH, 1);
+ power->powerHint(PowerHint::LAUNCH, 0);
+
+ name = strtok_r(NULL, " \n", &saveptr);
+ }
+
+ ASSERT_LE(0, write(fd1, old_governor, strlen(old_governor)));
+}
+
// Sanity check Power::powerHint on good and bad inputs.
TEST_F(PowerHidlTest, PowerHint) {
PowerHint badHint = static_cast<PowerHint>(0xA);
@@ -65,12 +118,32 @@
badHint};
Return<void> ret;
for (auto hint : hints) {
- ret = power->powerHint(hint, 1);
+ ret = power->powerHint(hint, 30000);
ASSERT_TRUE(ret.isOk());
ret = power->powerHint(hint, 0);
ASSERT_TRUE(ret.isOk());
}
+
+ // Turning these hints on in different orders triggers different code paths,
+ // so iterate over possible orderings.
+ std::vector<PowerHint> hints2 = {PowerHint::LAUNCH, PowerHint::VR_MODE,
+ PowerHint::SUSTAINED_PERFORMANCE,
+ PowerHint::INTERACTION};
+ auto compareHints = [](PowerHint l, PowerHint r) {
+ return static_cast<uint32_t>(l) < static_cast<uint32_t>(r);
+ };
+ std::sort(hints2.begin(), hints2.end(), compareHints);
+ do {
+ for (auto iter = hints2.begin(); iter != hints2.end(); iter++) {
+ ret = power->powerHint(*iter, 0);
+ ASSERT_TRUE(ret.isOk());
+ }
+ for (auto iter = hints2.begin(); iter != hints2.end(); iter++) {
+ ret = power->powerHint(*iter, 30000);
+ ASSERT_TRUE(ret.isOk());
+ }
+ } while (std::next_permutation(hints2.begin(), hints2.end(), compareHints));
}
// Sanity check Power::setFeature() on good and bad inputs.
diff --git a/power/1.0/vts/types.vts b/power/1.0/vts/types.vts
deleted file mode 100644
index 5724946..0000000
--- a/power/1.0/vts/types.vts
+++ /dev/null
@@ -1,129 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.power"
-
-
-attribute: {
- name: "::android::hardware::power::V1_0::PowerHint"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "VSYNC"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "INTERACTION"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "VIDEO_ENCODE"
- scalar_value: {
- uint32_t: 3
- }
- enumerator: "VIDEO_DECODE"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "LOW_POWER"
- scalar_value: {
- uint32_t: 5
- }
- enumerator: "SUSTAINED_PERFORMANCE"
- scalar_value: {
- uint32_t: 6
- }
- enumerator: "VR_MODE"
- scalar_value: {
- uint32_t: 7
- }
- enumerator: "LAUNCH"
- scalar_value: {
- uint32_t: 8
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::power::V1_0::Feature"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "POWER_FEATURE_DOUBLE_TAP_TO_WAKE"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::power::V1_0::Status"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "FILESYSTEM_ERROR"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::power::V1_0::PowerStateVoter"
- type: TYPE_STRUCT
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "totalTimeInMsecVotedForSinceBoot"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "totalNumberOfTimesVotedSinceBoot"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::power::V1_0::PowerStatePlatformSleepState"
- type: TYPE_STRUCT
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "residencyInMsecSinceBoot"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "totalTransitions"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "supportedOnlyInSuspend"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "voters"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::power::V1_0::PowerStateVoter"
- }
- }
-}
-
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index bda7d65..a8c9d93 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -378,13 +378,18 @@
* @param radioTechnology Radio technology to use.
* @param dataProfileInfo data profile info.
* @param modemCognitive Indicating this profile was sent to the modem through setDataProfile
- * earlier.
+ * earlier.
* @param roamingAllowed Indicating data roaming is allowed or not by the user.
+ * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+ * RIL API must be filled accordingly based on the roaming condition.
+ * Note this is for backward compatibility with the old radio modem. The modem
+ * must not use this param for any other reason.
*
* Response function is IRadioResponse.setupDataCallResponse()
*/
oneway setupDataCall(int32_t serial, RadioTechnology radioTechnology,
- DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed);
+ DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
+ bool isRoaming);
/*
* Request ICC I/O operation.
@@ -726,26 +731,6 @@
oneway getDataCallList(int32_t serial);
/*
- * This request is reserved for OEM-specific uses. It passes raw byte arrays back and forth.
- *
- * @param serial Serial number of request.
- * @param data data passed as raw bytes to oem
- *
- * Response function is IRadioResponse.sendOemRadioRequestRawResponse()
- */
- oneway sendOemRadioRequestRaw(int32_t serial, vec<uint8_t> data);
-
- /*
- * This request is reserved for OEM-specific uses. It passes strings back and forth.
- *
- * @param serial Serial number of request.
- * @param data data passed as strings to oem
- *
- * Response function is IRadioResponse.sendOemRadioRequestStringsResponse()
- */
- oneway sendOemRadioRequestStrings(int32_t serial, vec<string> data);
-
- /*
* Indicates the current state of the screen. When the screen is off, the
* Radio must notify the baseband to suppress certain notifications (eg,
* signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
@@ -1159,7 +1144,7 @@
oneway reportSmsMemoryStatus(int32_t serial, bool available);
/*
- * Indicates that the StkSerivce is running and is
+ * Indicates that the StkService is running and is
* ready to receive unsolicited stkXXXXX commands.
*
* @param serial Serial number of request.
@@ -1261,13 +1246,17 @@
*
* @param serial Serial number of request.
* @param dataProfileInfo data profile containing APN settings
- * @param modemCognitive is indicating the data profile was sent to the modem through
- * setDataProfile earlier.
+ * @param modemCognitive indicating the data profile was sent to the modem through
+ * setDataProfile earlier.
+ * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+ * RIL_InitialAttachApn must be filled accordingly based on the roaming
+ * condition. Note this is for backward compatibility with the old radio modem.
+ * The modem must not use this param for any other reason.
*
* Response callback is IRadioResponse.setInitialAttachApnResponse()
*/
oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
- bool modemCognitive);
+ bool modemCognitive, bool isRoaming);
/*
* Request current IMS registration state
@@ -1433,10 +1422,14 @@
*
* @param serial Serial number of request.
* @param profiles Array of DataProfiles to set.
+ * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+ * RIL API RIL_DataProfileInfo must be filled accordingly based on the
+ * roaming condition. Note this is for backward compatibility with the old
+ * radio modem. The modem must not use this param for any other reason.
*
* Response callback is IRadioResponse.setDataProfileResponse()
*/
- oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles);
+ oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);
/*
* Device is shutting down. All further commands are ignored
@@ -1449,7 +1442,7 @@
oneway requestShutdown(int32_t serial);
/*
- * Used to get phone radio capablility.
+ * Used to get phone radio capability.
*
* @param serial Serial number of request.
*
diff --git a/radio/1.0/IRadioIndication.hal b/radio/1.0/IRadioIndication.hal
index 81ac13a..0b95821 100644
--- a/radio/1.0/IRadioIndication.hal
+++ b/radio/1.0/IRadioIndication.hal
@@ -293,14 +293,6 @@
oneway cdmaInfoRec(RadioIndicationType type, CdmaInformationRecords records);
/*
- * This is for OEM specific use.
- *
- * @param type Type of radio indication
- * @param data data passed as raw bytes
- */
- oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
-
- /*
* Indicates that nework doesn't have in-band information, need to
* play out-band tone.
*
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index 637f697..11a1d03 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -923,30 +923,6 @@
/*
* @param info Response info struct containing response type, serial no. and error
- * @param data data returned by oem
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INVALID_ARGUMENTS
- * RadioError:OEM_ERROR_X
- */
- oneway sendOemRilRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
-
- /*
- * @param info Response info struct containing response type, serial no. and error
- * @param data data returned by oem
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INVALID_ARGUMENTS
- * RadioError:OEM_ERROR_X
- */
- oneway sendOemRilRequestStringsResponse(RadioResponseInfo info, vec<string> data);
-
- /*
- * @param info Response info struct containing response type, serial no. and error
*
* Valid errors returned:
* RadioError:NONE
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 6615f03..10bd725 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalRadioV1_0TargetTest",
- gtest: true,
srcs: ["radio_hidl_hal_test.cpp",
"radio_response.cpp",
"radio_hidl_hal_icc.cpp",
@@ -27,12 +26,11 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.radio@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index 2a67954..d1ab06a 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -17,7 +17,7 @@
#include<radio_hidl_hal_utils.h>
void RadioHidlTest::SetUp() {
- radio = IRadio::getService(hidl_string("rild"));
+ radio = testing::VtsHalHidlTargetBaseTest::getService<IRadio>(hidl_string("rild"));
ASSERT_NE(radio, nullptr);
radioRsp = new RadioResponse(*this);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
index 23b6ffa..732d88e 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
@@ -423,7 +423,7 @@
};
// The main test class for Radio HIDL.
-class RadioHidlTest : public ::testing::Test {
+class RadioHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
private:
std::mutex mtx;
std::condition_variable cv;
diff --git a/radio/Android.bp b/radio/Android.bp
index 33f70eb..8bda000 100644
--- a/radio/Android.bp
+++ b/radio/Android.bp
@@ -2,4 +2,5 @@
subdirs = [
"1.0",
"1.0/vts/functional",
+ "deprecated/1.0",
]
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
new file mode 100644
index 0000000..f8a9c64
--- /dev/null
+++ b/radio/deprecated/1.0/Android.bp
@@ -0,0 +1,75 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "android.hardware.radio.deprecated@1.0_hal",
+ srcs: [
+ "IOemHook.hal",
+ "IOemHookIndication.hal",
+ "IOemHookResponse.hal",
+ ],
+}
+
+genrule {
+ name: "android.hardware.radio.deprecated@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+ srcs: [
+ ":android.hardware.radio.deprecated@1.0_hal",
+ ],
+ out: [
+ "android/hardware/radio/deprecated/1.0/OemHookAll.cpp",
+ "android/hardware/radio/deprecated/1.0/OemHookIndicationAll.cpp",
+ "android/hardware/radio/deprecated/1.0/OemHookResponseAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.radio.deprecated@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+ srcs: [
+ ":android.hardware.radio.deprecated@1.0_hal",
+ ],
+ out: [
+ "android/hardware/radio/deprecated/1.0/IOemHook.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHook.h",
+ "android/hardware/radio/deprecated/1.0/IOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/IOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHookResponse.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.radio.deprecated@1.0",
+ generated_sources: ["android.hardware.radio.deprecated@1.0_genc++"],
+ generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hardware.radio@1.0",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.radio@1.0",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/radio/deprecated/1.0/Android.mk b/radio/deprecated/1.0/Android.mk
new file mode 100644
index 0000000..4cce633
--- /dev/null
+++ b/radio/deprecated/1.0/Android.mk
@@ -0,0 +1,162 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.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.hardware.radio@1.0-java \
+ android.hidl.base@1.0-java \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.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.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.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.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.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.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.0-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.radio@1.0-java-static \
+ android.hidl.base@1.0-java-static \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.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.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.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.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.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.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/radio/deprecated/1.0/IOemHook.hal b/radio/deprecated/1.0/IOemHook.hal
new file mode 100644
index 0000000..2b6db65
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHook.hal
@@ -0,0 +1,57 @@
+/**
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import IOemHookResponse;
+import IOemHookIndication;
+
+/**
+ * This interface has APIs for OEM-specific use-cases.
+ * USE OF THIS INTERFACE IS DISCOURATED. IT IS PRESENT ONLY FOR BACKWARD COMPATIBILITY AND WILL BE
+ * REMOVED IN O (ATTEMPTING TO REMOVE IT IN O, BUT IF NOT IN O WILL BE REMOVED IN P).
+ * ALSO NOTE THAT FRAMEWORK EXPECTS THE SERVICE IMPLEMENTING THIS INTERFACE TO RESIDE
+ * IN THE SAME PROCESS AS IRADIO SERVICE.
+ */
+interface IOemHook {
+ /**
+ * Set response functions for oem hook requests & oem hook indications.
+ *
+ * @param oemHookResponse Object containing response functions
+ * @param oemHookIndication Object containing oem hook indications
+ */
+ setResponseFunctions(IOemHookResponse oemHookResponse, IOemHookIndication oemHookIndication);
+
+ /**
+ * This request passes raw byte arrays between framework and vendor code.
+ *
+ * @param serial Serial number of request.
+ * @param data data passed as raw bytes
+ *
+ * Response function is IOemHookResponse.sendRequestRawResponse()
+ */
+ oneway sendRequestRaw(int32_t serial, vec<uint8_t> data);
+
+ /**
+ * This request passes strings between framework and vendor code.
+ *
+ * @param serial Serial number of request.
+ * @param data data passed as strings
+ *
+ * Response function is IOemHookResponse.sendRequestStringsResponse()
+ */
+ oneway sendRequestStrings(int32_t serial, vec<string> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookIndication.hal b/radio/deprecated/1.0/IOemHookIndication.hal
new file mode 100644
index 0000000..936779f
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookIndication.hal
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring unsolicited oem hook indications.
+ */
+interface IOemHookIndication {
+ /*
+ * This is for OEM specific use.
+ *
+ * @param type Type of radio indication
+ * @param data data passed as raw bytes
+ */
+ oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookResponse.hal b/radio/deprecated/1.0/IOemHookResponse.hal
new file mode 100644
index 0000000..4e49acc
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookResponse.hal
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring response functions to solicited oem hook requests.
+ * Response functions defined in this interface are as per following convention:
+ * <xyz>Response is response to IOemHook.<xyz>
+ */
+interface IOemHookResponse {
+ /*
+ * @param info Response info struct containing response type, serial no. and error
+ * @param data data returned by oem
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:OEM_ERROR_X
+ */
+ oneway sendRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
+
+ /*
+ * @param info Response info struct containing response type, serial no. and error
+ * @param data data returned by oem
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:OEM_ERROR_X
+ */
+ oneway sendRequestStringsResponse(RadioResponseInfo info, vec<string> data);
+};
\ No newline at end of file
diff --git a/renderscript/1.0/default/Android.bp b/renderscript/1.0/default/Android.bp
index 348f6af..564d6db 100644
--- a/renderscript/1.0/default/Android.bp
+++ b/renderscript/1.0/default/Android.bp
@@ -14,7 +14,6 @@
"liblog",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libutils",
"android.hardware.renderscript@1.0",
"android.hidl.base@1.0",
diff --git a/sensors/1.0/default/Android.bp b/sensors/1.0/default/Android.bp
index 3930504..1d8d6a4 100644
--- a/sensors/1.0/default/Android.bp
+++ b/sensors/1.0/default/Android.bp
@@ -7,7 +7,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libutils",
"libhidlbase",
@@ -29,7 +28,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libutils",
"libhidlbase",
diff --git a/sensors/1.0/default/Android.mk b/sensors/1.0/default/Android.mk
index 6a1aab4..bc1cfbd 100644
--- a/sensors/1.0/default/Android.mk
+++ b/sensors/1.0/default/Android.mk
@@ -18,7 +18,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.sensors@1.0 \
diff --git a/sensors/1.0/vts/Sensors.vts b/sensors/1.0/vts/Sensors.vts
deleted file mode 100644
index 558c36d..0000000
--- a/sensors/1.0/vts/Sensors.vts
+++ /dev/null
@@ -1,172 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ISensors"
-
-package: "android.hardware.sensors"
-
-import: "android.hardware.sensors@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getSensorsList"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::SensorInfo"
- }
- }
- }
-
- api: {
- name: "setOperationMode"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::OperationMode"
- }
- }
-
- api: {
- name: "activate"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "poll"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::Event"
- }
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::SensorInfo"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "batch"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- }
-
- api: {
- name: "flush"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "injectSensorData"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::Event"
- }
- }
-
- api: {
- name: "registerDirectChannel"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::SharedMemInfo"
- }
- }
-
- api: {
- name: "unregisterDirectChannel"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "configDirectReport"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::RateLevel"
- }
- }
-
-}
diff --git a/sensors/1.0/vts/types.vts b/sensors/1.0/vts/types.vts
deleted file mode 100644
index bc87823..0000000
--- a/sensors/1.0/vts/types.vts
+++ /dev/null
@@ -1,901 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.sensors"
-
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::Result"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "PERMISSION_DENIED"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "NO_MEMORY"
- scalar_value: {
- int32_t: -12
- }
- enumerator: "BAD_VALUE"
- scalar_value: {
- int32_t: -22
- }
- enumerator: "INVALID_OPERATION"
- scalar_value: {
- int32_t: -38
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::OperationMode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "NORMAL"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "DATA_INJECTION"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "META_DATA"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "ACCELEROMETER"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "MAGNETIC_FIELD"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "ORIENTATION"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "GYROSCOPE"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "LIGHT"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "PRESSURE"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "TEMPERATURE"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "PROXIMITY"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "GRAVITY"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "LINEAR_ACCELERATION"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "ROTATION_VECTOR"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "RELATIVE_HUMIDITY"
- scalar_value: {
- int32_t: 12
- }
- enumerator: "AMBIENT_TEMPERATURE"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "MAGNETIC_FIELD_UNCALIBRATED"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "GAME_ROTATION_VECTOR"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "GYROSCOPE_UNCALIBRATED"
- scalar_value: {
- int32_t: 16
- }
- enumerator: "SIGNIFICANT_MOTION"
- scalar_value: {
- int32_t: 17
- }
- enumerator: "STEP_DETECTOR"
- scalar_value: {
- int32_t: 18
- }
- enumerator: "STEP_COUNTER"
- scalar_value: {
- int32_t: 19
- }
- enumerator: "GEOMAGNETIC_ROTATION_VECTOR"
- scalar_value: {
- int32_t: 20
- }
- enumerator: "HEART_RATE"
- scalar_value: {
- int32_t: 21
- }
- enumerator: "TILT_DETECTOR"
- scalar_value: {
- int32_t: 22
- }
- enumerator: "WAKE_GESTURE"
- scalar_value: {
- int32_t: 23
- }
- enumerator: "GLANCE_GESTURE"
- scalar_value: {
- int32_t: 24
- }
- enumerator: "PICK_UP_GESTURE"
- scalar_value: {
- int32_t: 25
- }
- enumerator: "WRIST_TILT_GESTURE"
- scalar_value: {
- int32_t: 26
- }
- enumerator: "DEVICE_ORIENTATION"
- scalar_value: {
- int32_t: 27
- }
- enumerator: "POSE_6DOF"
- scalar_value: {
- int32_t: 28
- }
- enumerator: "STATIONARY_DETECT"
- scalar_value: {
- int32_t: 29
- }
- enumerator: "MOTION_DETECT"
- scalar_value: {
- int32_t: 30
- }
- enumerator: "HEART_BEAT"
- scalar_value: {
- int32_t: 31
- }
- enumerator: "DYNAMIC_SENSOR_META"
- scalar_value: {
- int32_t: 32
- }
- enumerator: "ADDITIONAL_INFO"
- scalar_value: {
- int32_t: 33
- }
- enumerator: "LOW_LATENCY_OFFBODY_DETECT"
- scalar_value: {
- int32_t: 34
- }
- enumerator: "ACCELEROMETER_UNCALIBRATED"
- scalar_value: {
- int32_t: 35
- }
- enumerator: "DEVICE_PRIVATE_BASE"
- scalar_value: {
- int32_t: 65536
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorFlagBits"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "WAKE_UP"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "CONTINUOUS_MODE"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "ON_CHANGE_MODE"
- scalar_value: {
- uint32_t: 2
- }
- enumerator: "ONE_SHOT_MODE"
- scalar_value: {
- uint32_t: 4
- }
- enumerator: "SPECIAL_REPORTING_MODE"
- scalar_value: {
- uint32_t: 6
- }
- enumerator: "DATA_INJECTION"
- scalar_value: {
- uint32_t: 16
- }
- enumerator: "DYNAMIC_SENSOR"
- scalar_value: {
- uint32_t: 32
- }
- enumerator: "ADDITIONAL_INFO"
- scalar_value: {
- uint32_t: 64
- }
- enumerator: "DIRECT_CHANNEL_ASHMEM"
- scalar_value: {
- uint32_t: 1024
- }
- enumerator: "DIRECT_CHANNEL_GRALLOC"
- scalar_value: {
- uint32_t: 2048
- }
- enumerator: "MASK_REPORTING_MODE"
- scalar_value: {
- uint32_t: 14
- }
- enumerator: "MASK_DIRECT_REPORT"
- scalar_value: {
- uint32_t: 896
- }
- enumerator: "MASK_DIRECT_CHANNEL"
- scalar_value: {
- uint32_t: 3072
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorFlagShift"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint8_t"
-
- enumerator: "REPORTING_MODE"
- scalar_value: {
- uint8_t: 1
- }
- enumerator: "DATA_INJECTION"
- scalar_value: {
- uint8_t: 4
- }
- enumerator: "DYNAMIC_SENSOR"
- scalar_value: {
- uint8_t: 5
- }
- enumerator: "ADDITIONAL_INFO"
- scalar_value: {
- uint8_t: 6
- }
- enumerator: "DIRECT_REPORT"
- scalar_value: {
- uint8_t: 7
- }
- enumerator: "DIRECT_CHANNEL"
- scalar_value: {
- uint8_t: 10
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "sensorHandle"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "vendor"
- type: TYPE_STRING
- }
- struct_value: {
- name: "version"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SensorType"
- }
- struct_value: {
- name: "typeAsString"
- type: TYPE_STRING
- }
- struct_value: {
- name: "maxRange"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "resolution"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "power"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "minDelay"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "fifoReservedEventCount"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "fifoMaxEventCount"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "requiredPermission"
- type: TYPE_STRING
- }
- struct_value: {
- name: "maxDelay"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "flags"
- type: TYPE_MASK
- scalar_type: "uint32_t"
- predefined_type: "::android::hardware::sensors::V1_0::SensorFlagBits"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorStatus"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int8_t"
-
- enumerator: "NO_CONTACT"
- scalar_value: {
- int8_t: -1
- }
- enumerator: "UNRELIABLE"
- scalar_value: {
- int8_t: 0
- }
- enumerator: "ACCURACY_LOW"
- scalar_value: {
- int8_t: 1
- }
- enumerator: "ACCURACY_MEDIUM"
- scalar_value: {
- int8_t: 2
- }
- enumerator: "ACCURACY_HIGH"
- scalar_value: {
- int8_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::Vec3"
- type: TYPE_STRUCT
- struct_value: {
- name: "x"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "y"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "z"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "status"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SensorStatus"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::Vec4"
- type: TYPE_STRUCT
- struct_value: {
- name: "x"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "y"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "z"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "w"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::Uncal"
- type: TYPE_STRUCT
- struct_value: {
- name: "x"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "y"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "z"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "x_bias"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "y_bias"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "z_bias"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::HeartRate"
- type: TYPE_STRUCT
- struct_value: {
- name: "bpm"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "status"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SensorStatus"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::MetaDataEventType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "META_DATA_FLUSH_COMPLETE"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::MetaData"
- type: TYPE_STRUCT
- struct_value: {
- name: "what"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::MetaDataEventType"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::DynamicSensorInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "connected"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "sensorHandle"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "uuid"
- type: TYPE_ARRAY
- vector_size: 16
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::AdditionalInfoType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "AINFO_BEGIN"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "AINFO_END"
- scalar_value: {
- uint32_t: 1
- }
- enumerator: "AINFO_UNTRACKED_DELAY"
- scalar_value: {
- uint32_t: 65536
- }
- enumerator: "AINFO_INTERNAL_TEMPERATURE"
- scalar_value: {
- uint32_t: 65537
- }
- enumerator: "AINFO_VEC3_CALIBRATION"
- scalar_value: {
- uint32_t: 65538
- }
- enumerator: "AINFO_SENSOR_PLACEMENT"
- scalar_value: {
- uint32_t: 65539
- }
- enumerator: "AINFO_SAMPLING"
- scalar_value: {
- uint32_t: 65540
- }
- enumerator: "AINFO_CHANNEL_NOISE"
- scalar_value: {
- uint32_t: 131072
- }
- enumerator: "AINFO_CHANNEL_SAMPLER"
- scalar_value: {
- uint32_t: 131073
- }
- enumerator: "AINFO_CHANNEL_FILTER"
- scalar_value: {
- uint32_t: 131074
- }
- enumerator: "AINFO_CHANNEL_LINEAR_TRANSFORM"
- scalar_value: {
- uint32_t: 131075
- }
- enumerator: "AINFO_CHANNEL_NONLINEAR_MAP"
- scalar_value: {
- uint32_t: 131076
- }
- enumerator: "AINFO_CHANNEL_RESAMPLER"
- scalar_value: {
- uint32_t: 131077
- }
- enumerator: "AINFO_LOCAL_GEOMAGNETIC_FIELD"
- scalar_value: {
- uint32_t: 196608
- }
- enumerator: "AINFO_LOCAL_GRAVITY"
- scalar_value: {
- uint32_t: 196609
- }
- enumerator: "AINFO_DOCK_STATE"
- scalar_value: {
- uint32_t: 196610
- }
- enumerator: "AINFO_HIGH_PERFORMANCE_MODE"
- scalar_value: {
- uint32_t: 196611
- }
- enumerator: "AINFO_MAGNETIC_FIELD_CALIBRATION"
- scalar_value: {
- uint32_t: 196612
- }
- enumerator: "AINFO_CUSTOM_START"
- scalar_value: {
- uint32_t: 268435456
- }
- enumerator: "AINFO_DEBUGGING_START"
- scalar_value: {
- uint32_t: 1073741824
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::AdditionalInfo"
- type: TYPE_STRUCT
- sub_struct: {
- name: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload"
- type: TYPE_UNION
- union_value: {
- name: "data_int32"
- type: TYPE_ARRAY
- vector_size: 14
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
- union_value: {
- name: "data_float"
- type: TYPE_ARRAY
- vector_size: 14
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- }
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfoType"
- }
- struct_value: {
- name: "serial"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "u"
- type: TYPE_UNION
- predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo::Payload"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::EventPayload"
- type: TYPE_UNION
- union_value: {
- name: "vec3"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::Vec3"
- }
- union_value: {
- name: "vec4"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::Vec4"
- }
- union_value: {
- name: "uncal"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::Uncal"
- }
- union_value: {
- name: "meta"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::MetaData"
- }
- union_value: {
- name: "scalar"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- union_value: {
- name: "stepCount"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- union_value: {
- name: "heartRate"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::HeartRate"
- }
- union_value: {
- name: "pose6DOF"
- type: TYPE_ARRAY
- vector_size: 15
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- }
- union_value: {
- name: "dynamic"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::DynamicSensorInfo"
- }
- union_value: {
- name: "additional"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::sensors::V1_0::AdditionalInfo"
- }
- union_value: {
- name: "data"
- type: TYPE_ARRAY
- vector_size: 16
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::Event"
- type: TYPE_STRUCT
- struct_value: {
- name: "timestamp"
- type: TYPE_SCALAR
- scalar_type: "int64_t"
- }
- struct_value: {
- name: "sensorHandle"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "sensorType"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SensorType"
- }
- struct_value: {
- name: "u"
- type: TYPE_UNION
- predefined_type: "::android::hardware::sensors::V1_0::EventPayload"
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::RateLevel"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "STOP"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NORMAL"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "FAST"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "VERY_FAST"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SharedMemType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "ASHMEM"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "GRALLOC"
- scalar_value: {
- int32_t: 2
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SharedMemFormat"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SENSORS_EVENT"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SensorsEventFormatOffset"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint16_t"
-
- enumerator: "SIZE_FIELD"
- scalar_value: {
- uint16_t: 0
- }
- enumerator: "REPORT_TOKEN"
- scalar_value: {
- uint16_t: 4
- }
- enumerator: "SENSOR_TYPE"
- scalar_value: {
- uint16_t: 8
- }
- enumerator: "ATOMIC_COUNTER"
- scalar_value: {
- uint16_t: 12
- }
- enumerator: "TIMESTAMP"
- scalar_value: {
- uint16_t: 16
- }
- enumerator: "DATA"
- scalar_value: {
- uint16_t: 24
- }
- enumerator: "RESERVED"
- scalar_value: {
- uint16_t: 88
- }
- enumerator: "TOTAL_LENGTH"
- scalar_value: {
- uint16_t: 104
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::sensors::V1_0::SharedMemInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SharedMemType"
- }
- struct_value: {
- name: "format"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::sensors::V1_0::SharedMemFormat"
- }
- struct_value: {
- name: "size"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "memoryHandle"
- type: TYPE_HANDLE
- }
-}
-
diff --git a/soundtrigger/2.0/default/Android.mk b/soundtrigger/2.0/default/Android.mk
index 70c78e0..068c6b4 100644
--- a/soundtrigger/2.0/default/Android.mk
+++ b/soundtrigger/2.0/default/Android.mk
@@ -27,7 +27,6 @@
libhidlbase \
libhidltransport \
liblog \
- libhwbinder \
libutils \
libhardware \
android.hardware.soundtrigger@2.0 \
diff --git a/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
index 7e2e12a..700b213 100644
--- a/soundtrigger/2.0/vts/functional/Android.bp
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.soundtrigger@2.0",
diff --git a/tests/bar/1.0/default/Android.bp b/tests/bar/1.0/default/Android.bp
index 2c79357..14506c5 100644
--- a/tests/bar/1.0/default/Android.bp
+++ b/tests/bar/1.0/default/Android.bp
@@ -14,7 +14,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.tests.foo@1.0",
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index 40e4024..e4eb145 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -21,6 +21,14 @@
interface IBaz extends IBase {
+ enum BitField : uint8_t {
+ V0 = 1 << 0,
+ V1 = 1 << 1,
+ V2 = 1 << 2,
+ V3 = 1 << 3,
+ VALL = V0 | V1 | V2 | V3,
+ };
+
enum SomeOtherEnum : uint8_t {
bar = 66
};
@@ -45,6 +53,21 @@
vec<T> matrices;
};
+ struct Quux {
+ string first;
+ string last;
+ };
+ struct Everything {
+ int8_t number;
+ int32_t anotherNumber;
+ string s;
+ vec<string> vs;
+ string[2][2] multidimArray;
+ string[3] sArray;
+ Quux anotherStruct;
+ bitfield<BitField> bf;
+ };
+
@Fragile @NoReally(very="yes", array={"a","b","c"})
oneway doThis(float param);
diff --git a/tests/extension/light/2.0/default/Android.mk b/tests/extension/light/2.0/default/Android.mk
index 4dee3ee..b30d11c 100644
--- a/tests/extension/light/2.0/default/Android.mk
+++ b/tests/extension/light/2.0/default/Android.mk
@@ -12,7 +12,6 @@
LOCAL_SHARED_LIBRARIES := \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
android.hardware.light@2.0 \
android.hardware.tests.extension.light@2.0 \
diff --git a/tests/foo/1.0/IFoo.hal b/tests/foo/1.0/IFoo.hal
index 76aefcf..a43b883 100644
--- a/tests/foo/1.0/IFoo.hal
+++ b/tests/foo/1.0/IFoo.hal
@@ -38,6 +38,7 @@
V1 = 1 << 1,
V2 = 1 << 2,
V3 = 1 << 3,
+ VALL = V0 | V1 | V2 | V3,
};
struct Fumble {
diff --git a/tests/foo/1.0/default/Android.bp b/tests/foo/1.0/default/Android.bp
index f4a80d5..77e617c 100644
--- a/tests/foo/1.0/default/Android.bp
+++ b/tests/foo/1.0/default/Android.bp
@@ -14,7 +14,6 @@
"libhidlbase",
"libhidltransport",
"libfootest",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.tests.foo@1.0",
diff --git a/tests/foo/1.0/default/lib/Android.bp b/tests/foo/1.0/default/lib/Android.bp
index 7873203..708cf43 100644
--- a/tests/foo/1.0/default/lib/Android.bp
+++ b/tests/foo/1.0/default/lib/Android.bp
@@ -7,7 +7,6 @@
shared_libs: [
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"android.hardware.tests.foo@1.0",
],
local_include_dirs: ["include/hidl-test"],
diff --git a/tests/inheritance/1.0/default/Android.bp b/tests/inheritance/1.0/default/Android.bp
index 090c36e..a67dc09 100644
--- a/tests/inheritance/1.0/default/Android.bp
+++ b/tests/inheritance/1.0/default/Android.bp
@@ -14,7 +14,6 @@
"libbase",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.tests.inheritance@1.0",
diff --git a/tests/libhwbinder/1.0/default/Android.bp b/tests/libhwbinder/1.0/default/Android.bp
index 0edabfc..6e8fbb1 100644
--- a/tests/libhwbinder/1.0/default/Android.bp
+++ b/tests/libhwbinder/1.0/default/Android.bp
@@ -10,7 +10,6 @@
"libbase",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.tests.libhwbinder@1.0",
diff --git a/tests/memory/1.0/default/Android.bp b/tests/memory/1.0/default/Android.bp
index 14dc08d..40716da 100644
--- a/tests/memory/1.0/default/Android.bp
+++ b/tests/memory/1.0/default/Android.bp
@@ -22,7 +22,6 @@
shared_libs: [
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libhidlmemory",
"liblog",
"libutils",
diff --git a/tests/pointer/1.0/default/Android.bp b/tests/pointer/1.0/default/Android.bp
index ab7f8fa..c4dc013 100644
--- a/tests/pointer/1.0/default/Android.bp
+++ b/tests/pointer/1.0/default/Android.bp
@@ -14,7 +14,6 @@
"libhidlbase",
"libhidltransport",
"libpointertest",
- "libhwbinder",
"liblog",
"libutils",
"android.hardware.tests.pointer@1.0",
diff --git a/tests/pointer/1.0/default/lib/Android.bp b/tests/pointer/1.0/default/lib/Android.bp
index a7203c7..7737932 100644
--- a/tests/pointer/1.0/default/lib/Android.bp
+++ b/tests/pointer/1.0/default/lib/Android.bp
@@ -8,7 +8,6 @@
"libbase",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"liblog",
"android.hardware.tests.pointer@1.0",
],
diff --git a/thermal/1.0/default/Android.bp b/thermal/1.0/default/Android.bp
index 96f69cc..0b068e7 100644
--- a/thermal/1.0/default/Android.bp
+++ b/thermal/1.0/default/Android.bp
@@ -7,7 +7,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libcutils",
"libutils",
diff --git a/thermal/1.0/default/Android.mk b/thermal/1.0/default/Android.mk
index 72c46af..2d25dc3 100644
--- a/thermal/1.0/default/Android.mk
+++ b/thermal/1.0/default/Android.mk
@@ -33,7 +33,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.thermal@1.0 \
diff --git a/thermal/1.0/vts/Thermal.vts b/thermal/1.0/vts/Thermal.vts
deleted file mode 100644
index 4611924..0000000
--- a/thermal/1.0/vts/Thermal.vts
+++ /dev/null
@@ -1,83 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IThermal"
-
-package: "android.hardware.thermal"
-
-import: "android.hardware.thermal@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getTemperatures"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::Temperature"
- }
- }
- callflow: {
- next: "*"
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- }
-
- api: {
- name: "getCpuUsages"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::CpuUsage"
- }
- }
- callflow: {
- next: "*"
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- }
-
- api: {
- name: "getCoolingDevices"
- return_type_hidl: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::ThermalStatus"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::thermal::V1_0::CoolingDevice"
- }
- }
- callflow: {
- next: "*"
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- }
-
-}
diff --git a/thermal/1.0/vts/functional/Android.bp b/thermal/1.0/vts/functional/Android.bp
index 92f8c49..63f0ba9 100644
--- a/thermal/1.0/vts/functional/Android.bp
+++ b/thermal/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.thermal@1.0",
diff --git a/thermal/1.0/vts/types.vts b/thermal/1.0/vts/types.vts
deleted file mode 100644
index f004bd8..0000000
--- a/thermal/1.0/vts/types.vts
+++ /dev/null
@@ -1,157 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.thermal"
-
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::TemperatureType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNKNOWN"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "CPU"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "GPU"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BATTERY"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SKIN"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::CoolingType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "FAN_RPM"
- scalar_value: {
- uint32_t: 0
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::Temperature"
- type: TYPE_STRUCT
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::thermal::V1_0::TemperatureType"
- }
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "currentValue"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "throttlingThreshold"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "shutdownThreshold"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
- struct_value: {
- name: "vrThrottlingThreshold"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::CoolingDevice"
- type: TYPE_STRUCT
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::thermal::V1_0::CoolingType"
- }
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "currentValue"
- type: TYPE_SCALAR
- scalar_type: "float_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::CpuUsage"
- type: TYPE_STRUCT
- struct_value: {
- name: "name"
- type: TYPE_STRING
- }
- struct_value: {
- name: "active"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "total"
- type: TYPE_SCALAR
- scalar_type: "uint64_t"
- }
- struct_value: {
- name: "isOnline"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::ThermalStatusCode"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "FAILURE"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::thermal::V1_0::ThermalStatus"
- type: TYPE_STRUCT
- struct_value: {
- name: "code"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::thermal::V1_0::ThermalStatusCode"
- }
- struct_value: {
- name: "debugMessage"
- type: TYPE_STRING
- }
-}
-
diff --git a/tv/cec/1.0/default/Android.mk b/tv/cec/1.0/default/Android.mk
index 3f986e6..9d37344 100644
--- a/tv/cec/1.0/default/Android.mk
+++ b/tv/cec/1.0/default/Android.mk
@@ -10,7 +10,6 @@
LOCAL_SHARED_LIBRARIES := \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libbase \
libutils \
@@ -38,7 +37,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.tv.cec@1.0 \
diff --git a/tv/cec/1.0/vts/HdmiCec.vts b/tv/cec/1.0/vts/HdmiCec.vts
deleted file mode 100644
index 6e71d24..0000000
--- a/tv/cec/1.0/vts/HdmiCec.vts
+++ /dev/null
@@ -1,172 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IHdmiCec"
-
-package: "android.hardware.tv.cec"
-
-import: "android.hardware.tv.cec@1.0::IHdmiCecCallback"
-import: "android.hardware.tv.cec@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "addLogicalAddress"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::Result"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "clearLogicalAddress"
- callflow: {
- next: "addLogicalAddress"
- }
- callflow: {
- exit: true
- }
- }
-
- api: {
- name: "getPhysicalAddress"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "sendMessage"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::SendMessageResult"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setCallback"
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::tv::cec::V1_0::IHdmiCecCallback"
- }
- callflow: {
- next: "addLogicalAddress"
- }
- callflow: {
- entry: true
- }
- }
-
- api: {
- name: "getCecVersion"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getVendorId"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "getPortInfo"
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
- }
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setOption"
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::OptionKey"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "setLanguage"
- arg: {
- type: TYPE_STRING
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "enableAudioReturnChannel"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- callflow: {
- next: "*"
- }
- }
-
- api: {
- name: "isConnected"
- return_type_hidl: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- callflow: {
- next: "*"
- }
- }
-
-}
diff --git a/tv/cec/1.0/vts/HdmiCecCallback.vts b/tv/cec/1.0/vts/HdmiCecCallback.vts
deleted file mode 100644
index a98db06..0000000
--- a/tv/cec/1.0/vts/HdmiCecCallback.vts
+++ /dev/null
@@ -1,27 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IHdmiCecCallback"
-
-package: "android.hardware.tv.cec"
-
-import: "android.hardware.tv.cec@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "onCecMessage"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::cec::V1_0::CecMessage"
- }
- }
-
- api: {
- name: "onHotplugEvent"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::cec::V1_0::HotplugEvent"
- }
- }
-
-}
diff --git a/tv/cec/1.0/vts/types.vts b/tv/cec/1.0/vts/types.vts
deleted file mode 100644
index ae972a5..0000000
--- a/tv/cec/1.0/vts/types.vts
+++ /dev/null
@@ -1,604 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.tv.cec"
-
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::MaxLength"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "MESSAGE_BODY"
- scalar_value: {
- int32_t: 15
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::CecDeviceType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INACTIVE"
- scalar_value: {
- int32_t: -1
- }
- enumerator: "TV"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "RECORDER"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "TUNER"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "PLAYBACK"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "AUDIO_SYSTEM"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "MAX"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "TV"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "RECORDER_1"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "RECORDER_2"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "TUNER_1"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "PLAYBACK_1"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "AUDIO_SYSTEM"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "TUNER_2"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "TUNER_3"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "PLAYBACK_2"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "RECORDER_3"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "TUNER_4"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "PLAYBACK_3"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "FREE_USE"
- scalar_value: {
- int32_t: 14
- }
- enumerator: "UNREGISTERED"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "BROADCAST"
- scalar_value: {
- int32_t: 15
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::CecMessageType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "FEATURE_ABORT"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "IMAGE_VIEW_ON"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "TUNER_STEP_INCREMENT"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "TUNER_STEP_DECREMENT"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "TUNER_DEVICE_STATUS"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "GIVE_TUNER_DEVICE_STATUS"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "RECORD_ON"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "RECORD_STATUS"
- scalar_value: {
- int32_t: 10
- }
- enumerator: "RECORD_OFF"
- scalar_value: {
- int32_t: 11
- }
- enumerator: "TEXT_VIEW_ON"
- scalar_value: {
- int32_t: 13
- }
- enumerator: "RECORD_TV_SCREEN"
- scalar_value: {
- int32_t: 15
- }
- enumerator: "GIVE_DECK_STATUS"
- scalar_value: {
- int32_t: 26
- }
- enumerator: "DECK_STATUS"
- scalar_value: {
- int32_t: 27
- }
- enumerator: "SET_MENU_LANGUAGE"
- scalar_value: {
- int32_t: 50
- }
- enumerator: "CLEAR_ANALOG_TIMER"
- scalar_value: {
- int32_t: 51
- }
- enumerator: "SET_ANALOG_TIMER"
- scalar_value: {
- int32_t: 52
- }
- enumerator: "TIMER_STATUS"
- scalar_value: {
- int32_t: 53
- }
- enumerator: "STANDBY"
- scalar_value: {
- int32_t: 54
- }
- enumerator: "PLAY"
- scalar_value: {
- int32_t: 65
- }
- enumerator: "DECK_CONTROL"
- scalar_value: {
- int32_t: 66
- }
- enumerator: "TIMER_CLEARED_STATUS"
- scalar_value: {
- int32_t: 67
- }
- enumerator: "USER_CONTROL_PRESSED"
- scalar_value: {
- int32_t: 68
- }
- enumerator: "USER_CONTROL_RELEASED"
- scalar_value: {
- int32_t: 69
- }
- enumerator: "GIVE_OSD_NAME"
- scalar_value: {
- int32_t: 70
- }
- enumerator: "SET_OSD_NAME"
- scalar_value: {
- int32_t: 71
- }
- enumerator: "SET_OSD_STRING"
- scalar_value: {
- int32_t: 100
- }
- enumerator: "SET_TIMER_PROGRAM_TITLE"
- scalar_value: {
- int32_t: 103
- }
- enumerator: "SYSTEM_AUDIO_MODE_REQUEST"
- scalar_value: {
- int32_t: 112
- }
- enumerator: "GIVE_AUDIO_STATUS"
- scalar_value: {
- int32_t: 113
- }
- enumerator: "SET_SYSTEM_AUDIO_MODE"
- scalar_value: {
- int32_t: 114
- }
- enumerator: "REPORT_AUDIO_STATUS"
- scalar_value: {
- int32_t: 122
- }
- enumerator: "GIVE_SYSTEM_AUDIO_MODE_STATUS"
- scalar_value: {
- int32_t: 125
- }
- enumerator: "SYSTEM_AUDIO_MODE_STATUS"
- scalar_value: {
- int32_t: 126
- }
- enumerator: "ROUTING_CHANGE"
- scalar_value: {
- int32_t: 128
- }
- enumerator: "ROUTING_INFORMATION"
- scalar_value: {
- int32_t: 129
- }
- enumerator: "ACTIVE_SOURCE"
- scalar_value: {
- int32_t: 130
- }
- enumerator: "GIVE_PHYSICAL_ADDRESS"
- scalar_value: {
- int32_t: 131
- }
- enumerator: "REPORT_PHYSICAL_ADDRESS"
- scalar_value: {
- int32_t: 132
- }
- enumerator: "REQUEST_ACTIVE_SOURCE"
- scalar_value: {
- int32_t: 133
- }
- enumerator: "SET_STREAM_PATH"
- scalar_value: {
- int32_t: 134
- }
- enumerator: "DEVICE_VENDOR_ID"
- scalar_value: {
- int32_t: 135
- }
- enumerator: "VENDOR_COMMAND"
- scalar_value: {
- int32_t: 137
- }
- enumerator: "VENDOR_REMOTE_BUTTON_DOWN"
- scalar_value: {
- int32_t: 138
- }
- enumerator: "VENDOR_REMOTE_BUTTON_UP"
- scalar_value: {
- int32_t: 139
- }
- enumerator: "GIVE_DEVICE_VENDOR_ID"
- scalar_value: {
- int32_t: 140
- }
- enumerator: "MENU_REQUEST"
- scalar_value: {
- int32_t: 141
- }
- enumerator: "MENU_STATUS"
- scalar_value: {
- int32_t: 142
- }
- enumerator: "GIVE_DEVICE_POWER_STATUS"
- scalar_value: {
- int32_t: 143
- }
- enumerator: "REPORT_POWER_STATUS"
- scalar_value: {
- int32_t: 144
- }
- enumerator: "GET_MENU_LANGUAGE"
- scalar_value: {
- int32_t: 145
- }
- enumerator: "SELECT_ANALOG_SERVICE"
- scalar_value: {
- int32_t: 146
- }
- enumerator: "SELECT_DIGITAL_SERVICE"
- scalar_value: {
- int32_t: 147
- }
- enumerator: "SET_DIGITAL_TIMER"
- scalar_value: {
- int32_t: 151
- }
- enumerator: "CLEAR_DIGITAL_TIMER"
- scalar_value: {
- int32_t: 153
- }
- enumerator: "SET_AUDIO_RATE"
- scalar_value: {
- int32_t: 154
- }
- enumerator: "INACTIVE_SOURCE"
- scalar_value: {
- int32_t: 157
- }
- enumerator: "CEC_VERSION"
- scalar_value: {
- int32_t: 158
- }
- enumerator: "GET_CEC_VERSION"
- scalar_value: {
- int32_t: 159
- }
- enumerator: "VENDOR_COMMAND_WITH_ID"
- scalar_value: {
- int32_t: 160
- }
- enumerator: "CLEAR_EXTERNAL_TIMER"
- scalar_value: {
- int32_t: 161
- }
- enumerator: "SET_EXTERNAL_TIMER"
- scalar_value: {
- int32_t: 162
- }
- enumerator: "INITIATE_ARC"
- scalar_value: {
- int32_t: 192
- }
- enumerator: "REPORT_ARC_INITIATED"
- scalar_value: {
- int32_t: 193
- }
- enumerator: "REPORT_ARC_TERMINATED"
- scalar_value: {
- int32_t: 194
- }
- enumerator: "REQUEST_ARC_INITIATION"
- scalar_value: {
- int32_t: 195
- }
- enumerator: "REQUEST_ARC_TERMINATION"
- scalar_value: {
- int32_t: 196
- }
- enumerator: "TERMINATE_ARC"
- scalar_value: {
- int32_t: 197
- }
- enumerator: "ABORT"
- scalar_value: {
- int32_t: 255
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::AbortReason"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "UNRECOGNIZED_MODE"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NOT_IN_CORRECT_MODE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "CANNOT_PROVIDE_SOURCE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "INVALID_OPERAND"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "REFUSED"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "UNABLE_TO_DETERMINE"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::Result"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "FAILURE_UNKNOWN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "FAILURE_INVALID_ARGS"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FAILURE_INVALID_STATE"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "FAILURE_NOT_SUPPORTED"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "FAILURE_BUSY"
- scalar_value: {
- int32_t: 5
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::SendMessageResult"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "SUCCESS"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "NACK"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "BUSY"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "FAIL"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::HdmiPortType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "INPUT"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "OUTPUT"
- scalar_value: {
- int32_t: 1
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::OptionKey"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "WAKEUP"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "ENABLE_CEC"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "SYSTEM_CEC_CONTROL"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::CecMessage"
- type: TYPE_STRUCT
- struct_value: {
- name: "initiator"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
- }
- struct_value: {
- name: "destination"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::CecLogicalAddress"
- }
- struct_value: {
- name: "body"
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::HotplugEvent"
- type: TYPE_STRUCT
- struct_value: {
- name: "connected"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "portId"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::cec::V1_0::HdmiPortInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::cec::V1_0::HdmiPortType"
- }
- struct_value: {
- name: "portId"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "cecSupported"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "arcSupported"
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- struct_value: {
- name: "physicalAddress"
- type: TYPE_SCALAR
- scalar_type: "uint16_t"
- }
-}
-
diff --git a/tv/input/1.0/default/Android.mk b/tv/input/1.0/default/Android.mk
index be1775d..210da86 100644
--- a/tv/input/1.0/default/Android.mk
+++ b/tv/input/1.0/default/Android.mk
@@ -13,7 +13,6 @@
libhardware \
libhidlbase \
libhidltransport \
- libhwbinder \
libutils \
android.hardware.audio.common@2.0 \
android.hardware.tv.input@1.0 \
@@ -38,7 +37,6 @@
libhardware \
LOCAL_SHARED_LIBRARIES += \
- libhwbinder \
libhidlbase \
libhidltransport \
android.hardware.audio.common@2.0 \
diff --git a/tv/input/1.0/vts/TvInput.vts b/tv/input/1.0/vts/TvInput.vts
deleted file mode 100644
index f049fc1..0000000
--- a/tv/input/1.0/vts/TvInput.vts
+++ /dev/null
@@ -1,99 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ITvInput"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-import: "android.hardware.tv.input@1.0::ITvInputCallback"
-import: "android.hardware.tv.input@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "setCallback"
- arg: {
- type: TYPE_HIDL_CALLBACK
- predefined_type: "::android::hardware::tv::input::V1_0::ITvInputCallback"
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- callflow: {
- next: "getStreamConfigurations"
- }
- }
-
- api: {
- name: "getStreamConfigurations"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::input::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::input::V1_0::TvStreamConfig"
- }
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- callflow: {
- next: "openStream"
- next: "getStreamConfigurations"
- next: "closeStream"
- }
- }
-
- api: {
- name: "openStream"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::input::V1_0::Result"
- }
- return_type_hidl: {
- type: TYPE_HANDLE
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- callflow: {
- next: "closeStream"
- next: "getStreamConfigurations"
- next: "openStream"
- }
- }
-
- api: {
- name: "closeStream"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::input::V1_0::Result"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- callflow: {
- next: "getStreamConfigurations"
- next: "openStream"
- next: "closeStream"
- }
- }
-
-}
diff --git a/tv/input/1.0/vts/TvInputCallback.vts b/tv/input/1.0/vts/TvInputCallback.vts
deleted file mode 100644
index 8082b9f..0000000
--- a/tv/input/1.0/vts/TvInputCallback.vts
+++ /dev/null
@@ -1,20 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "ITvInputCallback"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-import: "android.hardware.tv.input@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "notify"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::input::V1_0::TvInputEvent"
- }
- }
-
-}
diff --git a/tv/input/1.0/vts/functional/Android.bp b/tv/input/1.0/vts/functional/Android.bp
index b93111d..e3785ab 100644
--- a/tv/input/1.0/vts/functional/Android.bp
+++ b/tv/input/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.tv.input@1.0",
diff --git a/tv/input/1.0/vts/types.vts b/tv/input/1.0/vts/types.vts
deleted file mode 100644
index cb1d472..0000000
--- a/tv/input/1.0/vts/types.vts
+++ /dev/null
@@ -1,176 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.tv.input"
-
-import: "android.hardware.audio.common@2.0::types"
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::Result"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OK"
- scalar_value: {
- int32_t: 0
- }
- enumerator: "UNKNOWN"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "NO_RESOURCE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "INVALID_ARGUMENTS"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "INVALID_STATE"
- scalar_value: {
- int32_t: 4
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::TvInputType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "OTHER"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "TUNER"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "COMPOSITE"
- scalar_value: {
- int32_t: 3
- }
- enumerator: "SVIDEO"
- scalar_value: {
- int32_t: 4
- }
- enumerator: "SCART"
- scalar_value: {
- int32_t: 5
- }
- enumerator: "COMPONENT"
- scalar_value: {
- int32_t: 6
- }
- enumerator: "VGA"
- scalar_value: {
- int32_t: 7
- }
- enumerator: "DVI"
- scalar_value: {
- int32_t: 8
- }
- enumerator: "HDMI"
- scalar_value: {
- int32_t: 9
- }
- enumerator: "DISPLAY_PORT"
- scalar_value: {
- int32_t: 10
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::TvInputDeviceInfo"
- type: TYPE_STRUCT
- struct_value: {
- name: "deviceId"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::input::V1_0::TvInputType"
- }
- struct_value: {
- name: "portId"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "audioType"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::audio::common::V2_0::AudioDevice"
- }
- struct_value: {
- name: "audioAddress"
- type: TYPE_ARRAY
- vector_size: 32
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::TvInputEventType"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "int32_t"
-
- enumerator: "DEVICE_AVAILABLE"
- scalar_value: {
- int32_t: 1
- }
- enumerator: "DEVICE_UNAVAILABLE"
- scalar_value: {
- int32_t: 2
- }
- enumerator: "STREAM_CONFIGURATIONS_CHANGED"
- scalar_value: {
- int32_t: 3
- }
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::TvInputEvent"
- type: TYPE_STRUCT
- struct_value: {
- name: "type"
- type: TYPE_ENUM
- predefined_type: "::android::hardware::tv::input::V1_0::TvInputEventType"
- }
- struct_value: {
- name: "deviceInfo"
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::tv::input::V1_0::TvInputDeviceInfo"
- }
-}
-
-attribute: {
- name: "::android::hardware::tv::input::V1_0::TvStreamConfig"
- type: TYPE_STRUCT
- struct_value: {
- name: "streamId"
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- struct_value: {
- name: "maxVideoWidth"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- struct_value: {
- name: "maxVideoHeight"
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
-}
-
diff --git a/usb/1.0/default/Android.mk b/usb/1.0/default/Android.mk
index 489293c..afd53cf 100644
--- a/usb/1.0/default/Android.mk
+++ b/usb/1.0/default/Android.mk
@@ -14,7 +14,6 @@
libhidlbase \
libhidltransport \
liblog \
- libhwbinder \
libutils \
libhardware \
android.hardware.usb@1.0 \
diff --git a/usb/1.0/default/Usb.cpp b/usb/1.0/default/Usb.cpp
index f46ff66..6eb8842 100644
--- a/usb/1.0/default/Usb.cpp
+++ b/usb/1.0/default/Usb.cpp
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include <assert.h>
#include <dirent.h>
#include <iostream>
#include <fstream>
@@ -34,6 +35,9 @@
namespace V1_0 {
namespace implementation {
+// Set by the signal handler to destroy the thread
+volatile bool destroyThread;
+
int32_t readFile(std::string filename, std::string& contents) {
std::ifstream file(filename);
@@ -172,17 +176,22 @@
ports++;
}
}
+
+ if (ports == 0) {
+ closedir(dp);
+ return Status::SUCCESS;
+ }
+
names.resize(ports);
rewinddir(dp);
while ((ep = readdir (dp))) {
- /* Check to see if new ports were added since the first pass. */
- if (current >= ports) {
- rewinddir(dp);
- goto rescan;
- }
-
if (ep->d_type == DT_LNK) {
+ /* Check to see if new ports were added since the first pass. */
+ if (current >= ports) {
+ rewinddir(dp);
+ goto rescan;
+ }
names[current++] = ep->d_name;
}
}
@@ -234,7 +243,7 @@
if (result == Status::SUCCESS) {
currentPortStatus.resize(names.size());
- for(std::vector<std::string>::size_type i = 0; i != names.size(); i++) {
+ for(std::vector<std::string>::size_type i = 0; i < names.size(); i++) {
ALOGI("%s", names[i].c_str());
currentPortStatus[i].portName = names[i];
@@ -374,7 +383,7 @@
goto error;
}
- while (1) {
+ while (!destroyThread) {
struct epoll_event events[64];
nevents = epoll_wait(epoll_fd, events, 64, -1);
@@ -392,6 +401,7 @@
}
}
+ ALOGI("exiting worker thread");
error:
close(uevent_fd);
@@ -401,26 +411,61 @@
return NULL;
}
+void sighandler(int sig)
+{
+ if (sig == SIGUSR1) {
+ destroyThread = true;
+ ALOGI("destroy set");
+ return;
+ }
+ signal(SIGUSR1, sighandler);
+}
Return<void> Usb::setCallback(const sp<IUsbCallback>& callback) {
- if (mCallback != NULL) {
- ALOGE("Callback already registered");
+ pthread_mutex_lock(&mLock);
+ if ((mCallback == NULL && callback == NULL) ||
+ (mCallback != NULL && callback != NULL)) {
+ mCallback = callback;
+ pthread_mutex_unlock(&mLock);
return Void();
}
mCallback = callback;
ALOGI("registering callback");
- if (pthread_create(&mPoll, NULL, work, this)) {
- ALOGE("pthread creation failed %d", errno);
- mCallback = NULL;
+ if (mCallback == NULL) {
+ if (!pthread_kill(mPoll, SIGUSR1)) {
+ pthread_join(mPoll, NULL);
+ ALOGI("pthread destroyed");
+ }
+ pthread_mutex_unlock(&mLock);
return Void();
}
+ destroyThread = false;
+ signal(SIGUSR1, sighandler);
+
+ if (pthread_create(&mPoll, NULL, work, this)) {
+ ALOGE("pthread creation failed %d", errno);
+ mCallback = NULL;
+ }
+ pthread_mutex_unlock(&mLock);
return Void();
}
+// Protects *usb assignment
+pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+Usb *usb;
+
+Usb::Usb() {
+ pthread_mutex_lock(&lock);
+ // Make this a singleton class
+ assert(usb == NULL);
+ usb = this;
+ pthread_mutex_unlock(&lock);
+}
+
} // namespace implementation
} // namespace V1_0
} // namespace usb
diff --git a/usb/1.0/default/Usb.h b/usb/1.0/default/Usb.h
index cf418f4..c34d080 100644
--- a/usb/1.0/default/Usb.h
+++ b/usb/1.0/default/Usb.h
@@ -32,6 +32,7 @@
using ::android::sp;
struct Usb : public IUsb {
+ Usb();
Return<void> switchRole(const hidl_string& portName, const PortRole& role) override;
Return<void> setCallback(const sp<IUsbCallback>& callback) override;
Return<void> queryPortStatus() override;
@@ -39,6 +40,7 @@
sp<IUsbCallback> mCallback;
private:
pthread_t mPoll;
+ pthread_mutex_t mLock = PTHREAD_MUTEX_INITIALIZER;
};
} // namespace implementation
diff --git a/usb/1.0/vts/functional/Android.bp b/usb/1.0/vts/functional/Android.bp
index de11a8c..6f3d1be 100644
--- a/usb/1.0/vts/functional/Android.bp
+++ b/usb/1.0/vts/functional/Android.bp
@@ -24,7 +24,6 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.usb@1.0",
diff --git a/vibrator/1.0/default/Android.bp b/vibrator/1.0/default/Android.bp
index 6cb9802..3bd317f 100644
--- a/vibrator/1.0/default/Android.bp
+++ b/vibrator/1.0/default/Android.bp
@@ -22,7 +22,6 @@
"libhidlbase",
"libhidltransport",
"liblog",
- "libhwbinder",
"libutils",
"libhardware",
"android.hardware.vibrator@1.0",
diff --git a/vibrator/1.0/default/Android.mk b/vibrator/1.0/default/Android.mk
index 091d615..af4a955 100644
--- a/vibrator/1.0/default/Android.mk
+++ b/vibrator/1.0/default/Android.mk
@@ -28,7 +28,6 @@
libhidlbase \
libhidltransport \
liblog \
- libhwbinder \
libutils \
libhardware \
android.hardware.vibrator@1.0
diff --git a/vibrator/1.0/vts/Vibrator.vts b/vibrator/1.0/vts/Vibrator.vts
deleted file mode 100644
index 07ec30e..0000000
--- a/vibrator/1.0/vts/Vibrator.vts
+++ /dev/null
@@ -1,31 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IVibrator"
-
-package: "android.hardware.vibrator"
-
-import: "android.hardware.vibrator@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "on"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::vibrator::V1_0::Status"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "off"
- return_type_hidl: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::vibrator::V1_0::Status"
- }
- }
-
-}
diff --git a/vibrator/1.0/vts/types.vts b/vibrator/1.0/vts/types.vts
deleted file mode 100644
index d1bf1e1..0000000
--- a/vibrator/1.0/vts/types.vts
+++ /dev/null
@@ -1,24 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "types"
-
-package: "android.hardware.vibrator"
-
-
-attribute: {
- name: "::android::hardware::vibrator::V1_0::Status"
- type: TYPE_ENUM
- enum_value: {
- scalar_type: "uint32_t"
-
- enumerator: "OK"
- scalar_value: {
- uint32_t: 0
- }
- enumerator: "ERR"
- scalar_value: {
- uint32_t: 1
- }
- }
-}
-
diff --git a/vr/1.0/default/Android.bp b/vr/1.0/default/Android.bp
index 0d374d3..e7afa9a 100644
--- a/vr/1.0/default/Android.bp
+++ b/vr/1.0/default/Android.bp
@@ -7,7 +7,6 @@
"liblog",
"libcutils",
"libhardware",
- "libhwbinder",
"libbase",
"libcutils",
"libutils",
@@ -30,7 +29,6 @@
"libhardware",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"android.hardware.vr@1.0",
],
}
diff --git a/vr/1.0/default/Vr.cpp b/vr/1.0/default/Vr.cpp
index a0de998..345db99 100644
--- a/vr/1.0/default/Vr.cpp
+++ b/vr/1.0/default/Vr.cpp
@@ -42,16 +42,16 @@
return Void();
}
-IVr* HIDL_FETCH_IVr(const char *name) {
+IVr* HIDL_FETCH_IVr(const char * /*name*/) {
vr_module_t *vr_module;
const hw_module_t *hw_module = NULL;
- int ret = hw_get_module(name, &hw_module);
+ int ret = hw_get_module(VR_HARDWARE_MODULE_ID, &hw_module);
if (ret == 0) {
return new Vr(reinterpret_cast<vr_module_t*>(
const_cast<hw_module_t*>(hw_module)));
} else {
- ALOGE("hw_get_module %s failed: %d", name, ret);
+ ALOGE("hw_get_module %s failed: %d", VR_HARDWARE_MODULE_ID, ret);
return nullptr;
}
}
diff --git a/vr/1.0/default/service.cpp b/vr/1.0/default/service.cpp
index c27ceaf..22fb7d1 100644
--- a/vr/1.0/default/service.cpp
+++ b/vr/1.0/default/service.cpp
@@ -23,5 +23,5 @@
using android::hardware::defaultPassthroughServiceImplementation;
int main() {
- return defaultPassthroughServiceImplementation<IVr>("vr");
+ return defaultPassthroughServiceImplementation<IVr>();
}
diff --git a/vr/1.0/vts/Vr.vts b/vr/1.0/vts/Vr.vts
deleted file mode 100644
index fdc4a5c..0000000
--- a/vr/1.0/vts/Vr.vts
+++ /dev/null
@@ -1,37 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IVr"
-
-package: "android.hardware.vr"
-
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "init"
- callflow: {
- next: "*"
- }
- callflow: {
- entry: true
- }
- callflow: {
- exit: true
- }
- }
-
- api: {
- name: "setVrMode"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- callflow: {
- next: "*"
- }
- callflow: {
- exit: true
- }
- }
-
-}
diff --git a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
index 29888fd..c7ec076 100644
--- a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
+++ b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
@@ -26,13 +26,11 @@
using ::android::hardware::Void;
using ::android::sp;
-#define VR_SERVICE_NAME "vr"
-
// The main test class for VR HIDL HAL.
class VrHidlTest : public ::testing::Test {
public:
void SetUp() override {
- vr = IVr::getService(VR_SERVICE_NAME);
+ vr = IVr::getService();
ASSERT_NE(vr, nullptr);
}
diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk
index 4476b14..fa6ef6c 100644
--- a/wifi/1.0/Android.mk
+++ b/wifi/1.0/Android.mk
@@ -796,25 +796,6 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.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.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -1081,6 +1062,25 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.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.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (WifiChannelInfo)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
@@ -2599,25 +2599,6 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.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.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -2884,6 +2865,25 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.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.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (WifiChannelInfo)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
diff --git a/wifi/1.0/IWifiApIface.hal b/wifi/1.0/IWifiApIface.hal
index aeca2cd..1f6ee7c 100644
--- a/wifi/1.0/IWifiApIface.hal
+++ b/wifi/1.0/IWifiApIface.hal
@@ -33,4 +33,21 @@
* |WifiStatusCode.FAILURE_IFACE_INVALID|
*/
setCountryCode(int8_t[2] code) generates (WifiStatus status);
+
+ /**
+ * Used to query the list of valid frequencies (depending on country code set)
+ * for the provided band.
+ *
+ * @param band Band for which the frequency list is being generated.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+ * |WifiStatusCode.ERROR_UNKNOWN|
+ * @return frequencies vector of valid frequencies for the provided band.
+ */
+ getValidFrequenciesForBand(WifiBand band)
+ generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
};
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 96dc54a..43c3126 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -180,7 +180,6 @@
* for the provided band. These channels may be specifed in the
* |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
* request.
- * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
*
* @param band Band for which the frequency list is being generated.
* @return status WifiStatus of the operation.
@@ -192,7 +191,7 @@
* |WifiStatusCode.ERROR_UNKNOWN|
* @return frequencies vector of valid frequencies for the provided band.
*/
- getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
+ getValidFrequenciesForBand(WifiBand band)
generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
/**
diff --git a/wifi/1.0/default/Android.mk b/wifi/1.0/default/Android.mk
index 2d2d898..00e5f98 100644
--- a/wifi/1.0/default/Android.mk
+++ b/wifi/1.0/default/Android.mk
@@ -39,7 +39,6 @@
libcutils \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libnl \
libutils \
diff --git a/wifi/1.0/default/hidl_callback_util.h b/wifi/1.0/default/hidl_callback_util.h
index a1c6819..7136279 100644
--- a/wifi/1.0/default/hidl_callback_util.h
+++ b/wifi/1.0/default/hidl_callback_util.h
@@ -82,14 +82,12 @@
return true;
}
- const std::set<android::sp<CallbackType>> getCallbacks() {
- return cb_set_;
- }
+ const std::set<android::sp<CallbackType>> getCallbacks() { return cb_set_; }
// Death notification for callbacks.
void onObjectDeath(uint64_t cookie) {
- CallbackType *cb = reinterpret_cast<CallbackType*>(cookie);
- const auto& iter = cb_set_.find(cb);
+ CallbackType* cb = reinterpret_cast<CallbackType*>(cookie);
+ const auto& iter = cb_set_.find(cb);
if (iter == cb_set_.end()) {
LOG(ERROR) << "Unknown callback death notification received";
return;
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 7dbc8eb..726f011 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -306,21 +306,21 @@
return true;
}
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band) {
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band) {
switch (band) {
- case StaBackgroundScanBand::BAND_UNSPECIFIED:
+ case WifiBand::BAND_UNSPECIFIED:
return legacy_hal::WIFI_BAND_UNSPECIFIED;
- case StaBackgroundScanBand::BAND_24GHZ:
+ case WifiBand::BAND_24GHZ:
return legacy_hal::WIFI_BAND_BG;
- case StaBackgroundScanBand::BAND_5GHZ:
+ case WifiBand::BAND_5GHZ:
return legacy_hal::WIFI_BAND_A;
- case StaBackgroundScanBand::BAND_5GHZ_DFS:
+ case WifiBand::BAND_5GHZ_DFS:
return legacy_hal::WIFI_BAND_A_DFS;
- case StaBackgroundScanBand::BAND_5GHZ_WITH_DFS:
+ case WifiBand::BAND_5GHZ_WITH_DFS:
return legacy_hal::WIFI_BAND_A_WITH_DFS;
- case StaBackgroundScanBand::BAND_24GHZ_5GHZ:
+ case WifiBand::BAND_24GHZ_5GHZ:
return legacy_hal::WIFI_BAND_ABG;
- case StaBackgroundScanBand::BAND_24GHZ_5GHZ_WITH_DFS:
+ case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS:
return legacy_hal::WIFI_BAND_ABG_WITH_DFS;
};
CHECK(false);
@@ -950,7 +950,7 @@
hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
legacy_request->recv_indication_cfg |=
hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
- legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+ legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
@@ -973,6 +973,8 @@
legacy_request->range_report = legacy_hal::NAN_DISABLE_RANGE_REPORT;
legacy_request->publish_type = (legacy_hal::NanPublishType) hidl_request.publishType;
legacy_request->tx_type = (legacy_hal::NanTxType) hidl_request.txType;
+ legacy_request->service_responder_policy = hidl_request.autoAcceptDataPathRequests ?
+ legacy_hal::NAN_SERVICE_ACCEPT_POLICY_ALL : legacy_hal::NAN_SERVICE_ACCEPT_POLICY_NONE;
return true;
}
@@ -1041,7 +1043,7 @@
hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
legacy_request->recv_indication_cfg |=
hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
- legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+ legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
@@ -1230,14 +1232,15 @@
legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
legacy_request->app_info.ndp_app_info_len = hidl_request.appInfo.size();
if (legacy_request->app_info.ndp_app_info_len > NAN_DP_MAX_APP_INFO_LEN) {
- LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len to large";
+ LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len too large";
return false;
}
memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
legacy_request->app_info.ndp_app_info_len);
- legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+ legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
legacy_request->pmk_len = hidl_request.pmk.size();
if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
+ LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
return false;
}
memcpy(legacy_request->pmk, hidl_request.pmk.data(), legacy_request->pmk_len);
@@ -1267,7 +1270,7 @@
}
memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
legacy_request->app_info.ndp_app_info_len);
- legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+ legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
legacy_request->pmk_len = hidl_request.pmk.size();
if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
@@ -1337,7 +1340,7 @@
hidl_ind->matchOccuredInBeaconFlag = legacy_ind.match_occured_flag == 1;
hidl_ind->outOfResourceFlag = legacy_ind.out_of_resource_flag == 1;
hidl_ind->rssiValue = legacy_ind.rssi_value;
- hidl_ind->peerSupportedCipherTypes = legacy_ind.peer_cipher_type;
+ hidl_ind->peerCipherType = (NanCipherSuiteType) legacy_ind.peer_cipher_type;
hidl_ind->peerRequiresSecurityEnabledInNdp =
legacy_ind.peer_sdea_params.security_cfg == legacy_hal::NAN_DP_CONFIG_SECURITY;
hidl_ind->peerRequiresRanging =
diff --git a/wifi/1.0/default/hidl_struct_util.h b/wifi/1.0/default/hidl_struct_util.h
index 490dcae..41e97b3 100644
--- a/wifi/1.0/default/hidl_struct_util.h
+++ b/wifi/1.0/default/hidl_struct_util.h
@@ -60,7 +60,7 @@
bool convertLegacyGscanCapabilitiesToHidl(
const legacy_hal::wifi_gscan_capabilities& legacy_caps,
StaBackgroundScanCapabilities* hidl_caps);
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band);
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band);
bool convertHidlGscanParamsToLegacy(
const StaBackgroundScanParameters& hidl_scan_params,
legacy_hal::wifi_scan_cmd_params* legacy_scan_params);
diff --git a/wifi/1.0/default/wifi_ap_iface.cpp b/wifi/1.0/default/wifi_ap_iface.cpp
index 1a8b31d..e2beec2 100644
--- a/wifi/1.0/default/wifi_ap_iface.cpp
+++ b/wifi/1.0/default/wifi_ap_iface.cpp
@@ -17,6 +17,7 @@
#include <android-base/logging.h>
#include "hidl_return_util.h"
+#include "hidl_struct_util.h"
#include "wifi_ap_iface.h"
#include "wifi_status_util.h"
@@ -64,6 +65,15 @@
code);
}
+Return<void> WifiApIface::getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+ return validateAndCall(this,
+ WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+ &WifiApIface::getValidFrequenciesForBandInternal,
+ hidl_status_cb,
+ band);
+}
+
std::pair<WifiStatus, std::string> WifiApIface::getNameInternal() {
return {createWifiStatus(WifiStatusCode::SUCCESS), ifname_};
}
@@ -79,6 +89,16 @@
return createWifiStatusFromLegacyError(legacy_status);
}
+std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+WifiApIface::getValidFrequenciesForBandInternal(WifiBand band) {
+ static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
+ legacy_hal::wifi_error legacy_status;
+ std::vector<uint32_t> valid_frequencies;
+ std::tie(legacy_status, valid_frequencies) =
+ legacy_hal_.lock()->getValidFrequenciesForBand(
+ hidl_struct_util::convertHidlWifiBandToLegacy(band));
+ return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
+}
} // namespace implementation
} // namespace V1_0
} // namespace wifi
diff --git a/wifi/1.0/default/wifi_ap_iface.h b/wifi/1.0/default/wifi_ap_iface.h
index 23d6435..efc168a 100644
--- a/wifi/1.0/default/wifi_ap_iface.h
+++ b/wifi/1.0/default/wifi_ap_iface.h
@@ -44,12 +44,16 @@
Return<void> getType(getType_cb hidl_status_cb) override;
Return<void> setCountryCode(const hidl_array<int8_t, 2>& code,
setCountryCode_cb hidl_status_cb) override;
+ Return<void> getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
private:
// Corresponding worker functions for the HIDL methods.
std::pair<WifiStatus, std::string> getNameInternal();
std::pair<WifiStatus, IfaceType> getTypeInternal();
WifiStatus setCountryCodeInternal(const std::array<int8_t, 2>& code);
+ std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+ getValidFrequenciesForBandInternal(WifiBand band);
std::string ifname_;
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 7d58254..7390b65 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -562,7 +562,7 @@
}
std::pair<wifi_error, std::vector<uint32_t>>
-WifiLegacyHal::getValidFrequenciesForGscan(wifi_band band) {
+WifiLegacyHal::getValidFrequenciesForBand(wifi_band band) {
static_assert(sizeof(uint32_t) >= sizeof(wifi_channel),
"Wifi Channel cannot be represented in output");
std::vector<uint32_t> freqs;
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index ed020b0..c8fd5bd 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -175,7 +175,7 @@
const on_gscan_results_callback& on_results_callback,
const on_gscan_full_result_callback& on_full_result_callback);
wifi_error stopGscan(wifi_request_id id);
- std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForGscan(
+ std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
wifi_band band);
// Link layer stats functions.
wifi_error enableLinkLayerStats(bool debug);
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index 68be2a7..6977fc0 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -166,6 +166,7 @@
LOG(ERROR) << "Failed to invoke the callback";
}
}
+ break;
}
case legacy_hal::NAN_DP_END: {
for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 55c9cf7..0c84102 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -106,15 +106,13 @@
hidl_status_cb);
}
-Return<void> WifiStaIface::getValidFrequenciesForBackgroundScan(
- StaBackgroundScanBand band,
- getValidFrequenciesForBackgroundScan_cb hidl_status_cb) {
- return validateAndCall(
- this,
- WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getValidFrequenciesForBackgroundScanInternal,
- hidl_status_cb,
- band);
+Return<void> WifiStaIface::getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+ return validateAndCall(this,
+ WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+ &WifiStaIface::getValidFrequenciesForBandInternal,
+ hidl_status_cb,
+ band);
}
Return<void> WifiStaIface::startBackgroundScan(
@@ -363,14 +361,13 @@
}
std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
-WifiStaIface::getValidFrequenciesForBackgroundScanInternal(
- StaBackgroundScanBand band) {
+WifiStaIface::getValidFrequenciesForBandInternal(WifiBand band) {
static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
legacy_hal::wifi_error legacy_status;
std::vector<uint32_t> valid_frequencies;
std::tie(legacy_status, valid_frequencies) =
- legacy_hal_.lock()->getValidFrequenciesForGscan(
- hidl_struct_util::convertHidlGscanBandToLegacy(band));
+ legacy_hal_.lock()->getValidFrequenciesForBand(
+ hidl_struct_util::convertHidlWifiBandToLegacy(band));
return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
}
diff --git a/wifi/1.0/default/wifi_sta_iface.h b/wifi/1.0/default/wifi_sta_iface.h
index 5f0ffe9..08faa2f 100644
--- a/wifi/1.0/default/wifi_sta_iface.h
+++ b/wifi/1.0/default/wifi_sta_iface.h
@@ -57,9 +57,8 @@
installApfPacketFilter_cb hidl_status_cb) override;
Return<void> getBackgroundScanCapabilities(
getBackgroundScanCapabilities_cb hidl_status_cb) override;
- Return<void> getValidFrequenciesForBackgroundScan(
- StaBackgroundScanBand band,
- getValidFrequenciesForBackgroundScan_cb hidl_status_cb) override;
+ Return<void> getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
Return<void> startBackgroundScan(
uint32_t cmd_id,
const StaBackgroundScanParameters& params,
@@ -119,7 +118,7 @@
std::pair<WifiStatus, StaBackgroundScanCapabilities>
getBackgroundScanCapabilitiesInternal();
std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
- getValidFrequenciesForBackgroundScanInternal(StaBackgroundScanBand band);
+ getValidFrequenciesForBandInternal(WifiBand band);
WifiStatus startBackgroundScanInternal(
uint32_t cmd_id, const StaBackgroundScanParameters& params);
WifiStatus stopBackgroundScanInternal(uint32_t cmd_id);
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 30e8943..3b2f25b 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -210,6 +210,37 @@
};
/**
+ * Wifi bands defined in 80211 spec.
+ */
+enum WifiBand : uint32_t {
+ BAND_UNSPECIFIED = 0,
+ /**
+ * 2.4 GHz.
+ */
+ BAND_24GHZ = 1,
+ /**
+ * 5 GHz without DFS.
+ */
+ BAND_5GHZ = 2,
+ /**
+ * 5 GHz DFS only.
+ */
+ BAND_5GHZ_DFS = 4,
+ /**
+ * 5 GHz with DFS.
+ */
+ BAND_5GHZ_WITH_DFS = 6,
+ /**
+ * 2.4 GHz + 5 GHz; no DFS.
+ */
+ BAND_24GHZ_5GHZ = 3,
+ /**
+ * 2.4 GHz + 5 GHz with DFS
+ */
+ BAND_24GHZ_5GHZ_WITH_DFS = 7
+};
+
+/**
* STA specific types.
* TODO(b/32159498): Move to a separate sta_types.hal.
*/
@@ -251,37 +282,6 @@
};
/**
- * Bands that can be specified in Background scan requests.
- */
-enum StaBackgroundScanBand : uint32_t {
- BAND_UNSPECIFIED = 0,
- /**
- * 2.4 GHz.
- */
- BAND_24GHZ = 1,
- /**
- * 5 GHz without DFS.
- */
- BAND_5GHZ = 2,
- /**
- * 5 GHz DFS only.
- */
- BAND_5GHZ_DFS = 4,
- /**
- * 5 GHz with DFS.
- */
- BAND_5GHZ_WITH_DFS = 6,
- /**
- * 2.4 GHz + 5 GHz; no DFS.
- */
- BAND_24GHZ_5GHZ = 3,
- /**
- * 2.4 GHz + 5 GHz with DFS
- */
- BAND_24GHZ_5GHZ_WITH_DFS = 7
-};
-
-/**
* Mask of event reporting schemes that can be specified in background scan
* requests.
*/
@@ -311,12 +311,13 @@
*/
struct StaBackgroundScanBucketParameters {
/**
- * Bands to scan or 0 if frequencies list must be used instead.
+ * Bands to scan or |BAND_UNSPECIFIED| if frequencies list must be used
+ * instead.
*/
- StaBackgroundScanBand band;
+ WifiBand band;
/**
* Channel frequencies (in Mhz) to scan if |band| is set to
- * |UNSPECIFIED|.
+ * |BAND_UNSPECIFIED|.
*/
vec<WifiChannelInMhz> frequencies;
/**
@@ -876,6 +877,7 @@
* Cipher suite flags.
*/
enum NanCipherSuiteType : uint32_t {
+ NONE = 0, // No (open) security
SHARED_KEY_128_MASK = 1 << 0, // NCS-SK-128
SHARED_KEY_256_MASK = 1 << 1 // NCS-SK-256
};
@@ -990,13 +992,15 @@
*/
bool disableFollowupReceivedIndication;
/**
- * Cipher types supported in data-paths constructed in the context of this discovery session.
+ * Cipher type for data-paths constructed in the context of this discovery session. Must be
+ * specified as |NanCipherSuiteType.NONE| if no |pmk| is provided.
*/
- bitfield<NanCipherSuiteType> supportedCipherTypes;
+ NanCipherSuiteType cipherType;
/**
* Optional Pairwise Master Key (PMK) for data-paths constructed in the context of this discovery
* session. A PMK can also be provided during the actual construction of the data-path (which
- * allows for unique PMKs for each data-path).
+ * allows for unique PMKs for each data-path). The |cipherType| must be specified if a PMK is
+ * provided.
* Max length: 32
* Ref: IEEE 802.11i
*/
@@ -1009,22 +1013,12 @@
bool securityEnabledInNdp;
/**
* Specifies whether or not there is a ranging requirement in this discovery session.
- * Ranging is only performed if all other match criteria with the peer are met.
+ * Ranging is only performed if all other match criteria with the peer are met. Ranging must
+ * be performed if both peers in the discovery session (publisher and subscriber) set this
+ * flag to true. Otherwise, if either peer sets this flag to false, ranging must not be performed
+ * and must not impact discovery decisions.
* Note: specifying that ranging is required also implies that this device must automatically
* accept ranging requests from peers.
- * Solicited Publisher + Passive Subscriber:
- * Publisher/Subscriber:
- * true/true: ranging performed.
- * true/false: subscriber doesn't require ranging (match if all other criteria met). I.e.
- * publisher requiring range doesn't gate subscriber matching.
- * false/true: subscriber tries ranging but publisher refuses (no match).
- * false/false: ranging isn't attempted and doesn't impact match.
- * Unsolicited Publisher + Active Subscriber:
- * Publisher/Subscriber:
- * true/true: ranging performed.
- * true/false: publisher attempts ranging but subscriber doesn't allow - no match.
- * false/true: publisher doesn't attempt ranging, should not impact match.
- * false/false: ranging isn't attempted and doesn't impact match.
* NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Ranging Require.
*/
bool rangingRequired;
@@ -1068,6 +1062,13 @@
* peer.
*/
NanTxType txType;
+ /**
+ * Specifies whether data-path requests |IWifiNanIfaceEventCallback.eventDataPathRequest| (in
+ * the context of this discovery session) are automatically accepted (if true) - in which case
+ * the Responder must not call the |IWifiNanIface.respondToDataPathIndicationRequest| method and
+ * the device must automatically accept the data-path request and complete the negotiation.
+ */
+ bool autoAcceptDataPathRequests;
};
/**
@@ -1208,11 +1209,13 @@
*/
vec<uint8_t> appInfo;
/**
- * Cipher types supported in data-paths constructed in the context of this discovery session.
+ * Cipher type for the data-path being requested. Must be specified as |NanCipherSuiteType.NONE|
+ * if no |pmk| is provided.
*/
- bitfield<NanCipherSuiteType> supportedCipherTypes;
+ NanCipherSuiteType cipherType;
/**
* Pairwise Master Key (PMK) for the data-path being requested (if |securityRequired| is true).
+ * The |cipherType| must be specified if a PMK is provided.
* Max length: 32
* Ref: IEEE 802.11i
*/
@@ -1252,11 +1255,13 @@
*/
vec<uint8_t> appInfo;
/**
- * Cipher types supported in data-paths constructed in the context of this discovery session.
+ * Cipher type for the data-path being negotiated. Must be specified as |NanCipherSuiteType.NONE|
+ * if no |pmk| is provided.
*/
- bitfield<NanCipherSuiteType> supportedCipherTypes;
+ NanCipherSuiteType cipherType;
/**
* Pairwise Master Key (PMK) for the data-path being negotiated (if |securityRequired| is true).
+ * The |cipherType| must be specified if a PMK is provided.
* Max length: 32
*/
vec<uint8_t> pmk;
@@ -1383,13 +1388,14 @@
*/
uint8_t rssiValue;
/**
- * Cipher types supported by the peer for data-paths constructed in the context of this discovery
- * session.
+ * Cipher type for data-paths constructed in the context of this discovery session. Valid if
+ * |peerRequiresSecurityEnabledInNdp| is true.
*/
- bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
+ NanCipherSuiteType peerCipherType;
/**
* Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
- * in the context of this discovery session.
+ * in the context of this discovery session. The |cipherType| specifies the cipher type for such
+ * data-paths.
* NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
*/
bool peerRequiresSecurityEnabledInNdp;
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index 01eeef5..de917c0 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
cc_test {
name: "VtsHalWifiV1_0TargetTest",
- gtest: true,
srcs: [
"VtsHalWifiV1_0TargetTest.cpp",
"wifi_ap_iface_hidl_test.cpp",
@@ -34,12 +33,11 @@
"libcutils",
"libhidlbase",
"libhidltransport",
- "libhwbinder",
"libnativehelper",
"libutils",
"android.hardware.wifi@1.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetBaseTest"],
cflags: [
"-O0",
"-g",
diff --git a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
index b33b5eb..51512a1 100644
--- a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
+++ b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
diff --git a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
index dc7b0b9..dd3df56 100644
--- a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiApIface.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all AP Iface HIDL interface tests.
*/
-class WifiApIfaceHidlTest : public ::testing::Test {
+class WifiApIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index b6ecd8b..3c2ba9a 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiChip.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all Wifi chip HIDL interface tests.
*/
-class WifiChipHidlTest : public ::testing::Test {
+class WifiChipHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_hidl_call_util.h b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
index 03200a0..4797423 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_call_util.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
@@ -21,7 +21,7 @@
#include <type_traits>
#include <utility>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
namespace {
namespace detail {
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
index 3e350e5..2f4e01e 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifi.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all root Wifi HIDL interface tests.
*/
-class WifiHidlTest : public ::testing::Test {
+class WifiHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 8f34a88..820a75d 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_call_util.h"
#include "wifi_hidl_test_utils.h"
@@ -43,7 +43,7 @@
void startFramework() { ASSERT_EQ(std::system("svc wifi enable"), 0); }
sp<IWifi> getWifi() {
- sp<IWifi> wifi = IWifi::getService();
+ sp<IWifi> wifi = testing::VtsHalHidlTargetBaseTest::getService<IWifi>();
return wifi;
}
diff --git a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
index a8be48c..eb482c9 100644
--- a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiNanIface.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all NAN Iface HIDL interface tests.
*/
-class WifiNanIfaceHidlTest : public ::testing::Test {
+class WifiNanIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
index e29226d..d53096c 100644
--- a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiP2pIface.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all P2P Iface HIDL interface tests.
*/
-class WifiP2pIfaceHidlTest : public ::testing::Test {
+class WifiP2pIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
index 7aee761..4d08919 100644
--- a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiRttController.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all RTT controller HIDL interface tests.
*/
-class WifiRttControllerHidlTest : public ::testing::Test {
+class WifiRttControllerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index 770763c..4457487 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiStaIface.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all STA Iface HIDL interface tests.
*/
-class WifiStaIfaceHidlTest : public ::testing::Test {
+class WifiStaIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
public:
virtual void SetUp() override {}
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index b16fb39..37e8d3f 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -434,9 +434,11 @@
setEapClientCert(string path) generates (SupplicantStatus status);
/**
- * Set EAP private key file path for this network.
+ * Set EAP private key Id for this network.
+ * This is used if private key operations for EAP-TLS are performed
+ * using a smartcard.
*
- * @param path value to set.
+ * @param id value to set.
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
@@ -444,7 +446,7 @@
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/
- setEapPrivateKey(string path) generates (SupplicantStatus status);
+ setEapPrivateKeyId(string id) generates (SupplicantStatus status);
/**
* Set EAP subject match for this network.
@@ -810,16 +812,16 @@
getEapClientCert() generates (SupplicantStatus status, string path);
/**
- * Get EAP private key file path set for this network.
+ * Get EAP private key Id set for this network.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
- * @return path value set.
+ * @return id value set.
*/
- getEapPrivateKey() generates (SupplicantStatus status, string path);
+ getEapPrivateKeyId() generates (SupplicantStatus status, string id);
/**
* Get EAP subject match set for this network.
diff --git a/wifi/supplicant/1.0/vts/functional/Android.mk b/wifi/supplicant/1.0/vts/functional/Android.mk
index 52fecc2..93e5250 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.mk
+++ b/wifi/supplicant/1.0/vts/functional/Android.mk
@@ -31,13 +31,12 @@
libcutils \
libhidlbase \
libhidltransport \
- libhwbinder \
liblog \
libutils \
libwifi-hal \
libwifi-system
LOCAL_STATIC_LIBRARIES := \
libgmock \
- libgtest
+ VtsHalHidlTargetBaseTest
include $(BUILD_NATIVE_TEST)
diff --git a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
index 81a2947..802d11c 100644
--- a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
+++ b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
index 9922447..eb02445 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index 2f3405d..3f7ee1a 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -15,7 +15,7 @@
*/
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include <hidl/HidlTransportSupport.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
@@ -174,7 +174,7 @@
}
sp<ISupplicant> getSupplicant() {
- return ISupplicant::getService(kSupplicantServiceName);
+ return getService<ISupplicant>(kSupplicantServiceName);
}
sp<ISupplicantStaIface> getSupplicantStaIface() {
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 968d4c9..200845b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
index 45cc6bc..a1f5513 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index 8c42a22..e2572c2 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
#include "supplicant_hidl_test_utils.h"