Commit graph

50 commits

Author SHA1 Message Date
Daniel Norman
d20ebb4f6f Fixes sensors AIDL default impl APEX's binary name.
commit bde01c60fa
moved this APEX from the HIDL to AIDL impl, but accidentally
left out the rename of the binary in the file_contexts

Also deletes unused .rc file here; the APEX already reuses the
.rc file from outside the APEX dir.

Bug: 222579208
Test: Build cf_x86_64_phone using sensors APEX: http://ab/P33964358
      Boot the device, use accel sensor to rotate the screen.
Change-Id: Ib107770312bb80b67364c855efd2df3a9bc52b9a
(cherry picked from commit 80e55dabf3)
2023-06-22 18:36:36 +00:00
deyaoren@google.com
1e1887e055 Cuttlefish sensors apex uses aidl implementation
Bug: 210883464
Test: atest hal_implementation VtsAidlHalSensorsTargetTest
Tests run on abtd:
https://android-build.googleplex.com/builds/abtd/run/L63300000953949688
https://android-build.googleplex.com/builds/abtd/run/L18600000953935211
One test is failing on tip of tree

(cherry picked from commit bde01c60fa)
Change-Id: Iec27e916c94e5a327fc6c4d87451e055b14d9660
2023-06-22 18:21:43 +00:00
Anthony Stange
4ad422e74d Merge "Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType" into android13-tests-dev am: 2550e7a719
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486876

Change-Id: Ie628fc877fd63dbe3b8c96d335416b2c741f1c5e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 15:02:43 +00:00
Dezhi Huang
b5425cb909 Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType
Function assertTypeMatchStringType does not match the sensor type
HINGE_ANGLE that only exists on folding screen phones. When testing the
VtsAidlHalSensorsTargetTest on a folding screen mobile phone,
it will fail.
So we need add CHECK_TYPE_STRING_FOR_SENSOR_TYPE(HINGE_ANGLE) to
the function assertTypeMatchStringType.

Bug: 270831199
Change-Id: Ib82a1168ff90d851eee6ce025464b11bcda7d5ca
2023-03-16 01:55:31 +00:00
zhuhaiqing
610770294d [Sensor][Bugfix]: Remove redundant assignment operations
Remove redundant assignment operations for limitedAxesImuUncal.yBias

Change-Id: I3318f5e71539db7ebd24552a611df6e9567c68d9
Signed-off-by: zhuhaiqing <zhuhaiqing@xiaomi.com>
2023-03-14 02:26:29 +00:00
Krzysztof Kosiński
c30ca3077d Remove uses of deprecated GTest macro.
Bug: 271622675
Test: local build, presubmit
Change-Id: I525be287361e65d0c4194bc93d7f17ce3369da5d
2023-03-04 00:46:48 +00:00
Steven Moreland
ddc9daad96 sensors: cleanup OWNERS
I wrote a script to do this.

Bug: N/A
Test: N/A
Change-Id: I2f53125790aea64d7a3c02569cecccc9cec9522b
2022-12-29 23:44:34 +00:00
Devin Moore
160d7a4504 Revert^2 "sensors: adding a common convert lib"
3633b6d4fe

Change-Id: Ie13caa288e8cba344225bb2e4fd01fc23b1d4a9d
2022-12-01 23:17:17 +00:00
Krzysztof Kosiński
3633b6d4fe Revert "sensors: adding a common convert lib"
Revert submission 2313818-sensors_shared_convert

Reason for revert: Breaks wembley_2GB-userdebug
Reverted Changes:
Icf64c8809:sensorservice: use new convert functions
Ibc6ed5566:libandroid_sensor_headers: make host_supported and...
Ib80130fc0:sensors: adding a common convert lib

Change-Id: I3f4cb4dc228b5bf6f81f451c11c11d6ebf19639a
2022-11-30 05:16:15 +00:00
Devin Moore
d8598ec6db sensors: adding a common convert lib
This common convert library is used by both the HIDL and the AIDL
convert library to provide conversions between ASensorEvent and
sensors_event_t.

