mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-01-27 14:23:34 +00:00
Revert^2 "SensorHAL: add moisture detection"
919258a586
Change-Id: I351625927ce9259967218565abaf56035e97674a
This commit is contained in:
committed by
Android (Google) Code Review
parent
919258a586
commit
7022279564
@@ -527,7 +527,7 @@
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.sensors</name>
|
||||
<version>2</version>
|
||||
<version>2-3</version>
|
||||
<interface>
|
||||
<name>ISensors</name>
|
||||
<instance>default</instance>
|
||||
|
||||
@@ -43,6 +43,6 @@ aidl_interface {
|
||||
},
|
||||
|
||||
],
|
||||
frozen: true,
|
||||
frozen: false,
|
||||
|
||||
}
|
||||
|
||||
@@ -54,23 +54,23 @@ parcelable AdditionalInfo {
|
||||
enum AdditionalInfoType {
|
||||
AINFO_BEGIN = 0,
|
||||
AINFO_END = 1,
|
||||
AINFO_UNTRACKED_DELAY = 65536,
|
||||
AINFO_INTERNAL_TEMPERATURE = 65537,
|
||||
AINFO_VEC3_CALIBRATION = 65538,
|
||||
AINFO_SENSOR_PLACEMENT = 65539,
|
||||
AINFO_SAMPLING = 65540,
|
||||
AINFO_CHANNEL_NOISE = 131072,
|
||||
AINFO_CHANNEL_SAMPLER = 131073,
|
||||
AINFO_CHANNEL_FILTER = 131074,
|
||||
AINFO_CHANNEL_LINEAR_TRANSFORM = 131075,
|
||||
AINFO_CHANNEL_NONLINEAR_MAP = 131076,
|
||||
AINFO_CHANNEL_RESAMPLER = 131077,
|
||||
AINFO_LOCAL_GEOMAGNETIC_FIELD = 196608,
|
||||
AINFO_LOCAL_GRAVITY = 196609,
|
||||
AINFO_DOCK_STATE = 196610,
|
||||
AINFO_HIGH_PERFORMANCE_MODE = 196611,
|
||||
AINFO_MAGNETIC_FIELD_CALIBRATION = 196612,
|
||||
AINFO_CUSTOM_START = 268435456,
|
||||
AINFO_DEBUGGING_START = 1073741824,
|
||||
AINFO_UNTRACKED_DELAY = 0x10000,
|
||||
AINFO_INTERNAL_TEMPERATURE,
|
||||
AINFO_VEC3_CALIBRATION,
|
||||
AINFO_SENSOR_PLACEMENT,
|
||||
AINFO_SAMPLING,
|
||||
AINFO_CHANNEL_NOISE = 0x20000,
|
||||
AINFO_CHANNEL_SAMPLER,
|
||||
AINFO_CHANNEL_FILTER,
|
||||
AINFO_CHANNEL_LINEAR_TRANSFORM,
|
||||
AINFO_CHANNEL_NONLINEAR_MAP,
|
||||
AINFO_CHANNEL_RESAMPLER,
|
||||
AINFO_LOCAL_GEOMAGNETIC_FIELD = 0x30000,
|
||||
AINFO_LOCAL_GRAVITY,
|
||||
AINFO_DOCK_STATE,
|
||||
AINFO_HIGH_PERFORMANCE_MODE,
|
||||
AINFO_MAGNETIC_FIELD_CALIBRATION,
|
||||
AINFO_CUSTOM_START = 0x10000000,
|
||||
AINFO_DEBUGGING_START = 0x40000000,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,28 +44,28 @@ interface ISensors {
|
||||
int registerDirectChannel(in android.hardware.sensors.ISensors.SharedMemInfo mem);
|
||||
void setOperationMode(in android.hardware.sensors.ISensors.OperationMode mode);
|
||||
void unregisterDirectChannel(in int channelHandle);
|
||||
const int ERROR_NO_MEMORY = -12;
|
||||
const int ERROR_BAD_VALUE = -22;
|
||||
const int ERROR_NO_MEMORY = (-12) /* -12 */;
|
||||
const int ERROR_BAD_VALUE = (-22) /* -22 */;
|
||||
const int WAKE_LOCK_TIMEOUT_SECONDS = 1;
|
||||
const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = 1;
|
||||
const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = 2;
|
||||
const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = 1;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 4;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 8;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 12;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 16;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 24;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 88;
|
||||
const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = (1 << 0) /* 1 */;
|
||||
const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = (1 << 1) /* 2 */;
|
||||
const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = (1 << 0) /* 1 */;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0x0;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 0x4;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 0x8;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 0xC;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 0x10;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 0x18;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 0x58;
|
||||
const int DIRECT_REPORT_SENSOR_EVENT_TOTAL_LENGTH = 104;
|
||||
const int RUNTIME_SENSORS_HANDLE_BASE = 1593835520;
|
||||
const int RUNTIME_SENSORS_HANDLE_END = 1610612735;
|
||||
const int RUNTIME_SENSORS_HANDLE_BASE = 0x5F000000;
|
||||
const int RUNTIME_SENSORS_HANDLE_END = 0x5FFFFFFF;
|
||||
@Backing(type="int") @VintfStability
|
||||
enum RateLevel {
|
||||
STOP = 0,
|
||||
NORMAL = 1,
|
||||
FAST = 2,
|
||||
VERY_FAST = 3,
|
||||
STOP,
|
||||
NORMAL,
|
||||
FAST,
|
||||
VERY_FAST,
|
||||
}
|
||||
@Backing(type="int") @VintfStability
|
||||
enum OperationMode {
|
||||
@@ -85,7 +85,7 @@ interface ISensors {
|
||||
@Backing(type="int") @VintfStability
|
||||
enum SharedMemType {
|
||||
ASHMEM = 1,
|
||||
GRALLOC = 2,
|
||||
GRALLOC,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,14 +54,14 @@ parcelable SensorInfo {
|
||||
const int SENSOR_FLAG_BITS_ON_CHANGE_MODE = 2;
|
||||
const int SENSOR_FLAG_BITS_ONE_SHOT_MODE = 4;
|
||||
const int SENSOR_FLAG_BITS_SPECIAL_REPORTING_MODE = 6;
|
||||
const int SENSOR_FLAG_BITS_DATA_INJECTION = 16;
|
||||
const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 32;
|
||||
const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 64;
|
||||
const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 1024;
|
||||
const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 2048;
|
||||
const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 14;
|
||||
const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 896;
|
||||
const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 3072;
|
||||
const int SENSOR_FLAG_BITS_DATA_INJECTION = 0x10;
|
||||
const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 0x20;
|
||||
const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 0x40;
|
||||
const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 0x400;
|
||||
const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 0x800;
|
||||
const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 0xE;
|
||||
const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 0x380;
|
||||
const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 0xC00;
|
||||
const int SENSOR_FLAG_SHIFT_REPORTING_MODE = 1;
|
||||
const int SENSOR_FLAG_SHIFT_DATA_INJECTION = 4;
|
||||
const int SENSOR_FLAG_SHIFT_DYNAMIC_SENSOR = 5;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
package android.hardware.sensors;
|
||||
@Backing(type="byte") @VintfStability
|
||||
enum SensorStatus {
|
||||
NO_CONTACT = -1,
|
||||
NO_CONTACT = (-1) /* -1 */,
|
||||
UNRELIABLE = 0,
|
||||
ACCURACY_LOW = 1,
|
||||
ACCURACY_MEDIUM = 2,
|
||||
|
||||
@@ -76,5 +76,6 @@ enum SensorType {
|
||||
ACCELEROMETER_LIMITED_AXES_UNCALIBRATED = 40,
|
||||
GYROSCOPE_LIMITED_AXES_UNCALIBRATED = 41,
|
||||
HEADING = 42,
|
||||
DEVICE_PRIVATE_BASE = 65536,
|
||||
MOISTURE_INTRUSION = 43,
|
||||
DEVICE_PRIVATE_BASE = 0x10000,
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ parcelable Event {
|
||||
* SensorType::GLANCE_GESTURE, SensorType::PICK_UP_GESTURE,
|
||||
* SensorType::WRIST_TILT_GESTURE, SensorType::STATIONARY_DETECT,
|
||||
* SensorType::MOTION_DETECT, SensorType::HEART_BEAT,
|
||||
* SensorType::LOW_LATENCY_OFFBODY_DETECT
|
||||
* SensorType::LOW_LATENCY_OFFBODY_DETECT, SensorType::MOISTURE_INTRUSION
|
||||
*/
|
||||
float scalar;
|
||||
|
||||
|
||||
@@ -717,6 +717,20 @@ enum SensorType {
|
||||
*/
|
||||
HEADING = 42,
|
||||
|
||||
/**
|
||||
* MOISTURE_INTRUSION
|
||||
* trigger mode: on-change
|
||||
*
|
||||
* Detects moisture intrusion in the chassis of device. This detection is
|
||||
* one-way and persistent. Once a device is detected to have water damage,
|
||||
* it will always report 1 (across factory reset /reboot) even if moisture
|
||||
* is no longer present, until the device has been repaired.
|
||||
* The only allowed values to return are:
|
||||
* 0.0: no moisture intrusion detected in relevant history
|
||||
* 1.0: moisture intrusion detected now or previously
|
||||
*/
|
||||
MOISTURE_INTRUSION = 43,
|
||||
|
||||
/**
|
||||
* Base of the range reserved for device manufacturers' private sensor
|
||||
* types. These sensor types aren't documented in the SDK.
|
||||
|
||||
@@ -36,7 +36,7 @@ cc_library_static {
|
||||
"libhardware",
|
||||
"libbase",
|
||||
"libutils",
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
],
|
||||
whole_static_libs: [
|
||||
"sensors_common_convert",
|
||||
|
||||
@@ -32,7 +32,7 @@ cc_library_static {
|
||||
"libfmq",
|
||||
"libpower",
|
||||
"libbinder_ndk",
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
],
|
||||
export_include_dirs: ["include"],
|
||||
srcs: [
|
||||
@@ -58,7 +58,7 @@ cc_binary {
|
||||
static_libs: [
|
||||
"android.hardware.common-V2-ndk",
|
||||
"android.hardware.common.fmq-V1-ndk",
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
"android.system.suspend-V1-ndk",
|
||||
"libbase",
|
||||
"libcutils",
|
||||
|
||||
@@ -39,7 +39,7 @@ cc_library_static {
|
||||
"android.hardware.sensors@1.0",
|
||||
"android.hardware.sensors@2.0",
|
||||
"android.hardware.sensors@2.1",
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
],
|
||||
export_include_dirs: ["include"],
|
||||
srcs: [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.sensors</name>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<fqname>ISensors/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
||||
@@ -41,7 +41,7 @@ cc_binary {
|
||||
"android.hardware.sensors@2.0-ScopedWakelock",
|
||||
"android.hardware.sensors@2.0",
|
||||
"android.hardware.sensors@2.1",
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"libfmq",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.sensors</name>
|
||||
<version>2</version>
|
||||
<version>3</version>
|
||||
<fqname>ISensors/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
||||
@@ -42,7 +42,7 @@ cc_test {
|
||||
"android.hardware.common.fmq-V1-ndk",
|
||||
],
|
||||
static_libs: [
|
||||
"android.hardware.sensors-V2-ndk",
|
||||
"android.hardware.sensors-V3-ndk",
|
||||
"VtsHalSensorsTargetTestUtils",
|
||||
"libaidlcommonsupport",
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user