Merge "Use broadcastradio 1.1 default implementation by default."
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 01b5e7b..91515ab 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -55,4 +55,8 @@
$(call add-clean-step, rm -rf $(OUT)/soong/.intermediates/)
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
$(call add-clean-step, rm -rf $(OUT_DIR)/soong/.intermediates/hardware/interfaces/)
-$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
\ No newline at end of file
+$(call add-clean-step, find $(PRODUCT_OUT)/system $(PRODUCT_OUT)/vendor -type f -name "android\.hardware\.configstore*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.automotive*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.automotive*)
diff --git a/automotive/Android.bp b/automotive/Android.bp
index aec8865..d9a6355 100644
--- a/automotive/Android.bp
+++ b/automotive/Android.bp
@@ -4,5 +4,8 @@
"evs/1.0/default",
"evs/1.0/vts/functional",
"vehicle/2.0",
+ "vehicle/2.0/default",
+ "vehicle/2.0/default/impl/vhal_v2_0/proto",
"vehicle/2.1",
+ "vehicle/2.1/default",
]
diff --git a/automotive/vehicle/2.0/default/Android.bp b/automotive/vehicle/2.0/default/Android.bp
new file mode 100644
index 0000000..3e3ff2c
--- /dev/null
+++ b/automotive/vehicle/2.0/default/Android.bp
@@ -0,0 +1,116 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_defaults {
+ name: "vhal_v2_0_defaults",
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "liblog",
+ "libutils",
+ "android.hardware.automotive.vehicle@2.0",
+ ],
+ cflags: [
+ "-Wall",
+ "-Wextra",
+ "-Werror",
+ ],
+}
+
+cc_library_headers {
+ name: "vhal_v2_0_common_headers",
+ vendor: true,
+ export_include_dirs: ["common/include/vhal_v2_0"],
+}
+
+// Vehicle reference implementation lib
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-manager-lib",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ srcs: [
+ "common/src/SubscriptionManager.cpp",
+ "common/src/VehicleHalManager.cpp",
+ "common/src/VehicleObjectPool.cpp",
+ "common/src/VehiclePropertyStore.cpp",
+ "common/src/VehicleUtils.cpp",
+ ],
+ local_include_dirs: ["common/include/vhal_v2_0"],
+ export_include_dirs: ["common/include"],
+}
+
+cc_library_shared {
+ name: "android.hardware.automotive.vehicle@2.0-manager-lib-shared",
+ vendor: true,
+ static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ export_static_lib_headers: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+}
+
+// Vehicle default VehicleHAL implementation
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ srcs: [
+ "impl/vhal_v2_0/EmulatedVehicleHal.cpp",
+ "impl/vhal_v2_0/VehicleEmulator.cpp",
+ "impl/vhal_v2_0/PipeComm.cpp",
+ "impl/vhal_v2_0/SocketComm.cpp",
+ ],
+ local_include_dirs: ["common/include/vhal_v2_0"],
+ export_include_dirs: ["impl"],
+ whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ shared_libs: [
+ "libbase",
+ "libprotobuf-cpp-lite",
+ ],
+ static_libs: [
+ "libqemu_pipe",
+ "android.hardware.automotive.vehicle@2.0-libproto-native",
+ ],
+}
+
+cc_test {
+ name: "android.hardware.automotive.vehicle@2.0-manager-unit-tests",
+ vendor: true,
+ defaults: ["vhal_v2_0_defaults"],
+ whole_static_libs: ["android.hardware.automotive.vehicle@2.0-manager-lib"],
+ srcs: [
+ "tests/RecurrentTimer_test.cpp",
+ "tests/SubscriptionManager_test.cpp",
+ "tests/VehicleHalManager_test.cpp",
+ "tests/VehicleObjectPool_test.cpp",
+ "tests/VehiclePropConfigIndex_test.cpp",
+ ],
+ header_libs: ["libbase_headers"],
+}
+
+cc_binary {
+ name: "android.hardware.automotive.vehicle@2.0-service",
+ defaults: ["vhal_v2_0_defaults"],
+ init_rc: ["android.hardware.automotive.vehicle@2.0-service.rc"],
+ vendor: true,
+ relative_install_path: "hw",
+ srcs: ["VehicleService.cpp"],
+ shared_libs: [
+ "libbase",
+ "libprotobuf-cpp-lite",
+ ],
+ static_libs: [
+ "android.hardware.automotive.vehicle@2.0-manager-lib",
+ "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ "android.hardware.automotive.vehicle@2.0-libproto-native",
+ "libqemu_pipe",
+ ],
+}
diff --git a/automotive/vehicle/2.0/default/Android.mk b/automotive/vehicle/2.0/default/Android.mk
deleted file mode 100644
index 72e1364..0000000
--- a/automotive/vehicle/2.0/default/Android.mk
+++ /dev/null
@@ -1,194 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-vhal_v2_0 = android.hardware.automotive.vehicle@2.0
-
-###############################################################################
-# Vehicle reference implementation lib
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-manager-lib
-LOCAL_SRC_FILES := \
- common/src/SubscriptionManager.cpp \
- common/src/VehicleHalManager.cpp \
- common/src/VehicleObjectPool.cpp \
- common/src/VehiclePropertyStore.cpp \
- common/src/VehicleUtils.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-manager-lib-shared
-LOCAL_SRC_FILES := \
- common/src/SubscriptionManager.cpp \
- common/src/VehicleHalManager.cpp \
- common/src/VehicleObjectPool.cpp \
- common/src/VehiclePropertyStore.cpp \
- common/src/VehicleUtils.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-include $(BUILD_SHARED_LIBRARY)
-
-###############################################################################
-# Vehicle HAL Protobuf library
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := $(call all-proto-files-under, impl/vhal_v2_0/proto)
-
-LOCAL_PROTOC_OPTIMIZE_TYPE := nano
-
-LOCAL_MODULE := $(vhal_v2_0)-libproto-native
-LOCAL_MODULE_CLASS := STATIC_LIBRARIES
-
-LOCAL_MODULE_TAGS := optional
-
-LOCAL_STRIP_MODULE := keep_symbols
-
-generated_sources_dir := $(call local-generated-sources-dir)
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(generated_sources_dir)/proto/$(LOCAL_PATH)/impl/vhal_v2_0/proto
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-###############################################################################
-# Vehicle default VehicleHAL implementation
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_0)-default-impl-lib
-LOCAL_SRC_FILES:= \
- impl/vhal_v2_0/EmulatedVehicleHal.cpp \
- impl/vhal_v2_0/VehicleEmulator.cpp \
- impl/vhal_v2_0/PipeComm.cpp \
- impl/vhal_v2_0/SocketComm.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/impl/vhal_v2_0
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/impl
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- liblog \
- libprotobuf-cpp-lite \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_STATIC_LIBRARIES := \
- libqemu_pipe \
- $(vhal_v2_0)-libproto-native \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_STATIC_LIBRARY)
-
-
-###############################################################################
-# Vehicle reference implementation unit tests
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_0)-manager-unit-tests
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
-
-LOCAL_SRC_FILES:= \
- tests/RecurrentTimer_test.cpp \
- tests/SubscriptionManager_test.cpp \
- tests/VehicleHalManager_test.cpp \
- tests/VehicleObjectPool_test.cpp \
- tests/VehiclePropConfigIndex_test.cpp \
-
-LOCAL_HEADER_LIBRARIES := \
- libbase_headers
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-LOCAL_MODULE_TAGS := tests
-
-include $(BUILD_NATIVE_TEST)
-
-
-###############################################################################
-# Vehicle HAL service
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_0)-service
-LOCAL_INIT_RC := $(vhal_v2_0)-service.rc
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_MODULE_RELATIVE_PATH := hw
-
-LOCAL_SRC_FILES := \
- VehicleService.cpp
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- liblog \
- libprotobuf-cpp-lite \
- libutils \
- $(vhal_v2_0) \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_0)-libproto-native \
- libqemu_pipe \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
new file mode 100644
index 0000000..ec35200
--- /dev/null
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/proto/Android.bp
@@ -0,0 +1,27 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Vehicle HAL Protobuf library
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.0-libproto-native",
+ vendor: true,
+ proto: {
+ export_proto_headers: true,
+ type: "lite",
+ },
+ strip: {
+ keep_symbols: true,
+ },
+ srcs: ["VehicleHalProto.proto"]
+}
diff --git a/automotive/vehicle/2.1/default/Android.bp b/automotive/vehicle/2.1/default/Android.bp
new file mode 100644
index 0000000..f6743f2
--- /dev/null
+++ b/automotive/vehicle/2.1/default/Android.bp
@@ -0,0 +1,86 @@
+// Copyright (C) 2017 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_defaults {
+ name: "vhal_v2_1_defaults",
+ defaults: ["vhal_v2_0_defaults"],
+ shared_libs: [
+ "libhwbinder",
+ "android.hardware.automotive.vehicle@2.1",
+ ],
+}
+
+// Vehicle reference implementation lib
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.1-manager-lib",
+ vendor: true,
+ defaults: ["vhal_v2_1_defaults"],
+ srcs: [
+ "common/src/Obd2SensorStore.cpp",
+ ],
+ local_include_dirs: ["common/include/vhal_v2_1"],
+ header_libs: ["vhal_v2_0_common_headers"],
+ export_include_dirs: ["common/include"],
+}
+
+// Vehicle default VehicleHAL implementation
+cc_library_static {
+ name: "android.hardware.automotive.vehicle@2.1-default-impl-lib",
+ vendor: true,
+ defaults: ["vhal_v2_1_defaults"],
+ srcs: [
+ "impl/vhal_v2_1/EmulatedVehicleHal.cpp",
+ ],
+ local_include_dirs: [
+ "impl/vhal_v2_1",
+ "common/include",
+ ],
+ export_include_dirs: [
+ "impl",
+ "common/include",
+ ],
+ static_libs: [
+ "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ "android.hardware.automotive.vehicle@2.0-libproto-native",
+ "android.hardware.automotive.vehicle@2.0-manager-lib",
+ "android.hardware.automotive.vehicle@2.1-manager-lib",
+ "libqemu_pipe",
+ ],
+ shared_libs: [
+ "libbase",
+ "libprotobuf-cpp-lite",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.automotive.vehicle@2.1-service",
+ defaults: ["vhal_v2_1_defaults"],
+ init_rc: ["android.hardware.automotive.vehicle@2.1-service.rc"],
+ vendor: true,
+ relative_install_path: "hw",
+ srcs: ["service.cpp"],
+ whole_static_libs: ["android.hardware.automotive.vehicle@2.0-libproto-native"],
+ static_libs: [
+ "android.hardware.automotive.vehicle@2.0-default-impl-lib",
+ "android.hardware.automotive.vehicle@2.0-manager-lib",
+ "android.hardware.automotive.vehicle@2.1-default-impl-lib",
+ "android.hardware.automotive.vehicle@2.1-manager-lib",
+ "libqemu_pipe",
+ ],
+ shared_libs: [
+ "libbase",
+ "libhwbinder",
+ "libprotobuf-cpp-lite",
+ ],
+}
diff --git a/automotive/vehicle/2.1/default/Android.mk b/automotive/vehicle/2.1/default/Android.mk
deleted file mode 100644
index f19263c..0000000
--- a/automotive/vehicle/2.1/default/Android.mk
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright (C) 2016 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LOCAL_PATH := $(call my-dir)
-
-vhal_v2_0 = android.hardware.automotive.vehicle@2.0
-vhal_v2_1 = android.hardware.automotive.vehicle@2.1
-
-###############################################################################
-# Vehicle reference implementation lib
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_1)-manager-lib
-LOCAL_SRC_FILES := \
- common/src/Obd2SensorStore.cpp
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/common/include/vhal_v2_1 \
- $(LOCAL_PATH)/../../2.0/default/common/include/vhal_v2_0 \
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/common/include
-
-LOCAL_SHARED_LIBRARIES := \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- $(vhal_v2_1) \
-
-include $(BUILD_STATIC_LIBRARY)
-
-###############################################################################
-# Vehicle default VehicleHAL implementation
-###############################################################################
-include $(CLEAR_VARS)
-
-LOCAL_MODULE:= $(vhal_v2_1)-default-impl-lib
-LOCAL_SRC_FILES:= \
- impl/vhal_v2_1/EmulatedVehicleHal.cpp \
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH)/impl/vhal_v2_1 \
- $(LOCAL_PATH)/common/include
-
-LOCAL_EXPORT_C_INCLUDE_DIRS := \
- $(LOCAL_PATH)/impl \
- $(LOCAL_PATH)/common/include
-
-
-# LOCAL_WHOLE_STATIC_LIBRARIES := \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_0)-manager-lib \
- libqemu_pipe \
- $(vhal_v2_1)-manager-lib \
- $(vhal_v2_0)-libproto-native
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- libprotobuf-cpp-lite \
- $(vhal_v2_0) \
- $(vhal_v2_1) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_STATIC_LIBRARY)
-
-###############################################################################
-# Vehicle HAL service
-###############################################################################
-include $(CLEAR_VARS)
-LOCAL_MODULE := $(vhal_v2_1)-service
-LOCAL_INIT_RC := $(vhal_v2_1)-service.rc
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_SRC_FILES := \
- service.cpp
-
-LOCAL_WHOLE_STATIC_LIBRARIES := \
- $(vhal_v2_0)-libproto-native \
-
-LOCAL_STATIC_LIBRARIES := \
- $(vhal_v2_0)-manager-lib \
- $(vhal_v2_0)-default-impl-lib \
- $(vhal_v2_1)-default-impl-lib \
- libqemu_pipe \
- $(vhal_v2_1)-manager-lib \
-
-LOCAL_SHARED_LIBRARIES := \
- libbase \
- libhidlbase \
- libhidltransport \
- libhwbinder \
- liblog \
- libutils \
- libprotobuf-cpp-lite \
- $(vhal_v2_0) \
- $(vhal_v2_1) \
-
-LOCAL_CFLAGS += -Wall -Wextra -Werror
-
-include $(BUILD_EXECUTABLE)
diff --git a/current.txt b/current.txt
index a5b5930..635bbd4 100644
--- a/current.txt
+++ b/current.txt
@@ -196,7 +196,6 @@
# HALs released in Android O MR1
-37a00ee36a2e38f9ff87cf71a37a49c13fe194fbed123c6b05c69fc76071f5c9 android.hardware.configstore@1.1::ISurfaceFlingerConfigs
4b65763663a94a3920134011691f8fbb42ccb7b7795589efddc049a9106047d6 android.hardware.oemlock@1.0::IOemLock
e02cd3722cb5e8fa51179f5defacb4f7866f903c9c7c51dc01a3148473a71525 android.hardware.oemlock@1.0::types
9f69e783fa2c482d90b2f799ddd33378a92d22a261983df6b492358e01f4d791 android.hardware.power@1.1::IPower
@@ -204,6 +203,7 @@
f79edf50a378a9c9bb737f93f205dab91b4c63ea49723afc6f856c138203ea81 android.hardware.radio@1.1::IRadio
fcc5c8c88b85a9f63fba67d9e674da466c72a98ca287f343fb5721d098713f86 android.hardware.radio@1.1::IRadioIndication
50f27e8c7ec009d5d4418b2ce8392b940bbf052ecc1d7251285f332485a5ba4e android.hardware.radio@1.1::IRadioResponse
+be981148c95c0089f3ae92854f0e7ae999d308e927db3e065f12a4fabe07852f android.hardware.radio@1.1::ISap
d8d6bf7b4d36c04ce587df75953c3f723cfbe71c896c1aa8ab6478eae126723d android.hardware.radio@1.1::types
d8aae01606bfd34bf2fb9a59cadc016f46f318e56cddb8f15a945c5b3c1222bc android.hardware.tetheroffload.config@1.0::IOffloadConfig
447b00306bc95a7aafec1d660f6f3e9f76ac8bc0353193435e5579ab833da619 android.hardware.tetheroffload.control@1.0::IOffloadControl
diff --git a/health/1.0/default/Android.bp b/health/1.0/default/Android.bp
new file mode 100644
index 0000000..c57152f
--- /dev/null
+++ b/health/1.0/default/Android.bp
@@ -0,0 +1,24 @@
+subdirs = [
+ "libhealthd",
+]
+
+cc_library_static {
+ name: "android.hardware.health@1.0-convert",
+ vendor_available: true,
+ srcs: ["convert.cpp"],
+ include_dirs: [
+ "system/core/base/include",
+ ],
+ header_libs: ["libhealthd_headers"],
+ export_header_lib_headers: ["libhealthd_headers"],
+ export_include_dirs: ["include"],
+ shared_libs: [
+ "libcutils",
+ "libhidlbase",
+ "libhidltransport",
+ "libutils",
+ "android.hardware.health@1.0",
+ ],
+
+}
+
diff --git a/health/1.0/default/Android.mk b/health/1.0/default/Android.mk
index 96ff91f..199ab41 100644
--- a/health/1.0/default/Android.mk
+++ b/health/1.0/default/Android.mk
@@ -4,10 +4,12 @@
LOCAL_MODULE := android.hardware.health@1.0-impl
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_C_INCLUDES := system/core/healthd/include system/core/base/include
+LOCAL_C_INCLUDES := system/core/base/include
LOCAL_SRC_FILES := \
Health.cpp \
+LOCAL_HEADER_LIBRARIES := libhealthd_headers
+
LOCAL_SHARED_LIBRARIES := \
libcutils \
libhidlbase \
@@ -23,20 +25,6 @@
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.health@1.0-convert
-LOCAL_SRC_FILES := convert.cpp
-LOCAL_C_INCLUDES := system/core/healthd/include system/core/base/include
-LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libhidlbase \
- libhidltransport \
- libutils \
- android.hardware.health@1.0 \
-
-include $(BUILD_STATIC_LIBRARY)
-
-include $(CLEAR_VARS)
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_MODULE := android.hardware.health@1.0-service
diff --git a/health/1.0/default/libhealthd/Android.bp b/health/1.0/default/libhealthd/Android.bp
new file mode 100644
index 0000000..ce02e28
--- /dev/null
+++ b/health/1.0/default/libhealthd/Android.bp
@@ -0,0 +1,10 @@
+// Copyright 2016 The Android Open Source Project
+
+cc_library_static {
+ srcs: ["healthd_board_default.cpp"],
+ name: "libhealthd.default",
+ vendor_available: true,
+ cflags: ["-Werror"],
+ include_dirs: ["system/core/base/include"],
+ header_libs: ["libhealthd_headers"],
+}
diff --git a/health/1.0/default/libhealthd/Android.mk b/health/1.0/default/libhealthd/Android.mk
deleted file mode 100644
index a5f4445..0000000
--- a/health/1.0/default/libhealthd/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright 2016 The Android Open Source Project
-
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := healthd_board_default.cpp
-LOCAL_MODULE := libhealthd.default
-LOCAL_CFLAGS := -Werror
-LOCAL_C_INCLUDES := system/core/healthd/include system/core/base/include
-include $(BUILD_STATIC_LIBRARY)
diff --git a/health/Android.bp b/health/Android.bp
index 33f70eb..ed19a37 100644
--- a/health/Android.bp
+++ b/health/Android.bp
@@ -1,5 +1,6 @@
// This is an autogenerated file, do not edit.
subdirs = [
"1.0",
+ "1.0/default",
"1.0/vts/functional",
]
diff --git a/radio/1.1/Android.bp b/radio/1.1/Android.bp
index 3583159..3a3f639 100644
--- a/radio/1.1/Android.bp
+++ b/radio/1.1/Android.bp
@@ -7,6 +7,7 @@
"IRadio.hal",
"IRadioIndication.hal",
"IRadioResponse.hal",
+ "ISap.hal",
],
}
@@ -22,6 +23,7 @@
"android/hardware/radio/1.1/RadioAll.cpp",
"android/hardware/radio/1.1/RadioIndicationAll.cpp",
"android/hardware/radio/1.1/RadioResponseAll.cpp",
+ "android/hardware/radio/1.1/SapAll.cpp",
],
}
@@ -50,6 +52,11 @@
"android/hardware/radio/1.1/BnHwRadioResponse.h",
"android/hardware/radio/1.1/BpHwRadioResponse.h",
"android/hardware/radio/1.1/BsRadioResponse.h",
+ "android/hardware/radio/1.1/ISap.h",
+ "android/hardware/radio/1.1/IHwSap.h",
+ "android/hardware/radio/1.1/BnHwSap.h",
+ "android/hardware/radio/1.1/BpHwSap.h",
+ "android/hardware/radio/1.1/BsSap.h",
],
}
diff --git a/radio/1.1/Android.mk b/radio/1.1/Android.mk
index b83ac80..b8aeb4f 100644
--- a/radio/1.1/Android.mk
+++ b/radio/1.1/Android.mk
@@ -364,6 +364,25 @@
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISap.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/ISap.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISap.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@1.1::ISap
+
+$(GEN): $(LOCAL_PATH)/ISap.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_JAVA_LIBRARY)
@@ -729,6 +748,25 @@
$(GEN): $(LOCAL_PATH)/IRadioResponse.hal
$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISap.hal
+#
+GEN := $(intermediates)/android/hardware/radio/V1_1/ISap.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISap.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@1.1::ISap
+
+$(GEN): $(LOCAL_PATH)/ISap.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/radio/1.1/ISap.hal b/radio/1.1/ISap.hal
new file mode 100644
index 0000000..edcf176
--- /dev/null
+++ b/radio/1.1/ISap.hal
@@ -0,0 +1,25 @@
+/*
+ * 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@1.1;
+
+import @1.0::ISap;
+
+interface ISap extends @1.0::ISap {
+ /**
+ * Empty top level interface.
+ */
+};
diff --git a/wifi/1.1/default/hidl_struct_util.cpp b/wifi/1.1/default/hidl_struct_util.cpp
index e40a7d8..a413cbb 100644
--- a/wifi/1.1/default/hidl_struct_util.cpp
+++ b/wifi/1.1/default/hidl_struct_util.cpp
@@ -17,6 +17,9 @@
#include <android-base/logging.h>
#include <utils/SystemClock.h>
+#include <android/hardware/wifi/1.0/IWifiChip.h>
+#include <android/hardware/wifi/1.1/IWifiChip.h>
+
#include "hidl_struct_util.h"
namespace android {
@@ -66,6 +69,17 @@
return {};
}
+V1_1::IWifiChip::ChipCapabilityMask convertLegacyFeatureToHidlChipCapability(
+ uint32_t feature) {
+ using HidlChipCaps = V1_1::IWifiChip::ChipCapabilityMask;
+ switch (feature) {
+ case WIFI_FEATURE_SET_TX_POWER_LIMIT:
+ return HidlChipCaps::SET_TX_POWER_LIMIT;
+ };
+ CHECK(false) << "Unknown legacy feature: " << feature;
+ return {};
+}
+
IWifiStaIface::StaIfaceCapabilityMask
convertLegacyFeatureToHidlStaIfaceCapability(uint32_t feature) {
using HidlStaIfaceCaps = IWifiStaIface::StaIfaceCapabilityMask;
@@ -102,7 +116,9 @@
}
bool convertLegacyFeaturesToHidlChipCapabilities(
- uint32_t legacy_logger_feature_set, uint32_t* hidl_caps) {
+ uint32_t legacy_feature_set,
+ uint32_t legacy_logger_feature_set,
+ uint32_t* hidl_caps) {
if (!hidl_caps) {
return false;
}
@@ -117,6 +133,11 @@
*hidl_caps |= convertLegacyLoggerFeatureToHidlChipCapability(feature);
}
}
+ for (const auto feature : {WIFI_FEATURE_SET_TX_POWER_LIMIT}) {
+ if (feature & legacy_feature_set) {
+ *hidl_caps |= convertLegacyFeatureToHidlChipCapability(feature);
+ }
+ }
// There are no flags for these 3 in the legacy feature set. Adding them to
// the set because all the current devices support it.
*hidl_caps |= HidlChipCaps::DEBUG_RING_BUFFER_VENDOR_DATA;
@@ -241,7 +262,6 @@
return false;
}
*hidl_caps = {};
- *hidl_caps = 0;
using HidlStaIfaceCaps = IWifiStaIface::StaIfaceCapabilityMask;
for (const auto feature : {legacy_hal::WIFI_LOGGER_PACKET_FATE_SUPPORTED}) {
if (feature & legacy_logger_feature_set) {
diff --git a/wifi/1.1/default/hidl_struct_util.h b/wifi/1.1/default/hidl_struct_util.h
index a04f636..7a840f9 100644
--- a/wifi/1.1/default/hidl_struct_util.h
+++ b/wifi/1.1/default/hidl_struct_util.h
@@ -19,7 +19,7 @@
#include <vector>
-#include <android/hardware/wifi/1.0/IWifi.h>
+#include <android/hardware/wifi/1.0/types.h>
#include "wifi_legacy_hal.h"
@@ -39,7 +39,9 @@
// Chip conversion methods.
bool convertLegacyFeaturesToHidlChipCapabilities(
- uint32_t legacy_logger_feature_set, uint32_t* hidl_caps);
+ uint32_t legacy_feature_set,
+ uint32_t legacy_logger_feature_set,
+ uint32_t* hidl_caps);
bool convertLegacyDebugRingBufferStatusToHidl(
const legacy_hal::wifi_ring_buffer_status& legacy_status,
WifiDebugRingBufferStatus* hidl_status);
diff --git a/wifi/1.1/default/wifi_chip.cpp b/wifi/1.1/default/wifi_chip.cpp
index 87985c0..2beac26 100644
--- a/wifi/1.1/default/wifi_chip.cpp
+++ b/wifi/1.1/default/wifi_chip.cpp
@@ -387,7 +387,13 @@
std::pair<WifiStatus, uint32_t> WifiChip::getCapabilitiesInternal() {
legacy_hal::wifi_error legacy_status;
+ uint32_t legacy_feature_set;
uint32_t legacy_logger_feature_set;
+ std::tie(legacy_status, legacy_feature_set) =
+ legacy_hal_.lock()->getSupportedFeatureSet();
+ if (legacy_status != legacy_hal::WIFI_SUCCESS) {
+ return {createWifiStatusFromLegacyError(legacy_status), 0};
+ }
std::tie(legacy_status, legacy_logger_feature_set) =
legacy_hal_.lock()->getLoggerSupportedFeatureSet();
if (legacy_status != legacy_hal::WIFI_SUCCESS) {
@@ -395,7 +401,7 @@
}
uint32_t hidl_caps;
if (!hidl_struct_util::convertLegacyFeaturesToHidlChipCapabilities(
- legacy_logger_feature_set, &hidl_caps)) {
+ legacy_feature_set, legacy_logger_feature_set, &hidl_caps)) {
return {createWifiStatus(WifiStatusCode::ERROR_UNKNOWN), 0};
}
return {createWifiStatus(WifiStatusCode::SUCCESS), hidl_caps};
@@ -818,16 +824,14 @@
return createWifiStatusFromLegacyError(legacy_status);
}
-WifiStatus WifiChip::setTxPowerLimitInternal(int32_t /* powerInDbm */) {
- // TODO(b/62437848): Implement this method once we are ready with the
- // header changes in legacy HAL.
- return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED);
+WifiStatus WifiChip::setTxPowerLimitInternal(int32_t powerInDbm) {
+ auto legacy_status = legacy_hal_.lock()->setTxPowerLimit(powerInDbm);
+ return createWifiStatusFromLegacyError(legacy_status);
}
WifiStatus WifiChip::resetTxPowerLimitInternal() {
- // TODO(b/62437848): Implement this method once we are ready with the
- // header changes in legacy HAL.
- return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED);
+ auto legacy_status = legacy_hal_.lock()->resetTxPowerLimit();
+ return createWifiStatusFromLegacyError(legacy_status);
}
WifiStatus WifiChip::handleChipConfiguration(ChipModeId mode_id) {
diff --git a/wifi/1.1/default/wifi_legacy_hal.cpp b/wifi/1.1/default/wifi_legacy_hal.cpp
index c1e1cd3..052aafb 100644
--- a/wifi/1.1/default/wifi_legacy_hal.cpp
+++ b/wifi/1.1/default/wifi_legacy_hal.cpp
@@ -752,6 +752,15 @@
oui_internal.data());
}
+wifi_error WifiLegacyHal::setTxPowerLimit(int32_t tx_level_dbm) {
+ return global_func_table_.wifi_set_tx_power_limit(wlan_interface_handle_,
+ tx_level_dbm);
+}
+
+wifi_error WifiLegacyHal::resetTxPowerLimit() {
+ return global_func_table_.wifi_reset_tx_power_limit(wlan_interface_handle_);
+}
+
std::pair<wifi_error, uint32_t> WifiLegacyHal::getLoggerSupportedFeatureSet() {
uint32_t supported_features;
wifi_error status = global_func_table_.wifi_get_logger_supported_feature_set(
diff --git a/wifi/1.1/default/wifi_legacy_hal.h b/wifi/1.1/default/wifi_legacy_hal.h
index fef7999..8d9144d 100644
--- a/wifi/1.1/default/wifi_legacy_hal.h
+++ b/wifi/1.1/default/wifi_legacy_hal.h
@@ -205,6 +205,8 @@
uint32_t period_in_ms);
wifi_error stopSendingOffloadedPacket(uint32_t cmd_id);
wifi_error setScanningMacOui(const std::array<uint8_t, 3>& oui);
+ wifi_error setTxPowerLimit(int32_t tx_level_dbm);
+ wifi_error resetTxPowerLimit();
// Logger/debug functions.
std::pair<wifi_error, uint32_t> getLoggerSupportedFeatureSet();
wifi_error startPktFateMonitoring();
diff --git a/wifi/1.1/default/wifi_legacy_hal_stubs.cpp b/wifi/1.1/default/wifi_legacy_hal_stubs.cpp
index a5a5d48..24ed548 100644
--- a/wifi/1.1/default/wifi_legacy_hal_stubs.cpp
+++ b/wifi/1.1/default/wifi_legacy_hal_stubs.cpp
@@ -132,6 +132,8 @@
populateStubFor(&hal_fn->wifi_get_roaming_capabilities);
populateStubFor(&hal_fn->wifi_enable_firmware_roaming);
populateStubFor(&hal_fn->wifi_configure_roaming);
+ populateStubFor(&hal_fn->wifi_set_tx_power_limit);
+ populateStubFor(&hal_fn->wifi_reset_tx_power_limit);
return true;
}
} // namespace legacy_hal