Test: atest VtsHalSensorManagerTargetTest
Test: atest VtsHalSensorManagerV1_0TargetTest
Bug: 259711109

Change-Id: Ib80130fc04339245527ed20479cd9212f016713b
2022-11-28 17:55:14 +00:00
Devin Moore
6a58599217 Merge "Make sensors convert library host_supported" 2022-11-22 17:37:49 +00:00
Karthik Bharadwaj
34557d4596 Merge "Default accel Z direction value to +9.8" 2022-11-21 22:03:14 +00:00
Karthik Bharadwaj
4cea52915a Default accel Z direction value to +9.8
Default the accelerometer defaut Z value to +9.8 to indicate a
more 'natural' resting position of flat with screen up for the
device.

Bug: 242736284
Test: Presubmits, vts VtsHalSensorsV2_0TargetTest.
Change-Id: I92357119173dbc99a0a6665de5d733286ac30c3e
2022-11-21 18:28:44 +00:00
Devin Moore
fb3f5ada35 Make sensors convert library host_supported
Used for host_supported fuzzers.

Test: libsensorserviceaidl_fuzzer
Bug: 233850220

Change-Id: I80680907f65edbb6ddb8d433460829967e0b75b0
2022-11-18 19:33:01 +00:00
Devin Moore
00721dc031 Add a convert library for sensor AIDL
This is moving the conversion functions from
frameworks/native/services/sensorservice/AidlSensorHalWrapper.cpp.
This conversion code needs to be shared between sensorservice, a new
libsensorserviceaidl, and the new VTS tests for AIDL sensorservice.
It will likely also be used by vendors interacting with the new AIDL
sensorservice.

Test: VtsHalSensorManagerV1_0TargetTest
Bug: 205764765
Change-Id: Iabb0bcf0770672671e51fd304f79e14ca94a2d15
2022-11-18 00:58:35 +00:00
Devin Moore
9ef0c60a25 Add host_supported to sensors AIDL interface
Useful for host fuzzing. Needed to make the new sensorservice AIDL
host_supported.

Test: m
Bug: 205764765
Change-Id: I3fb0786fe27274d91c05a0598bf9d96c20062edf
2022-11-18 00:58:28 +00:00
Xin Li
7406132b49 Merge android13-tests-dev
Merged-In: Ie372f74f3a52decce592181c7d65624f8ec03ed1
Change-Id: Ia81e24391de0d26737a5d65fbc5c8bb86bf03d5b
2022-08-17 16:37:46 -07:00
Arthur Ishiguro
ad325a0150 Adds AndroidTest.xml for AIDL sensors VTS test
Bug: 241174366
Test: run VtsAidlHalSensorsTargetTest, and verify Android app
can receive sensor data after test runs

Change-Id: Ie372f74f3a52decce592181c7d65624f8ec03ed1
(cherry picked from commit 8492dab99d)
2022-08-04 19:59:05 +00:00
Jooyung Han
c0b24f4f13 Remove AIDL-libs from VNDK
Some are still in VNDK because they are used in other VNDK libs.

Ignore-AOSP-First: some libs are still in internal master only.

Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
2022-06-14 14:08:59 +09:00
Arthur Ishiguro
6b48d121d9 Adds missing AIDL HAL SensorStatus conversion logic
Bug: 235629868
Test: Compile
Change-Id: Ice2df3935f2bcab9e9612ebd3fdacc57ea6f8dbc
2022-06-13 16:06:34 +00:00
Brian Duddie
c325337352 Support AIDL IAllocator for direct channel tests
Bug: 234673324
Test: atest VtsHalSensorsV2_1TargetTest -> DirectChannelGralloc pass on
      device using AIDL IAllocator
Change-Id: I169d3bc863f7e588f42e408f151064066b9960cc
2022-06-10 02:09:11 +00:00
Jiyong Park
70f5837e1f Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: I61eb51c0334eb99489c6f1570110d7e18c350c99
2022-04-16 07:03:24 +09:00
Arthur Ishiguro
e9cb2933a4 Fix AIDL sensors VTS test
- According to the AIDL backends, return values are not propagated
  when the status is !ok(). Update the VTS test, HAL implementation,
  and ISensors definition to remove the requirement that the
  handle is populated to -1 on failure for registerDirectChannel.
