Merge "Add int16_t to MixedTyped"
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 ef83acc..8b10648 100644
--- a/current.txt
+++ b/current.txt
@@ -398,5 +398,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/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
index 2cbf044..f249f1a 100644
--- a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
+++ b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerResources.h
@@ -186,6 +186,8 @@
: mBufferCache(importer, ComposerHandleCache::HandleType::BUFFER, bufferCacheSize),
mSidebandStreamCache(importer, ComposerHandleCache::HandleType::STREAM, 1) {}
+ virtual ~ComposerLayerResource() = default;
+
Error getBuffer(uint32_t slot, bool fromCache, const native_handle_t* inHandle,
const native_handle_t** outHandle, const native_handle** outReplacedHandle) {
return mBufferCache.getHandle(slot, fromCache, inHandle, outHandle, outReplacedHandle);
@@ -211,6 +213,8 @@
VIRTUAL,
};
+ virtual ~ComposerDisplayResource() = default;
+
ComposerDisplayResource(DisplayType type, ComposerHandleImporter& importer,
uint32_t outputBufferCacheSize)
: mType(type),
diff --git a/media/bufferpool/2.0/IAccessor.hal b/media/bufferpool/2.0/IAccessor.hal
index 66707fe..b889518 100644
--- a/media/bufferpool/2.0/IAccessor.hal
+++ b/media/bufferpool/2.0/IAccessor.hal
@@ -67,6 +67,7 @@
* to get shared buffers from the buffer pool.
* @return connectionId Id of IConnection. The Id identifies
* sender and receiver in FMQ messages during buffer transfer.
+ * @return msgId Id of the most recent message from buffer pool.
* @return toFmqDesc FMQ descriptor. The descriptor is used to
* post buffer status messages.
* @return fromFmqDesc FMQ descriptor. The descriptor is used to
@@ -75,6 +76,7 @@
connect(IObserver observer)
generates (ResultStatus status, IConnection connection,
int64_t connectionId,
+ uint32_t msgId,
fmq_sync<BufferStatusMessage> toFmqDesc,
fmq_unsync<BufferInvalidationMessage> fromFmqDesc);
};
diff --git a/media/bufferpool/2.0/IObserver.hal b/media/bufferpool/2.0/IObserver.hal
index a998836..62f247e 100644
--- a/media/bufferpool/2.0/IObserver.hal
+++ b/media/bufferpool/2.0/IObserver.hal
@@ -29,6 +29,7 @@
* message.
*
* @param connectionId the connection Id of the specific buffer pool client
+ * @param msgId Id of the most recent message
*/
- oneway onMessage(int64_t connectionId);
+ oneway onMessage(int64_t connectionId, uint32_t msgId);
};
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;
};
diff --git a/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp b/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp
index 5444287..2fb67a6 100644
--- a/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp
+++ b/sensors/2.0/vts/functional/SensorsHidlEnvironmentV2_0.cpp
@@ -123,8 +123,8 @@
size_t eventsToRead = std::min(availableEvents, mEventBuffer.size());
if (eventsToRead > 0) {
if (mEventQueue->read(mEventBuffer.data(), eventsToRead)) {
- for (const auto& e : mEventBuffer) {
- addEvent(e);
+ for (size_t i = 0; i < eventsToRead; i++) {
+ addEvent(mEventBuffer[i]);
}
}
}