Commit Graph

33 Commits

Author SHA1 Message Date
Aditya Choudhary
c5c6c62995 [DON'T BLOCK] Test ownership migration rules
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.

For more details please refer to the link below,
<add g3 doc link>

Bug: 304529413
Test: N/A
Change-Id: I3322344f595f974f730dc824af0110388076d838
2024-01-31 11:06:17 +00:00
Treehugger Robot
a9860a2192 Merge "sensors: Do not limit aidl-multihal visibility" into main 2023-12-18 20:37:09 +00:00
Jooyung Han
7549431359 Remove features from sensors APEX
Just found that each device wants to install a different set of sensors
via LOCAL_SENSOR_FILE_OVERRIDES. Instead of providing a default list in
the apex, which would make things difficult to configure, let's not
hard-code the list in the apex.

Bug: 315089092
Test: cvd start && dumpsys sensorservice
Change-Id: Ie7ddbe6657d5afc06ca009ac37e3a54a5b26ad7d
2023-12-14 10:22:11 +09:00
ralph950412
5a856698db sensors: Do not limit aidl-multihal visibility
Allowing custom sensor implementations for vendors

Change-Id: I9e2b6e8f312ddc85074504a17087d121835a1ca3
2023-12-11 16:43:52 +08:00
Jooyung Han
621461b26e Clean up sensors hal apex
- move apex definition near to the binary
- make the binary use static linking (for smaller size of apex)
- remove unused keys

Bug: n/a
Test: cvd start
Test: dumpsys sensorservice # available sensors
Change-Id: I07734c5a5b1ade542c669155dd96176f912629ac
2023-12-11 14:07:14 +09:00
Jooyung Han
9aaa45eb6b Cleanup: use shared apex_key
plus, moved VINTF fragments into VAPEX

Bug: 296524155
Test: m
Change-Id: I8adac4c00a98d1fd7c71aa92851567a35d9dabf3
2023-10-10 13:53:36 +09:00
Xin Li
879960bdce Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7b6fffac2ada0e039f79bad8cc9b4d954e9c3460
Change-Id: I9466127d8d0fa38df36ca99f704853b2db871e67
2023-08-25 13:29:30 -07:00
Treehugger Robot
bfa8a13317 Merge "Enable Gyroscope sensor injection by AIDL flag" into main 2023-07-26 17:22:28 +00:00
Menna Awadallah
d840c2d5a1 Enable Gyroscope sensor injection by AIDL flag
Enable the flag to be used by cuttlefish.
Test: Manual.
Bug: 292206288

Change-Id: I34abe7c5bbec8a336c71775f9db0bd783cf34bc4
2023-07-21 10:57:43 +00:00
Menna Awadallah
e48d39e54d Enable Magnetometer sensor injection by AIDL flag
Enable the flag to be used by cuttlefish.
Test: Manual.
Bug: 291566976

Change-Id: I2dffc862742b86453e1ffda7954e2b73e1e74c52
2023-07-17 14:08:23 +00:00
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
Chia-Ching Yu
5dcb66fe52 Forward HalProxy::debug options.
Bug: 267262034
Test: adb shell dumpsys android.hardware.sensors.ISensors/default \
      disp_info_histogram_cfg

Change-Id: Ic9eb19fb4483a7f5dae2d5dccb8e72cd4d7d8710
2023-02-01 17:00:03 +08:00
Treehugger Robot
7443fb11d0 Merge "sensors: cleanup OWNERS" am: c9f07f5fdc am: 3fef1c0f59 am: 1856eb00c4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2372270

Change-Id: Icb51ff4a5b0191a5caea025c2839c4bd038e020c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-04 01:29:58 +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
Vladimir Komsiyski
08315ccbb6 Define the runtime sensor handle range in ISensors.aidl
Add a test to make sure that there are no sensors with handles within this range in the HAL.

Fix: 259227294
Test: VtsAidlHalSensorsTargetTest

Change-Id: Ib785984a0b43457eacd41031bbf361375f9d21f8
2022-12-07 09:44:40 +01:00
Karthik Bharadwaj
97258c512f Merge "Default accel Z direction value to +9.8" am: 34557d4596 am: 72239c642e am: 92cbbeabd7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2310345

Change-Id: Ie14cc774a21dd1c79e4852bf73ed10aa07d8baa8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-21 23:33:15 +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
Arthur Ishiguro
5d301a1c45 Adds missing AIDL HAL SensorStatus conversion logic am: 6b48d121d9 am: 8f44b69c39 am: e39fd50fde am: 2c4b7216e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/18871136

Change-Id: Ied765b893216c872a6789c0d812704f28efaa6b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 18:49:18 +00: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
Daniel Norman
80e55dabf3 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
2022-04-28 22:37:11 +00:00
deyaoren@google.com
bde01c60fa 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
Change-Id: Iec27e916c94e5a327fc6c4d87451e055b14d9660
2022-04-18 20:25:44 +00: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
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
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
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
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
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
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