- Also update VTS tests for some error code checks to reflect the
  actual expecataions according to the ISensors documentation.

Bug: 228645167
Test: VTS passes
Change-Id: I5d4d4d0af3b033b34a58d8462aa40214d89fa442
2022-04-12 22:30:02 +00:00
Arthur Ishiguro
eae8adf209 Fix return values in AIDL multi-HAL shim
- Converts HIDL return values directly to ScopedAStatus
- Adds asserts for unexpected values of conversion code

Bug: 228645167
Test: Run VTS

Change-Id: Ifcc57f565b4e1d9c140db9363e21ab6ee7dd6660
2022-04-11 21:29:29 +00:00
Arthur Ishiguro
5fc076011c Implements AIDL multi-HAL debug dump
Bug: 228645167
Test: adb shell dumpsys android.hardware.sensors.ISensors/default
Change-Id: If5985d669d5fae6ca99d0156f61841f868c8c60f
2022-04-11 15:57:03 +00:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Jooyung Han
6bb92e00b8 Cast to int for union tag
Union tag will be changed from `enum` to `enum class`. We need explicit
casting with enum class.

Bug: 225119187
Bug: 218912230
Test: m
Merged-In: I2401e66dc9d8bc511a601fcdce365e5f823576d4
Change-Id: I2401e66dc9d8bc511a601fcdce365e5f823576d4
(cherry picked from commit 1c4e9829ec)
2022-03-17 09:56:28 +00:00
Brian Duddie
03e15d8e8f Clarify optionality of head tracker velocity
Bug: 218911221
Test: n/a, comment change only
Change-Id: I2645114727c452df8d53ad015736f9f2d8d5b6e2
2022-02-15 19:56:12 +00:00
Chih-Hung Hsieh
91b4835ada Fix cert-dcl16-c warnings
Bug: 120614316
Test: make tidy-hardware-interfaces-sensors-aidl_subset
Change-Id: Ia9f5a9153b1591623aff0df4e185f445762bcbaf
2022-02-09 15:47:54 -08:00
TreeHugger Robot
c3ada23eb3 Merge "Update documentation of SensorInfo.aidl" 2022-02-03 21:21:46 +00:00
Arthur Ishiguro
b30f4556fc Update documentation of SensorInfo.aidl
Bug: 217750786
Test: None, comments only
Change-Id: I8c5e6c15b398ea5935bdcac08605f3f7e7399d3a
2022-02-03 19:33:13 +00:00
Tyler Trephan
12cf91d7f6 Updated VTS to support heading sensors.
Test: atest VtsAidlHalSensorsTargetTest
Bug: 214096235
Change-Id: Id8c589c010ebd66cc33f66e08b6bdee1f7612ba3
2022-01-28 21:09:35 +00:00
TreeHugger Robot
df6575e4d3 Merge "Updated VTS to support limited axes IMU sensors." 2022-01-28 15:36:37 +00:00
Tyler Trephan
38e65b13d6 Updated VTS to support limited axes IMU sensors.
Test: atest VtsAidlHalSensorsTargetTest
Bug: 188012758
Change-Id: If0a2051eb0d39d8afdf7011da1371a48e4b12c44
2022-01-25 23:04:55 +00:00
Arthur Ishiguro
ce255a3176 Add head tracking to multi-HAL conversion code
Also adds OWNERS file.

Bug: 215702376
Test: Compile
Change-Id: Ib0bbb312aae66ab6130a8677ec8e0e82d0db48bb
2022-01-25 22:50:25 +00:00
Eva Chen
a81deb0fbe Add TYPE_HEADING sensor type definitions.
Bug: 189983308
Test: Compile + Presubmits
Change-Id: I6ea82097312d84dc0a3f957f936fec152b566bad
2022-01-20 14:21:42 -08:00
Eva Chen
4a05294ae4 Add limited axes imu sensor type definitions.
Includes changes for the following sensors:
- ACCELEROMETER_LIMITED_AXES
- GYROSCOPE_LIMITED_AXES
- ACCELEROMETER_LIMITED_AXES_UNCALIBRATED
- GYROSCOPE_LIMITED_AXES_UNCALIBRATED

