Merge "Implements RANDOM_MULTINOMIAL CTS/VTS tests."
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index ae84ec2..88d4234 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -29,6 +29,7 @@
#include <queue>
using ::android::sp;
+using ::android::hardware::hidl_death_recipient;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::hardware::Void;
@@ -157,6 +158,11 @@
ALOGI("%s: getService() for bluetooth is %s", __func__,
bluetooth->isRemote() ? "remote" : "local");
+ bluetooth_hci_death_recipient = new BluetoothHciDeathRecipient();
+ ASSERT_NE(bluetooth_hci_death_recipient, nullptr);
+ ASSERT_TRUE(
+ bluetooth->linkToDeath(bluetooth_hci_death_recipient, 0).isOk());
+
bluetooth_cb = new BluetoothHciCallbacks(*this);
ASSERT_NE(bluetooth_cb, nullptr);
@@ -214,6 +220,15 @@
void wait_for_command_complete_event(hidl_vec<uint8_t> cmd);
int wait_for_completed_packets_event(uint16_t handle);
+ class BluetoothHciDeathRecipient : public hidl_death_recipient {
+ public:
+ virtual void serviceDied(
+ uint64_t /*cookie*/,
+ const android::wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ FAIL();
+ }
+ };
+
// A simple test implementation of BluetoothHciCallbacks.
class BluetoothHciCallbacks
: public ::testing::VtsHalHidlTargetCallbackBase<BluetoothHidlTest>,
@@ -260,6 +275,7 @@
sp<IBluetoothHci> bluetooth;
sp<BluetoothHciCallbacks> bluetooth_cb;
+ sp<BluetoothHciDeathRecipient> bluetooth_hci_death_recipient;
std::queue<hidl_vec<uint8_t>> event_queue;
std::queue<hidl_vec<uint8_t>> acl_queue;
std::queue<hidl_vec<uint8_t>> sco_queue;
diff --git a/current.txt b/current.txt
index b34bf8c..1653ac4 100644
--- a/current.txt
+++ b/current.txt
@@ -394,5 +394,6 @@
1d4a5776614c08b5d794a5ec5ab04697260cbd4b3441d5935cd53ee71d19da02 android.hardware.radio@1.0::IRadioResponse
271187e261b30c01a33011aea257c07a2d2f05b72943ebee89e973e997849973 android.hardware.radio@1.0::types
1d19720d4fd38b1095f0f555a4bd92b3b12c9b1d0f560b0e9a474cd6dcc20db6 android.hardware.radio@1.2::IRadio
+e78cf871f9fd1c072874e481e06e18e2681763cf2aa38c1fd777d53bab4eb69b android.hardware.sensors@1.0::types
1722ad002317b1fae1400de709e90f442d94ef22864e05f7a12af48c32e8edc8 android.hardware.usb@1.1::types
29c8da7a13c40d488f569c812441d5754ee45bdcdb8ce6564f524b708d10a057 android.hardware.vibrator@1.1::types
diff --git a/sensors/1.0/types.hal b/sensors/1.0/types.hal
index 3926e2f..e91820c 100644
--- a/sensors/1.0/types.hal
+++ b/sensors/1.0/types.hal
@@ -1157,8 +1157,7 @@
Vec3 vec3;
/**
- * SensorType::ROTATION_VECTOR, SensorType::GAME_ROTATION_VECTOR,
- * SensorType::GEOMAGNETIC_ROTATION_VECTOR
+ * SensorType::GAME_ROTATION_VECTOR
*/
Vec4 vec4;
@@ -1200,7 +1199,14 @@
/** SensorType::ADDITIONAL_INFO */
AdditionalInfo additional;
- /** undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE */
+ /**
+ * The following sensors should use the data field:
+ * - Undefined/custom sensor type >= SensorType::DEVICE_PRIVATE_BASE
+ * - SensorType::ROTATION_VECTOR, SensorType::GEOMAGNETIC_ROTATION_VECTOR:
+ * - These are Vec4 types with an additional float accuracy field,
+ * where data[4] is the estimated heading accuracy in radians
+ * (-1 if unavailable, and invalid if not in the range (0, 2 * pi]).
+ */
float[16] data;
};