Commit graph

732 commits

Author SHA1 Message Date
Treehugger Robot
756017d6da Merge "sensors: Do not limit aidl-multihal visibility" into main am: a9860a2192 am: 33790283ef am: 73c2e944f6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2868836

Change-Id: Ie8b1a7ec008ba60ad57256b9a4264855a9008fc0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 22:39:32 +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
d059615f93 Merge "Remove features from sensors APEX" into main am: 83a9d7f74c am: ffe6ad39e2 am: bcf97ed5a4
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2875194

Change-Id: Ibebbe717b6053e9dee65ac4b7c5cf28546f96558
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 05:34:16 +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
Jooyung Han
c145f84487 Merge "Clean up sensors hal apex" into main am: 2ffe33ea43 am: 2fc564e962 am: 3c5f173521
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2867915

Change-Id: I6b4a8c771311c9a69c06e6a977b566d1cffc776f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-12 03:45:29 +00: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
Treehugger Robot
4b4639935d Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev am: 01d47260a1 am: 253353540d am: 23390a0e80 am: 59f95b0ea5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2795667

Change-Id: I829118b01963ac30aabe12a0f1fced65a22d33ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 22:22:53 +00:00
Treehugger Robot
253353540d Merge "lnitialize payload of additionallnfo for VTS InjectSensorEventData test" into android14-tests-dev am: 01d47260a1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2795667

Change-Id: I2e6f7921aeea6e3e0d5a2d5c9ceacdd1a60b5403
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-03 20:32:27 +00:00
fan.lv
765937cfac lnitialize payload of additionallnfo for VTS InjectSensorEventData test
If the payload of additionalInfo event isn't initialized, system will
crash when execute to the function of convertToHidlEvent in
HalProxyAidl::injectSensorData. Because there is an operation to get
the payload in the function of convertToHidlEvent.

Bug:306109770
Test:VtsAidlHalSensorsTargetTest.Sensors/SensorsAidlTest #InjectSensorEventData
Change-Id:I649de10451914ddfdb9d735ca1359521bf810bca
2023-10-26 10:45:13 +08:00
Devin Moore
9d67c77d35 Migrate sensors VTS to use libui
There is a new graphics.mapper HAL and instead of adding yet another
combination of mapper/allocator, use libui that handles all of that for
us.

Test: VtsAidlHalSensorsTargetTest
Bug: 304843606

Change-Id: Icf4a218de6afe0ae77a4520a6f78a4f7da9bedd4
2023-10-13 16:32:45 +00:00
Jooyung Han
d201678835 Merge "Cleanup: use shared apex_key" into main am: 6693205f17 am: 70338b35b9 am: 8ac3c1c801 am: 3e3b89fd74 am: be711c3a9b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2780311

Change-Id: I0f3067abbf86d0528d9fc2c712d918e8591ee35e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-11 07:09:07 +00: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
4613dd5efd Merge "Initialize mStopThread in Sensor constructor" into main am: 014b456a11 am: 9f52ca0fd2 am: b3114df058 am: 2dcf4ebe43 am: faa0f059af
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2717101

Change-Id: Ie793198f18545015e9c2531390bc66f79bf4b9b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 22:49:04 +00:00
Treehugger Robot
b3114df058 Merge "Initialize mStopThread in Sensor constructor" into main am: 014b456a11 am: 9f52ca0fd2
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2717101

Change-Id: I4fa80cb034c1fb573d4d679804b87299057cb976
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 20:49:38 +00:00
Aditya Chitnis
5d346fb79c Initialize mStopThread in Sensor constructor
Bug: 294653181
Bug: 294500012
Test: Presubmit
Change-Id: I9c9a9119eb75e364d3969ae77248370937f1f3c5
2023-08-24 18:41:36 +00:00
Arthur Ishiguro
6311a3cebd Add CPU_WRITE_RARELY flag am: 802c53da89 am: cefade7fa9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2700498

Change-Id: I8ed2bd16e6180d368c3fa87bec1dd0a604933924
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-09 21:35:22 +00:00
Arthur Ishiguro
802c53da89 Add CPU_WRITE_RARELY flag
Without this flag, the test may fail with SEGV_ACCERR.

