Merge "Add cellInfoList_1_2 in 1.2/IRadioIndication.hal."
diff --git a/bluetooth/1.0/default/h4_protocol.cc b/bluetooth/1.0/default/h4_protocol.cc
index 163cc33..df40507 100644
--- a/bluetooth/1.0/default/h4_protocol.cc
+++ b/bluetooth/1.0/default/h4_protocol.cc
@@ -71,8 +71,10 @@
ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, 1));
if (bytes_read != 1) {
if (bytes_read == 0) {
- LOG_ALWAYS_FATAL("%s: Unexpected EOF reading the packet type!",
- __func__);
+ // This is only expected if the UART got closed when shutting down.
+ ALOGE("%s: Unexpected EOF reading the packet type!", __func__);
+ sleep(5); // Expect to be shut down within 5 seconds.
+ return;
} else if (bytes_read < 0) {
LOG_ALWAYS_FATAL("%s: Read packet type error: %s", __func__,
strerror(errno));
diff --git a/bluetooth/1.0/default/hci_packetizer.cc b/bluetooth/1.0/default/hci_packetizer.cc
index fde08ac..71f4328 100644
--- a/bluetooth/1.0/default/hci_packetizer.cc
+++ b/bluetooth/1.0/default/hci_packetizer.cc
@@ -56,9 +56,13 @@
ssize_t bytes_read = TEMP_FAILURE_RETRY(
read(fd, preamble_ + bytes_read_,
preamble_size_for_type[packet_type] - bytes_read_));
- if (bytes_read <= 0) {
- LOG_ALWAYS_FATAL_IF((bytes_read == 0),
- "%s: Unexpected EOF reading the header!", __func__);
+ if (bytes_read == 0) {
+ // This is only expected if the UART got closed when shutting down.
+ ALOGE("%s: Unexpected EOF reading the header!", __func__);
+ sleep(5); // Expect to be shut down within 5 seconds.
+ return;
+ }
+ if (bytes_read < 0) {
LOG_ALWAYS_FATAL("%s: Read header error: %s", __func__,
strerror(errno));
}
@@ -80,10 +84,13 @@
fd,
packet_.data() + preamble_size_for_type[packet_type] + bytes_read_,
bytes_remaining_));
- if (bytes_read <= 0) {
- LOG_ALWAYS_FATAL_IF((bytes_read == 0),
- "%s: Unexpected EOF reading the payload!",
- __func__);
+ if (bytes_read == 0) {
+ // This is only expected if the UART got closed when shutting down.
+ ALOGE("%s: Unexpected EOF reading the payload!", __func__);
+ sleep(5); // Expect to be shut down within 5 seconds.
+ return;
+ }
+ if (bytes_read < 0) {
LOG_ALWAYS_FATAL("%s: Read payload error: %s", __func__,
strerror(errno));
}
diff --git a/bluetooth/1.0/default/vendor_interface.cc b/bluetooth/1.0/default/vendor_interface.cc
index 6ce2f11..a8f5bb4 100644
--- a/bluetooth/1.0/default/vendor_interface.cc
+++ b/bluetooth/1.0/default/vendor_interface.cc
@@ -49,6 +49,7 @@
bool recent_activity_flag;
VendorInterface* g_vendor_interface = nullptr;
+std::mutex wakeup_mutex_;
HC_BT_HDR* WrapPacketAndCopy(uint16_t event, const hidl_vec<uint8_t>& data) {
size_t packet_size = data.size() + sizeof(HC_BT_HDR);
@@ -308,6 +309,7 @@
}
size_t VendorInterface::Send(uint8_t type, const uint8_t* data, size_t length) {
+ std::unique_lock<std::mutex> lock(wakeup_mutex_);
recent_activity_flag = true;
if (lpm_wake_deasserted == true) {
@@ -350,6 +352,7 @@
void VendorInterface::OnTimeout() {
ALOGV("%s", __func__);
+ std::unique_lock<std::mutex> lock(wakeup_mutex_);
if (recent_activity_flag == false) {
lpm_wake_deasserted = true;
bt_vendor_lpm_wake_state_t wakeState = BT_VND_LPM_WAKE_DEASSERT;
diff --git a/compatibility_matrix.26.xml b/compatibility_matrix.1.xml
similarity index 100%
rename from compatibility_matrix.26.xml
rename to compatibility_matrix.1.xml
diff --git a/compatibility_matrix.27.xml b/compatibility_matrix.2.xml
similarity index 100%
rename from compatibility_matrix.27.xml
rename to compatibility_matrix.2.xml
diff --git a/configstore/1.0/default/Android.mk b/configstore/1.0/default/Android.mk
index 8b24031..539741e 100644
--- a/configstore/1.0/default/Android.mk
+++ b/configstore/1.0/default/Android.mk
@@ -3,7 +3,10 @@
################################################################################
include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.configstore@1.0-service
+# seccomp is not required for coverage build.
+ifneq ($(NATIVE_COVERAGE),true)
LOCAL_REQUIRED_MODULES_arm64 := configstore@1.0.policy
+endif
LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_RELATIVE_PATH := hw
diff --git a/light/2.0/default/android.hardware.light@2.0-service.rc b/light/2.0/default/android.hardware.light@2.0-service.rc
index c3284c6..fcc6468 100644
--- a/light/2.0/default/android.hardware.light@2.0-service.rc
+++ b/light/2.0/default/android.hardware.light@2.0-service.rc
@@ -1,4 +1,5 @@
service light-hal-2-0 /vendor/bin/hw/android.hardware.light@2.0-service
+ interface android.hardware.light@2.0::ILight default
class hal
user system
group system
\ No newline at end of file
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 27d19cb..e3e7004 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -43,8 +43,6 @@
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
}
-void RadioHidlTest::TearDown() {}
-
void RadioHidlTest::notify() {
std::unique_lock<std::mutex> lock(mtx);
count++;
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
index a5e8701..6b95ab0 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils_v1_0.h
@@ -521,8 +521,6 @@
public:
virtual void SetUp() override;
- virtual void TearDown() override;
-
/* Used as a mechanism to inform the test about data/event callback */
void notify();
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
index c4bf1cc..488da2d 100644
--- a/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.1/vts/functional/radio_hidl_hal_test.cpp
@@ -44,8 +44,6 @@
EXPECT_EQ(CardState::ABSENT, cardStatus.cardState);
}
-void RadioHidlTest_v1_1::TearDown() {}
-
void RadioHidlTest_v1_1::notify() {
std::unique_lock<std::mutex> lock(mtx);
count++;
diff --git a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
index 523b9ba..a081ab9 100644
--- a/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
+++ b/radio/1.1/vts/functional/radio_hidl_hal_utils_v1_1.h
@@ -544,20 +544,12 @@
public:
virtual void SetUp() override;
- virtual void TearDown() override;
-
/* Used as a mechanism to inform the test about data/event callback */
void notify();
/* Test code calls this function to wait for response */
std::cv_status wait(int sec = TIMEOUT_PERIOD);
- /* Used for checking General Errors */
- bool CheckGeneralError();
-
- /* Used for checking OEM Errors */
- bool CheckOEMError();
-
sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1;
sp<RadioResponse_v1_1> radioRsp_v1_1;
sp<RadioIndication_v1_1> radioInd_v1_1;
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index 8c6a9a4..9a9e754 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -68,6 +68,10 @@
bitfield<BitField> bf;
};
+ struct StructWithInterface {
+ int32_t number;
+ IBase dummy;
+ };
oneway doThis(float param);
doThatAndReturnSomething(int64_t param) generates (int32_t result);
@@ -93,4 +97,6 @@
size(uint32_t size) generates (uint32_t size);
getNestedStructs() generates(vec<NestedStruct> data);
+
+ haveSomeStructWithInterface(StructWithInterface swi) generates(StructWithInterface swi);
};
diff --git a/tests/baz/1.0/default/Baz.cpp b/tests/baz/1.0/default/Baz.cpp
index 5ccd87b..e118122 100644
--- a/tests/baz/1.0/default/Baz.cpp
+++ b/tests/baz/1.0/default/Baz.cpp
@@ -394,6 +394,12 @@
_hidl_cb(result);
return Void();
}
+
+Return<void> Baz::haveSomeStructWithInterface(const StructWithInterface& swi,
+ haveSomeStructWithInterface_cb _hidl_cb) {
+ _hidl_cb(swi);
+ return Void();
+}
// Methods from ::android::hidl::base::V1_0::IBase follow.
IBaz* HIDL_FETCH_IBaz(const char* /* name */) {
diff --git a/tests/baz/1.0/default/Baz.h b/tests/baz/1.0/default/Baz.h
index 4443587..c264f47 100644
--- a/tests/baz/1.0/default/Baz.h
+++ b/tests/baz/1.0/default/Baz.h
@@ -91,6 +91,8 @@
Return<uint32_t> size(uint32_t size) override;
Return<void> getNestedStructs(getNestedStructs_cb _hidl_cb) override;
+ Return<void> haveSomeStructWithInterface(const StructWithInterface& swi,
+ haveSomeStructWithInterface_cb _hidl_cb) override;
// Methods from ::android::hidl::base::V1_0::IBase follow.
private:
sp<IBazCallback> mStoredCallback;
diff --git a/tests/memory/1.0/IMemoryTest.hal b/tests/memory/1.0/IMemoryTest.hal
index b20859c..3c4d4f3 100644
--- a/tests/memory/1.0/IMemoryTest.hal
+++ b/tests/memory/1.0/IMemoryTest.hal
@@ -23,6 +23,6 @@
haveSomeMemory(memory mem) generates(memory mem);
fillMemory(memory memory_in, uint8_t filler);
haveSomeMemoryBlock(MemoryBlock blk) generates(MemoryBlock blk);
- set(memory mem) generates();
+ set(memory mem);
get()generates(IMemoryToken token);
};