summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/hardware/bluetooth.h11
-rw-r--r--include/hardware/camera_common.h28
-rw-r--r--include/hardware/hwcomposer_defs.h15
-rw-r--r--modules/sensors/dynamic_sensor/DynamicSensorManager.cpp5
-rw-r--r--modules/sensors/dynamic_sensor/DynamicSensorManager.h3
5 files changed, 55 insertions, 7 deletions
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 95a0b6e3..93ef9aea 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -27,7 +27,16 @@
__BEGIN_DECLS
+/**
+* The Bluetooth Hardware Module ID
+*/
+
#define BLUETOOTH_INTERFACE_STRING "bluetoothInterface"
+#define BT_HARDWARE_MODULE_ID "bluetooth"
+#define BT_STACK_MODULE_ID "bluetooth"
+#define BT_STACK_TEST_MODULE_ID "bluetooth_test"
+#define bluetooth_module_t "bluetooth_test"
+
/** Bluetooth profile interface IDs */
@@ -217,7 +226,7 @@ typedef enum {
* Access mode - GET and SET
* Data type - uint32_t
*/
- BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT,
+ BT_PROPERTY_ADAPTER_DISCOVERABLE_TIMEOUT,
/* Properties unique to remote device */
/**
diff --git a/include/hardware/camera_common.h b/include/hardware/camera_common.h
index 16651a94..75632de3 100644
--- a/include/hardware/camera_common.h
+++ b/include/hardware/camera_common.h
@@ -1209,8 +1209,34 @@ typedef struct camera_module {
*/
void (*notify_device_state_change)(uint64_t deviceState);
+ /**
+ * get_camera_device_version:
+ *
+ * Return the device version for a given camera device. This value may not change for a camera
+ * device. The version returned here must be the same as the one from get_camera_info.
+ *
+ * Return values:
+ *
+ * 0: On a successful operation
+ *
+ * -ENODEV: The information cannot be provided due to an internal
+ * error.
+ *
+ * -EINVAL: The input arguments are invalid, i.e. the id is invalid,
+ * and/or the module is invalid.
+ *
+ * Version information (based on camera_module_t.common.module_api_version):
+ *
+ * CAMERA_MODULE_API_VERSION_2_5 or higher:
+ *
+ * When a camera is disconnected, its camera id becomes invalid. Calling this
+ * this method with this invalid camera id will get -EINVAL and NULL camera
+ * static metadata (camera_info.static_camera_characteristics).
+ */
+ int (*get_camera_device_version)(int camera_id, uint32_t *version);
+
/* reserved for future use */
- void* reserved[2];
+ void* reserved[1];
} camera_module_t;
__END_DECLS
diff --git a/include/hardware/hwcomposer_defs.h b/include/hardware/hwcomposer_defs.h
index 3823765f..c4d8a44c 100644
--- a/include/hardware/hwcomposer_defs.h
+++ b/include/hardware/hwcomposer_defs.h
@@ -299,10 +299,19 @@ enum {
enum {
HWC_DISPLAY_PRIMARY = 0,
HWC_DISPLAY_EXTERNAL = 1, // HDMI, DP, etc.
- HWC_DISPLAY_VIRTUAL = 2,
- HWC_NUM_PHYSICAL_DISPLAY_TYPES = 2,
- HWC_NUM_DISPLAY_TYPES = 3,
+ HWC_DISPLAY_EXTERNAL_2 = 2,
+ HWC_DISPLAY_EXTERNAL_3 = 3,
+ HWC_DISPLAY_EXTERNAL_4 = 4,
+
+ HWC_DISPLAY_BUILTIN_2 = 5,
+ HWC_DISPLAY_BUILTIN_3 = 6,
+ HWC_DISPLAY_BUILTIN_4 = 7,
+
+ HWC_DISPLAY_VIRTUAL = 8,
+
+ HWC_NUM_PHYSICAL_DISPLAY_TYPES = 8,
+ HWC_NUM_DISPLAY_TYPES = 9,
};
enum {
diff --git a/modules/sensors/dynamic_sensor/DynamicSensorManager.cpp b/modules/sensors/dynamic_sensor/DynamicSensorManager.cpp
index efac5e95..85f8001e 100644
--- a/modules/sensors/dynamic_sensor/DynamicSensorManager.cpp
+++ b/modules/sensors/dynamic_sensor/DynamicSensorManager.cpp
@@ -22,6 +22,7 @@
#include <utils/Log.h>
#include <utils/SystemClock.h>
+#include <cutils/properties.h>
#include <cassert>
@@ -63,6 +64,10 @@ DynamicSensorManager::DynamicSensorManager(
SENSOR_FLAG_SPECIAL_REPORTING_MODE | SENSOR_FLAG_WAKE_UP,
{ NULL, NULL }
};
+
+ kSensorOpTimeout = std::chrono::milliseconds(
+ (uint32_t)property_get_int32(
+ "vendor.dynamic_sensor.setup.timeout.ms", 900));
}
DynamicSensorManager::~DynamicSensorManager() {
diff --git a/modules/sensors/dynamic_sensor/DynamicSensorManager.h b/modules/sensors/dynamic_sensor/DynamicSensorManager.h
index 2cae1208..7b487d52 100644
--- a/modules/sensors/dynamic_sensor/DynamicSensorManager.h
+++ b/modules/sensors/dynamic_sensor/DynamicSensorManager.h
@@ -128,8 +128,7 @@ private:
// Sensor operation queue. Calls to the sensor HAL should complete within ~1
// second, but to permit delayed replies due to sniff mode, etc., we use a
// slightly longer timeout here.
- static constexpr std::chrono::milliseconds
- kSensorOpTimeout = std::chrono::milliseconds(1600);
+ std::chrono::milliseconds kSensorOpTimeout = std::chrono::milliseconds(1600);
std::mutex mSensorOpQueueLock;
std::queue<std::pair<uint64_t, std::shared_future<int>>> mSensorOpQueue;
uint64_t mNextSensorOpIndex = 0;