Bug: 293475360
Test: Run test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8c5976f06a9c9b0cb92735c3eeba7f7485f4e7ca)
Merged-In: I2d7cfba94145239afde196567400c966a2769419
Change-Id: I2d7cfba94145239afde196567400c966a2769419
2023-08-09 18:17:23 +00:00
Arthur Ishiguro
8c5976f06a Add CPU_WRITE_RARELY flag
Without this flag, the test may fail with SEGV_ACCERR.

Bug: 293475360
Test: Run test
Change-Id: I2d7cfba94145239afde196567400c966a2769419
2023-08-09 17:19:37 +00:00
Treehugger Robot
496e17d535 Merge "Enable Gyroscope sensor injection by AIDL flag" into main am: bfa8a13317 am: 9943d4fee0 am: fe4f1eea8c am: 7f08099725 am: b50c633e9e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2671395

Change-Id: I1a70404e6a6a0fdcfb0f52ef61217888ff166344
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 21:33:13 +00:00
Treehugger Robot
9d10404e2d Merge "Enable Magnetometer sensor injection by AIDL flag" into main am: 9e9c6feffa am: 38ed98a535 am: 21d85c5254 am: efa4c6401f am: 4ec1e4ce79
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2657662

Change-Id: I8a7d4a3d86475f4ddb6aa973543ecdeb4d195b65
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 21:28:34 +00:00
Treehugger Robot
fe4f1eea8c Merge "Enable Gyroscope sensor injection by AIDL flag" into main am: bfa8a13317 am: 9943d4fee0
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2671395

Change-Id: I468cd82a993b1ebc1db2fe0509e37230d58f385b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 19:15:11 +00:00
Treehugger Robot
21d85c5254 Merge "Enable Magnetometer sensor injection by AIDL flag" into main am: 9e9c6feffa am: 38ed98a535
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2657662

Change-Id: Ic155dcea6a3a137a0718e6b5751de150ef18ecf9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-26 19:13:26 +00:00
Treehugger Robot
bfa8a13317 Merge "Enable Gyroscope sensor injection by AIDL flag" into main 2023-07-26 17:22:28 +00:00
Matthew Sedam
04cadfcdd6 Fix a segmentation fault in NoStaleEvents tests
This CL fixes an issue where a sensor may not generate any events
and the processing code calls .front() on an empty std::vector.

Bug: 291779133
Test: Presubmits
Change-Id: Ibb118f239ce9ea42fc25d1d05ba6bd46a60231f0
2023-07-24 17:00:57 +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
André Draszik
65e4f77e74 VtsHalSensorsV2_1TargetTest: change test file push location
Upload files to /data/local/tests/unrestricted instead to improve data
collection in the event of a crash.

Bug: 284307085
Bug: 258819618
Bug: 199904562
Test: atest :kernel-presubmit
Change-Id: I14b8bdeec300e94c7796e8dfe644b644b4d96ba3
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:13:20 +01:00
André Draszik
ddac81ced0 VtsAidlHalSensorsTargetTest: change test file push location
Upload files to /data/local/tests/unrestricted instead to improve data
collection in the event of a crash.

Bug: 284307085
Bug: 258819618
Bug: 199904562
Test: atest :kernel-presubmit
Change-Id: Id4f73972910525dc4de6c19755d19a38092ae03b
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:13:15 +01:00
André Draszik
405a4c2247 TEST_MAPPING: enable vts hal sensors tests in kernel-presubmit
Enable the following tests:
  * VtsAidlHalSensorsTargetTest
  * VtsHalSensorsV2_1TargetTest

Bug: 284307085
Bug: 258819618
Test: atest :kernel-presubmit
Change-Id: Ie07fee7d40e7d6c388a4a92ae60981d87280e656
Signed-off-by: André Draszik <draszik@google.com>
2023-06-30 09:12:50 +01:00
Xin Li
377be1fa1b Merge "Merge Android 13 QPR3" 2023-06-26 22:29:51 +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
Alex Buynytskyy
ec1198d941 UpsideDownCake is now 34
Ignore-AOSP-First: UpsideDownCake Finalization
Bug: 275409981
Test: build
Change-Id: I832ab7a8b5445ba85e27bbcf5be64906bfa0e5be
2023-04-07 23:41:20 +00:00
matthuang
df791de79a [DO NOT MERGE] Add group 'uhid' to sensors multi-HAL.
Allow sensor hal to send SW_LID event through HID transport
drivers when hall_effect event is detected.

