Commit graph

11 commits

Author SHA1 Message Date
Ben Fennema
b2969d4eaa Add missing LOW_LATENCY_OFFBODY_DETECT handling
Bug: 36580454
Test: unlock watch with LLOB sensor and verify no SensorService crash
Change-Id: Ib1d086efd80e829bb844521fa39325f095b1c2c9
Signed-off-by: Ben Fennema <fennema@google.com>
2017-03-24 19:23:51 -07:00
Steven Moreland
5f81564de2 Revert "Revert "Revert "Protect against null strings in hal wrapper implementation."""
This reverts commit 8dbdf39b9a.

Bug: 35421240

Change-Id: I4dc6934d79b1822d500cffaf91f9812387413707
2017-02-28 18:33:48 +00:00
Steven Moreland
8dbdf39b9a Revert "Revert "Protect against null strings in hal wrapper implementation.""
This reverts commit 4cc22a0bc8.

Reason for revert: Accidental +2, still waiting on: aosp 345923

Change-Id: I57e062b267ad54632c6d7fcd464c7a0dd773de33
2017-02-28 17:53:43 +00:00
Steven Moreland
4cc22a0bc8 Revert "Protect against null strings in hal wrapper implementation."
This reverts commit 6909bfd8ee.

Updated sense null strings are now allowed in hidl as of Iada25da5407c3eccdd28704d993ffdee8b15c5fe.

Bug: 35421240

Change-Id: Ied1745ba7169b2e4bc0a20000503e47172538f08
2017-02-28 16:57:17 +00:00
Ashutosh Joshi
6909bfd8ee Protect against null strings in hal wrapper implementation.
Some HALs may provide null pointers in lieu of empty strings.
Avoid simple copies of these strings.

Bug: 35384551
Test: Verify affected device (Pixel-C) boots and auto-rotate works.
Change-Id: I37ab6e781d6dfdcc1667bcc0467690f7c2c9a557
2017-02-15 17:29:19 -08:00
Ashutosh Joshi
da270a09f4 Fix shim layer bugs for Sensors HIDL wrapper.
i) Increase the number of default threads to 2.
ii) Handle the flush complete event correctly.

Bug: 35189074
Bug: 35067266

Test: Test that sensors work in both binderized and passthrough modes.
      Ensure that camera photosphere works.

Change-Id: Ic8dadf03395b4e96092ae962cf790c93d65a1c8d
2017-02-14 11:36:40 -08:00
Peng Xu
89df2e7064 [sensors] Default implementation and vts of direct report
Added support for newly added HAL function for sensor event direct
report feature, replace dummy implementation with funtional ones for
the following:

  * registerDirectChannel
  * unregisterDirectChannel
  * configDirectReport

Added a vts test case for direct report.

Added new offset definition to types.hal. This will not affect
existing client/calling code.

Bug: 30985702
Bug: 32022776

Test: vts pass

Change-Id: Ie5e3cddd7c37664e8c59d69cf70aaa1310fd3f58
2017-01-18 14:28:21 -08:00
Peng Xu
1f12c7a338 [sensors] Minor tuning of hal definition
* Swap GEOMAGNETIC_FIELD with MAGNETIC_FIELD for more accurate
    definition.
  * Remove redundunt prefixes in various enum definitions.
  * Clarify that string type will be removed for well defined sensor
    types. This avoid dependency on strings defined in sensors.h.
  * Added SensorFlagShift enum.
  * Remove unused flag parameter in batch.
  * Remove legacy setDelay function.
  * Change the type of sensor flag to bitfield<SensorFlagBits>, and
    use uint32_t since only low 32 bits are used.

Test: all sensor works(in marlin), tested with sensorlogger.

Change-Id: I93a4d13c5d2e054857d1e400d15002aeb9a47368
2017-01-14 05:42:13 +00:00
Ashutosh Joshi
4faa8c70be Add the uncalibrated accelerometer sensor type.
Adding the uncalibrated accelerometer sensor.

Test: Update makefiles.
Change-Id: I7f6bc3ce69264b698836946bf9fb820ce9959b01
2017-01-11 17:53:11 -08:00
Steven Moreland
cefd01cd41 Sensors: cleanup includes in default implemenation
Test: compiles
Change-Id: Ib0aa43c186a4626117ed6b19a3881cb1822a5cdc
2016-11-07 19:20:19 -08:00
Andreas Huber
db49a41180 sensor HAL v3
Bug: 32021636
Test: no
Change-Id: I7a4c5c47f8621209daef5af4d0dcbb806a236e41
2016-10-13 09:21:46 -07:00