Merge changes from topic 'hidl-vndk-enabled-oc-mr1' into oc-mr1-dev
* changes:
Mark hidl utils as vndk
Manually update makefile for vndk-sp hidl libs.
Update make file for vndk enabled.
diff --git a/automotive/vehicle/2.1/types.hal b/automotive/vehicle/2.1/types.hal
index 49ce9c8..2e361a3 100644
--- a/automotive/vehicle/2.1/types.hal
+++ b/automotive/vehicle/2.1/types.hal
@@ -50,16 +50,11 @@
* configArray[3] = micrometers per rear right wheel tick
* configArray[4] = micrometers per rear left wheel tick
*
- * NOTE: If a wheel is not supported, its value shall always be set to
- * LONG_MAX = 9223372036854775807.
+ * NOTE: If a wheel is not supported, its value shall always be set to 0.
*
* VehiclePropValue.timestamp must be correctly filled in.
*
- * Vendors must specify wheels that support this sensor in
- * VehiclePropConfig.configFlags. The format of this field is a bitset of
- * values from Wheel enum.
- *
- * @change_mode VehiclePropertyChangeMode:ON_CHANGE |VehiclePropertyChangeMode:CONTINUOUS
+ * @change_mode VehiclePropertyChangeMode:CONTINUOUS
* @access VehiclePropertyAccess:READ
*/
WHEEL_TICK = (
@@ -95,9 +90,8 @@
/**
* Automatic re-circulation on/off
*
- * IVehicle#set may return StatusCode::NOT_AVAILABLE and IVehicle#get is not
- * guaranteed to work if HVAC unit is off. See HVAC_POWER_ON property for
- * details.
+ * IVehicle#set and IVehicle#get must return StatusCode::NOT_AVAILABLE when HVAC unit is off.
+ * See HVAC_POWER_ON property for details.
*
* @change_mode VehiclePropertyChangeMode:ON_CHANGE
* @access VehiclePropertyAccess:READ_WRITE
diff --git a/broadcastradio/1.1/ITuner.hal b/broadcastradio/1.1/ITuner.hal
index 034f9c6..b20c5f4 100644
--- a/broadcastradio/1.1/ITuner.hal
+++ b/broadcastradio/1.1/ITuner.hal
@@ -106,10 +106,8 @@
* This call does not trigger actual scan, but operates on the list cached
* internally at the driver level.
*
- * @param filter vendor-specific filter for the stations to be retrieved.
- * An empty string MUST result in full list.
- * Client application MUST verify vendor/product name
- * before setting this parameter to anything else.
+ * @param vendorFilter vendor-specific filter for the stations to be retrieved.
+ * An empty vector MUST result in full list for a given tuner.
* @return result OK if the list was successfully retrieved.
* INVALID_ARGUMENTS if invalid arguments are passed
* NOT_READY if the scan is in progress.
@@ -118,7 +116,7 @@
* NOT_INITIALIZED if any other error occurs.
* @return programList List of stations available for user.
*/
- getProgramList(string filter)
+ getProgramList(vec<VendorKeyValue> vendorFilter)
generates (ProgramListResult result, vec<ProgramInfo> programList);
/**
diff --git a/broadcastradio/1.1/default/BroadcastRadio.cpp b/broadcastradio/1.1/default/BroadcastRadio.cpp
index 17ec780..ce7a10f 100644
--- a/broadcastradio/1.1/default/BroadcastRadio.cpp
+++ b/broadcastradio/1.1/default/BroadcastRadio.cpp
@@ -91,17 +91,19 @@
prop10.numAudioSources = 1;
prop10.supportsCapture = false;
prop11.supportsBackgroundScanning = false;
- prop11.supportedProgramTypes = vector<uint32_t>({
+ prop11.supportedProgramTypes = hidl_vec<uint32_t>({
static_cast<uint32_t>(ProgramType::AM), static_cast<uint32_t>(ProgramType::FM),
static_cast<uint32_t>(ProgramType::AM_HD), static_cast<uint32_t>(ProgramType::FM_HD),
});
- prop11.supportedIdentifierTypes = vector<uint32_t>({
+ prop11.supportedIdentifierTypes = hidl_vec<uint32_t>({
static_cast<uint32_t>(IdentifierType::AMFM_FREQUENCY),
static_cast<uint32_t>(IdentifierType::RDS_PI),
static_cast<uint32_t>(IdentifierType::HD_STATION_ID_EXT),
static_cast<uint32_t>(IdentifierType::HD_SUBCHANNEL),
});
- prop11.vendorInfo = "dummy";
+ prop11.vendorInfo = hidl_vec<VendorKeyValue>({
+ {"com.google.dummy", "dummy"},
+ });
prop10.bands.resize(mConfig.amFmBands.size());
for (size_t i = 0; i < mConfig.amFmBands.size(); i++) {
diff --git a/broadcastradio/1.1/default/Tuner.cpp b/broadcastradio/1.1/default/Tuner.cpp
index aacd523..6048518 100644
--- a/broadcastradio/1.1/default/Tuner.cpp
+++ b/broadcastradio/1.1/default/Tuner.cpp
@@ -337,8 +337,9 @@
return ProgramListResult::UNAVAILABLE;
}
-Return<void> Tuner::getProgramList(const hidl_string& filter, getProgramList_cb _hidl_cb) {
- ALOGV("%s(%s)", __func__, filter.c_str());
+Return<void> Tuner::getProgramList(const hidl_vec<VendorKeyValue>& vendorFilter,
+ getProgramList_cb _hidl_cb) {
+ ALOGV("%s(%s)", __func__, toString(vendorFilter).substr(0, 100).c_str());
lock_guard<mutex> lk(mMut);
if (mIsClosed) {
_hidl_cb(ProgramListResult::NOT_INITIALIZED, {});
diff --git a/broadcastradio/1.1/default/Tuner.h b/broadcastradio/1.1/default/Tuner.h
index f375a84..07d3189 100644
--- a/broadcastradio/1.1/default/Tuner.h
+++ b/broadcastradio/1.1/default/Tuner.h
@@ -45,7 +45,7 @@
virtual Return<void> getProgramInformation(getProgramInformation_cb _hidl_cb) override;
virtual Return<void> getProgramInformation_1_1(getProgramInformation_1_1_cb _hidl_cb) override;
virtual Return<ProgramListResult> startBackgroundScan() override;
- virtual Return<void> getProgramList(const hidl_string& filter,
+ virtual Return<void> getProgramList(const hidl_vec<VendorKeyValue>& filter,
getProgramList_cb _hidl_cb) override;
virtual Return<Result> setAnalogForced(bool isForced) override;
virtual Return<void> isAnalogForced(isAnalogForced_cb _hidl_cb) override;
diff --git a/broadcastradio/1.1/default/VirtualProgram.cpp b/broadcastradio/1.1/default/VirtualProgram.cpp
index 1c2285d..7977391 100644
--- a/broadcastradio/1.1/default/VirtualProgram.cpp
+++ b/broadcastradio/1.1/default/VirtualProgram.cpp
@@ -61,6 +61,11 @@
createDemoBitmap(MetadataKey::ART, halRev),
});
+ info11.vendorInfo = hidl_vec<VendorKeyValue>({
+ {"com.google.dummy", "dummy"},
+ {"com.google.dummy.VirtualProgram", std::to_string(reinterpret_cast<uintptr_t>(this))},
+ });
+
return info11;
}
diff --git a/broadcastradio/1.1/types.hal b/broadcastradio/1.1/types.hal
index 4034d8b..3e616c8 100644
--- a/broadcastradio/1.1/types.hal
+++ b/broadcastradio/1.1/types.hal
@@ -56,6 +56,24 @@
TRAFFIC_ANNOUNCEMENT = 1 << 3,
};
+/**
+ * A key-value pair for vendor-specific information to be passed as-is through
+ * Android framework to the front-end application.
+ */
+struct VendorKeyValue {
+ /**
+ * Key must be prefixed with unique vendor Java-style namespace,
+ * eg. 'com.somecompany.parameter1'.
+ */
+ string key;
+
+ /**
+ * Value must be passed through the framework without any changes.
+ * Format of this string can vary across vendors.
+ */
+ string value;
+};
+
struct Properties {
@1.0::Properties base;
@@ -89,16 +107,12 @@
vec<uint32_t> supportedIdentifierTypes;
/**
- * Opaque vendor-specific string, to be passed to front-end without changes.
- * Format of this string can vary across vendors.
+ * Vendor-specific information.
*
- * It may be used for extra features, that's not supported by a platform,
- * for example: "preset-slots=6;ultra-hd-capable=false".
- *
- * Front-end application MUST verify vendor/product name from the
- * @1.0::Properties struct before doing any interpretation of this value.
+ * It may be used for extra features, not supported by the platform,
+ * for example: com.me.preset-slots=6; com.me.ultra-hd-capable=false.
*/
- string vendorInfo;
+ vec<VendorKeyValue> vendorInfo;
};
/**
@@ -276,14 +290,10 @@
bitfield<ProgramInfoFlags> flags;
/**
- * Opaque vendor-specific string, to be passed to front-end without changes.
- * Format of this string can vary across vendors.
+ * Vendor-specific information.
*
- * It may be used for extra features, that's not supported by a platform,
- * for example: "paid-service=true;bitrate=320kbps".
- *
- * Front-end application MUST verify vendor/product name from the
- * @1.0::Properties struct before doing any interpretation of this value.
+ * It may be used for extra features, not supported by the platform,
+ * for example: paid-service=true; bitrate=320kbps.
*/
- string vendorInfo;
+ vec<VendorKeyValue> vendorInfo;
};
diff --git a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
index 9143c41..6feb710 100644
--- a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
+++ b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
@@ -274,7 +274,7 @@
// first try...
EXPECT_TIMEOUT_CALL(*mCallback, backgroundScanComplete, ProgramListResult::OK)
.Times(AnyNumber());
- auto hidlResult = mTuner->getProgramList("", getListCb);
+ auto hidlResult = mTuner->getProgramList({}, getListCb);
EXPECT_TRUE(hidlResult.isOk());
if (!hidlResult.isOk()) return false;
@@ -287,7 +287,7 @@
EXPECT_TIMEOUT_CALL_WAIT(*mCallback, backgroundScanComplete, kFullScanTimeout);
// second (last) try...
- hidlResult = mTuner->getProgramList("", getListCb);
+ hidlResult = mTuner->getProgramList({}, getListCb);
EXPECT_TRUE(hidlResult.isOk());
if (!hidlResult.isOk()) return false;
EXPECT_EQ(ProgramListResult::OK, getListResult);
diff --git a/wifi/Android.bp b/wifi/Android.bp
index b4ab98f..1153b0c 100644
--- a/wifi/Android.bp
+++ b/wifi/Android.bp
@@ -7,4 +7,5 @@
"offload/1.0",
"offload/1.0/vts/functional",
"supplicant/1.0",
+ "supplicant/1.0/vts/functional",
]
diff --git a/wifi/supplicant/1.0/vts/functional/Android.bp b/wifi/supplicant/1.0/vts/functional/Android.bp
new file mode 100644
index 0000000..24b9f6f
--- /dev/null
+++ b/wifi/supplicant/1.0/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: "VtsHalWifiSupplicantV1_0TargetTest",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: [
+ "VtsHalWifiSupplicantV1_0TargetTest.cpp",
+ "supplicant_hidl_test.cpp",
+ "supplicant_hidl_test_utils.cpp",
+ "supplicant_p2p_iface_hidl_test.cpp",
+ "supplicant_sta_iface_hidl_test.cpp",
+ "supplicant_sta_network_hidl_test.cpp",
+ ],
+ static_libs: [
+ "VtsHalWifiV1_0TargetTestUtil",
+ "android.hardware.wifi.supplicant@1.0",
+ "android.hardware.wifi@1.0",
+ "libcrypto",
+ "libgmock",
+ "libwifi-system",
+ "libwifi-system-iface",
+ ],
+}
diff --git a/wifi/supplicant/1.0/vts/functional/Android.mk b/wifi/supplicant/1.0/vts/functional/Android.mk
deleted file mode 100644
index c6e3950..0000000
--- a/wifi/supplicant/1.0/vts/functional/Android.mk
+++ /dev/null
@@ -1,44 +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)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := VtsHalWifiSupplicantV1_0TargetTest
-LOCAL_CPPFLAGS := -Wall -Werror -Wextra
-LOCAL_SRC_FILES := \
- VtsHalWifiSupplicantV1_0TargetTest.cpp \
- supplicant_hidl_test.cpp \
- supplicant_hidl_test_utils.cpp \
- supplicant_p2p_iface_hidl_test.cpp \
- supplicant_sta_iface_hidl_test.cpp \
- supplicant_sta_network_hidl_test.cpp
-LOCAL_SHARED_LIBRARIES := \
- android.hardware.wifi.supplicant@1.0 \
- android.hardware.wifi@1.0 \
- libbase \
- libcutils \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- libwifi-system \
- libwifi-system-iface
-LOCAL_STATIC_LIBRARIES := \
- libgmock \
- VtsHalHidlTargetTestBase \
- VtsHalWifiV1_0TargetTestUtil
-include $(BUILD_NATIVE_TEST)
-