Bug: 262056923
Bug: 274537630
Test: Build pass.
Change-Id: Iddbb4b83f20955d7c316d0eee391effcf30f5b4f
2023-03-25 15:51:58 +08:00
sangweilin
097d2ce929 catch mutex when notify sampling rate changed, otherwise signal may be lost am: e1e361ed43 am: ab8e9f1b2b am: c6a975ee1f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2496635

Change-Id: Idff71b1768fe95ff55d091b577c458f5740c2d31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-20 20:54:27 +00:00
sangweilin
e1e361ed43 catch mutex when notify sampling rate changed, otherwise signal may be lost
Change-Id: Ib52f26e731808ecbe5fd2a53fcd8a47ab3882902
Signed-off-by: sangweilin <sangweilin@xiaomi.com>
2023-03-19 06:48:32 +00:00
Anthony Stange
d73b9e0df0 Merge "Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType" into android13-tests-dev am: 2550e7a719 am: 0415aad813 am: 70d16e0229
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486876

Change-Id: Ie9d8018ff839addb8a2bd2df543141a413e60eda
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-17 16:13:10 +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
Anthony Stange
2550e7a719 Merge "Sensor:Add sensor type HINGE_ANGLE to function assertTypeMatchStringType" into android13-tests-dev 2023-03-17 14:33:01 +00:00
AOYAGI Takako
872cda3300 Fix for VTS test CleanupConnectionsOnInitialize am: 45a15ed8b9 am: c0fd000566 am: 16b926e728 am: e760f283cc am: 006acfa520 am: ee526c2d41
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486695

Change-Id: I809ffc2b3f7d0f10a13ff1c97eff8084eeba09c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 02:03:51 +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
AOYAGI Takako
64412bb9cd Fix for VTS test CleanupConnectionsOnInitialize am: 45a15ed8b9 am: c0fd000566 am: 16b926e728 am: e760f283cc
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486695

Change-Id: I48186f5bee46d4bb9486f42c0ce410450c51cc08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 00:47:32 +00:00
AOYAGI Takako
e760f283cc Fix for VTS test CleanupConnectionsOnInitialize am: 45a15ed8b9 am: c0fd000566 am: 16b926e728
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486695

Change-Id: I9d89b36e50daf41894930baeb7bc59f5d45d27a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-16 00:07:28 +00:00
AOYAGI Takako
c0fd000566 Fix for VTS test CleanupConnectionsOnInitialize am: 45a15ed8b9
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2486695

Change-Id: I105d3e8472f27f2d49a6ab675d173af739fca039
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-15 22:54:22 +00:00
AOYAGI Takako
45a15ed8b9 Fix for VTS test CleanupConnectionsOnInitialize
Sensor event never occur on DUT that has no sensor.
So, skip this test case on DUT that has no sensor.

Test: run vts -m VtsHalSensorsV2_0TargetTest

Bug: 273383821
Change-Id: I657b74ca3c67c105e40e58a7e4c700370a9db3e3
Signed-off-by: AOYAGI Takako <aoyagi.takako@jp.panasonic.com>
2023-03-15 21:50:31 +00:00
Devin Moore
0fd13e4818 Merge "[Sensor][Bugfix]: Remove redundant assignment operations" am: 7baf2ac4e3 am: 59b483ec3c am: 6d3361fe03
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2479595

Change-Id: Ie9a9a0c08e11f19645656f4df37329f825273f91
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-14 18:41:50 +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
Matthew Sedam
2d85820979 Fix event collection in SensorsVtsEnvironmentBase.h
Only collect the events that match the description.

Bug: 270611181
Test: atest VtsAidlHalSensorsTargetTest
Test: atest VtsHalSensorsV2_0TargetTest
Change-Id: Iac4c4dc39b3a4d32dbfdb7770989204c1fe28c47
2023-03-08 15:37:47 +00:00