These new sensor types will help support varying sensor configurations
for automotive devices.

Bug: 187342209
Test: Compile only. Will be validated with other CLs.
Change-Id: I3f01eb74c26ab58c051a58c4b5f1dfd90d7e853c
2022-01-18 22:01:01 -08:00
Greg Kaiser
5cb52553df Fix copy() using iterators from different containers
We fix up a std::copy that was using the wrong container for
the end().

Test: TreeHugger
Bug: 206867060
Change-Id: I5b7700029db6a513b6fdf03c3449be973d639df5
2022-01-18 15:00:30 -08:00
TreeHugger Robot
d248c6d6fd Merge "Moved implementation of ConvertUtils to cpp file." 2022-01-14 20:09:45 +00:00
TreeHugger Robot
0677c4205b Merge "VtsAidlHalSensorsTargetTest: Fix assignment" 2022-01-14 18:57:26 +00:00
Tyler Trephan
bd838b8b5e Moved implementation of ConvertUtils to cpp file.
Test: make android.hardware.sensors@aidl-multihal
Bug: 206867060
Change-Id: I73e8d061bdfe39f956acda1cf9b138da2dcc1f22
2022-01-14 18:47:19 +00:00
Greg Kaiser
aae30614d6 VtsAidlHalSensorsTargetTest: Fix assignment
To make this assignment have an impact outside the function, we
need to assign to the dereference of the pointer.

Test: TreeHugger
Bug: 195593357
Change-Id: I3541735574d6ebe2f2620c2bc5fbf5dd7d97cd91
2022-01-14 07:54:49 -08:00
Bob Badour
154fbf1519 [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  sensors/aidl/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all
Change-Id: I6597543c2398a639c850f72bfe7013e9df2a2358
2022-01-13 16:50:17 -08:00
Tyler Trephan
5b6c2834d4 Merge "Updated multihal to use new sensors AIDL interface." 2022-01-13 20:36:58 +00:00
Grace Cheng
012f4e7d65 Merge "Implements AIDL VTS direct channel tests" 2022-01-12 22:24:22 +00:00
Grace Cheng
629b3a4cf2 Implements AIDL VTS direct channel tests
Bug: 195593357
Test: Compile, run tests

Change-Id: I3e78050fc28c9a0d20cd18788a357bc9b82f2ced
2022-01-12 07:56:27 +00:00
Brian Duddie
d72ba14c90 Add HEAD_TRACKER sensor type definition
This new sensor type supports tracking the orientation and rate of
rotation of a user's head, which can be useful for features such as
spatial audio.

Bug: 210156629
Test: compile only; to be validated in later CLs
Change-Id: I861be09d14e208fb992b23554b6c0733e4163f0c
2022-01-12 02:11:49 +00:00
Tyler Trephan
17857cc469 Updated multihal to use new sensors AIDL interface.
Test: make android.hardware.sensors@aidl-multihal
Fix: 206867060
Change-Id: I9b78a0f25117d11fdf4beb1e0913393c1c14620d
2022-01-11 21:09:17 +00:00
Grace Cheng
bc2a1b7321 Adds sensors aidl default (cuttlefish) implementation
Bug: 195593357
Test: Verify VTS AIDL sensors tests pass

Change-Id: I12f09adfb0d81c8c15e2c18c836f03cbd9d82daf
2021-12-30 22:02:22 +00:00
Arthur Ishiguro
c7ac0b2a17 Adds sensors HAL AIDL interface
Bug: 195593357
Test: Compile
Change-Id: I6c63a6ba2dc3fbe5b25f401728d0724df2620bef
2021-12-23 23:46:59 +00:00