Commit graph

552 commits

Author SHA1 Message Date
Yuchen He
6dddd6f43a Fix epoll leaks: clean up file descriptor and epoll instance properly
Bug: 262762412
Test: manual test

Change-Id: Ia587f8ba0ce44234a7c00cd820db73258dba19b0
(cherry picked from commit 9af806fe06)
2023-03-08 21:07:49 +00:00
Yu-Han Yang
ea19540d02 Skip TestGnssPowerIndication if capability is not supported am: 5da610c660
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397741

Change-Id: I435aef2d1ef9c28a998563ee6a0630a913c30eef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-25 18:51:56 +00:00
Yu-Han Yang
5da610c660 Skip TestGnssPowerIndication if capability is not supported
Bug: 263354944
Test: atest VtsHalGnssTargetTest
Change-Id: I372ca2f2fb4cb5d4cafbacc1bde1cc0f0f2077dd
2023-01-20 22:08:53 +00:00
Samip Garg
5a1bde04ae Merge "Snap tm-dev to android13-tests-dev" into tm-dev 2023-01-10 20:21:40 +00:00
Zhanghao Wen
08e0d7dfb0 Update Cuttlefish mock GNSS hardware model name
Test: atest GnssHardwareInfoTest
Bug: 258680584

Change-Id: I17c877848aee4b607cd0d798e7c91a1987fd6286
Merged-In: I17c877848aee4b607cd0d798e7c91a1987fd6286
2022-11-16 20:01:34 +00:00
Yu-Han Yang
25cd9d67d5 Call close() in TearDown()
Bug: 251580081
Test: atest VtsHalGnssTargetTest
Change-Id: Ieb02205f434899f7e9c5db32cfa7172788c39fa6
2022-10-14 23:14:58 +00:00
Yu-Han Yang
dcf3c519fc Minor fixes on VTS tests
- call startSvStatus()/startNmea() before calling start(). This will
  avoid missing the first SvStatus
- in TestGnssSvInfoFieldsTest, avoid calling list::back() if the list is
  empty.

Bug: 235062809
Test: atest VtsHalGnssTargetTest
Change-Id: I612d42e23085dbb0b32da328869bfd443ee66362
2022-06-09 23:01:28 +00:00
Yu-Han Yang
19a32b6270 Add VTS tests for measurementInterval, stopSvStatus, and stopNmea
Bug: 206670536
Test: atest VtsHalGnssTargetTest

Change-Id: Id597c772fbe63789cb394b2aa14faeb755196f64
2022-05-11 20:28:03 +00:00
Yu-Han Yang
d64dd7b6a8 Clarify measurement interval documentation
The GNSS chipset must report measurements at the requested rate if
location is not requested.

Bug: 206670536
Test: doc update only
Change-Id: I3b488f8b38def4b6ebf13733149d9b75b23db0cb
2022-04-28 13:00:33 -07:00
Jiyong Park
703e97920e Freeze AIDL APIs for TM
Bug: 225941299
Test: m
Change-Id: Ie41cc0797710f813f92c65c387f247c7806d8394
2022-03-31 12:01:39 +09:00
Yu-Han Yang
f5bd7c054b Add ExcessPathInfo (hardware/interfaces)
Bug: 201253590
Test: atest VtsHalGnssTargetTest
Change-Id: I68562d0332d161d31dbd494254ef404d110066dd
2022-03-14 14:07:11 -07:00
Yu-Han Yang
75a6af2318 Hide all GNSS AIDL interfaces/parcelables/enums
Bug: 201253590
Test: atest VtsHalGnssTargetTest
Change-Id: I8062085f5cb148189eebd6a7e7addf1b20de37db
2022-03-10 13:29:29 -08:00
TreeHugger Robot
4bd6c41dd4 Merge "Remove GnssHidlHal from default implementation" into tm-dev 2022-03-03 22:02:34 +00:00
Yu-Han Yang
a6e579a458 Remove GnssHidlHal from default implementation
Since all HALs are in AIDL, HIDL implementation is no longer needed.

Bug: 201253590
Test: on Cuttlefish
Change-Id: Iaefe72760999ace6a9d3dc682a5b457c03a75746
2022-03-03 11:39:12 -08:00
Enrico Granata
976698ddcc Merge changes from topic "presubmit-am-0dab591a2da0487e86ae54ea1577f29a" into sc-v2-dev-plus-aosp am: 747d25206b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16989257

Change-Id: I9383e760669fdaaaa754b4db5ee014e12f6531e1
2022-02-24 02:30:20 +00:00
Enrico Granata
081068a809 [automerge] Support vendor GNSS file properties for AAOS virtualization 2p: 9447139c92
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16989257

Bug: 213489959
Change-Id: I1879b5176020c8dbba93b423462932f3cdf1c388
2022-02-23 17:53:24 +00:00
Enrico Granata
9447139c92 Support vendor GNSS file properties for AAOS virtualization
The Android Automotive trout device uses GNSS HAL for fetching
location data from a live GNSS adapter, not a mock file. We also have
an established naming convention for console port names that is carried
over from the Bluetooth use case.

Add support for a vendor uart port for GNSS in addition to the existing
Cuttlefish debug property, in order to enable trout to establish a
connection to the host GNSS agent

Bug: 213489959
Test: build flash and boot
Change-Id: Id2d2134bb6ea60adef1072295c4f623463bfb010
2022-02-23 10:50:35 -07:00
Yuchen He
f46bb4ac80 Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Merged-In: Ide7bbb3e81a90414496084691227bd95a2e7af18
Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-02-18 18:05:09 -08:00
Yuchen He
76ff33b72d Add parser to support CSV location data
Bug: 213225295
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy
--gnss_file_path=/google/data/rw/users/yu/yuchenhe/input.txt (Running blue
dot in Google Maps)

Almost a cherry-pick but changed the data type from AIDL GnssLocation to
the HIDL type, since there are no AIDL GnssLocation Type in SC-V2.

Merged-In: I572315888c2f57ce701e695acb03aa6b28787f31
Change-Id: I572315888c2f57ce701e695acb03aa6b28787f31
2022-02-18 18:05:00 -08:00
Yuchen He
4eb8cf8f6a Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
Merged-In: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2022-02-18 18:03:44 -08:00
Yuchen He
6ceb09d60c Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
Merged-In: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2022-02-18 18:03:34 -08:00
George Burgess IV
e7d2bbadca fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
Merged-In: If9ca733dd21128706f2a9f62e8460b1286631aa5
2022-02-18 18:03:24 -08:00
Yuchen He
95276a229b Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Merged-In: I9b58043d5ed321aa71ff4f23031df251ae89c407
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2022-02-18 18:03:12 -08:00
Yu-Han Yang
c2fb318471 Change TOC and TOE to long
Change TOC and TOE definition to
1. long
2. time in seconds since GPS epoch, regardless of constellation
3. must not be encoded
4. rename to timeOfClockSeconds and timeOfEphemerisSeconds

Bug: 219575003
Test: on device
Change-Id: Icb75a3397d3bf41c91e2a19bbec8a95a97100a07
(cherry picked from commit f20e55cf46)
2022-02-18 19:49:01 +00:00
Yuchen He
55c22f897e Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Merged-In: Ide7bbb3e81a90414496084691227bd95a2e7af18
Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-02-16 14:46:33 -08:00
Yuchen He
be47920e9f Add parser to support CSV location data
Bug: 213225295
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy
--gnss_file_path=/google/data/rw/users/yu/yuchenhe/input.txt (Running blue
dot in Google Maps)

Almost a cherry-pick but changed the data type from AIDL GnssLocation to
the HIDL type, since there are no AIDL GnssLocation Type in SC-V2.

Merged-In: I572315888c2f57ce701e695acb03aa6b28787f31
Change-Id: I572315888c2f57ce701e695acb03aa6b28787f31
2022-02-16 14:46:10 -08:00
Yuchen He
d20063ad90 Merge fix to AOSP: Report default location when location is not available in /dev/gnss0
Change-Id: I3ce672aa1a7a39c256dd1396658859c205b61399
Merged-In: I3ce672aa1a7a39c256dd1396658859c205b61399
Test: atest VtsHalGnssTargetTest
Bug: 197579774
2022-02-15 16:19:12 -08:00
Yuchen He
65569272ad Read GNSS measurement from device file when available
Test: atest CtsLocationGnssTestCases GtsLocationTestCases on CF
Bug: 190757198
Change-Id: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
Merged-In: Ic03d56a5df6b99f7b20c5840e7091ead138316b1
2022-02-15 16:18:34 -08:00
Yuchen He
31493d1dc4 Add raw measurement parser
Test: manual test (data cross verified with GnssLogger app)
Bug: 190757198

Change-Id: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
Merged-In: I8d57826c6aa2a9d1a09b4847aadfda8c9160b36f
2022-02-15 16:18:01 -08:00
George Burgess IV
3f467bd10f fix potential use-after-frees of stack memory
`devname_value` is a local variable; if `property_get` succeeds, we'll
return a pointer to it. Returning a `std::string` instead sidesteps this
problem.

Bug: 190757198
Test: TreeHugger
Change-Id: If9ca733dd21128706f2a9f62e8460b1286631aa5
Merged-In: If9ca733dd21128706f2a9f62e8460b1286631aa5
2022-02-15 16:17:22 -08:00
Yuchen He
cb8474d7b6 Refactor and reuse some read device file logic
Add skeleton on HAL for Gnss raw measurement injection

Bug: 190757198
Test: manual test
Merged-In: I9b58043d5ed321aa71ff4f23031df251ae89c407
Change-Id: I9b58043d5ed321aa71ff4f23031df251ae89c407
2022-02-15 16:16:47 -08:00
Yu-Han Yang
4165ed1605 Add GNSS AIDL VTS tests
Copy existing VTS tests from HIDL HALs to AIDL, to make sure AIDL has at
least the same API coverage.

Bug: 216523795
Test: atest VtsHalGnssTargetTest
Change-Id: I0f09ba2b5541e19f28b8689ec93ce6c2ba6798ff
2022-02-09 17:43:11 -08:00
Joe Huang
74051bb5fb Merge "Add GnssAntennaInfo AIDL capability" 2022-02-09 01:53:44 +00:00
Yu-Han Yang
09fd012938 Update getInterfaceVersion checks to include -1
getInterfaceVersion() returns -1 if it is unknown.

V1 of the HAL doesn't implement getInterfaceVersion
due to ABI reasons for regular, unversioned, AIDL
interfaces.

Bug: 206670536
Test: on device
Change-Id: Id63b65b8a03488a6f179c7f64bd9d457e28eb30a
2022-02-02 16:29:59 -08:00
Joe Huang
c47bc672ab Add GnssAntennaInfo AIDL capability
Enable GnssAntennaInfo capability as JNI AIDL is ready.

Bug: 205185369
Test: atest VtsHalGnssTargetTest
Change-Id: I89d559ea4e95bc19815497c46d9ef96f32883293
2022-02-02 13:48:37 +08:00
Yu-Han Yang
ab2527a441 Merge "Add register/unregister methods for SvStatus and NMEA (hardware/interfaces)" 2022-02-02 01:05:24 +00:00
TreeHugger Robot
d1ad199afe Merge "Add ephSource, toc, toe, IODC, IODE to SatellitePvt (hardware/interfaces)" 2022-02-01 22:21:36 +00:00
Yu-Han Yang
69f0f8bae0 Add register/unregister methods for SvStatus and NMEA
(hardware/interfaces)

Bug: 213375506
Test: atest VtsHalGnssTargetTest
Change-Id: I7468336b5e1759f4ce90a42fbfd19e3bb17baaa9
2022-01-28 18:59:13 -08:00
TreeHugger Robot
5bba2e3aec Merge "Fix ANAPIC review comments (hardware/interfaces)" 2022-01-28 20:31:44 +00:00
Yu-Han Yang
19c2d9b2c4 Add ephSource, toc, toe, IODC, IODE to SatellitePvt
(hardware/interfaces)

Bug: 206670536
Test: atest VtsHalGnssTargetTest
Change-Id: I564e9e0f48d5a22d40f103286d0d7553006be1de
2022-01-27 15:13:54 -08:00
Yu-Han Yang
75934f7a02 Fix ANAPIC review comments (hardware/interfaces)
* Use "GnssAgc[] gnssAgcs = {};" for backwards compatibility
* Add comments on AgnssTypes
* Rename SetIDType -> SetIdType
* Update the comment on NetworkAttributes -> networkHandle
* Remove the “DELETE_” prefix in the GnssAidingData
* Make a parcelable for setPositionMode parameters

Bug: 215566115
Test: atest VtsHalGnssTargetTest
Change-Id: Ifc2de451a43cd1f32267e74dc288a3821b75f0cb
2022-01-26 14:16:20 -08:00
Yuchen He
090f16c0b8 Supported synchronized fixed location and measurement from device files
Replace NMEA by one row fixed location data

Test: atest VtsHalGnssTargetTest
Test: launch_cvd -cpus 16 -memory_mb 16192  --start_gnss_proxy --gnss_file_path=/usr/local/google/home/yuchenhe/Downloads/raw.txt --fixed_location_file_path=/google/data/rw/users/yu/yuchenhe/input.txt
Bug: 213225295

Change-Id: Ide7bbb3e81a90414496084691227bd95a2e7af18
2022-01-20 23:17:16 +00:00
Shinru Han
a42956fbe8 Add minDistance parameter to GnssBatching (hardware/interface)
Test: atest VtsHalGnssTargetTest
Bug: b/206670536
Change-Id: I982dd64d0cfe0f42c411e4df27d9fdd160c74d2e
2022-01-20 03:47:54 +00:00
Yu-Han Yang
5fe8781258 Merge "Reland "Add IAGnssRil AIDL HAL (hardware/interfaces)"" 2022-01-20 03:45:22 +00:00
Yu-Han Yang
0f8718023e Merge "Remove GnssAntennaInfo AIDL capability" 2022-01-19 21:27:19 +00:00
Shinru Han
0d91cbe39a Reland "Add IAGnssRil AIDL HAL (hardware/interfaces)"
Bug: 205185251
Bug: 182975915
Test: atest VtsHalGnssTargetTest
Change-Id: I7f8d0b367c68ba870d0a222aee4ee4b5b93cc936
2022-01-20 01:45:21 +08:00
Joe Huang
ad5d0702b7 Remove GnssAntennaInfo AIDL capability
Since JNI is not ready yet, remove it to avoid cts fail.

Bug: 215281989
Test: atest LocationManagerFineTest
Change-Id: I69ced31e1de54ef9a325ba20020f1913fe3daddd
2022-01-19 19:01:44 +08:00
Edwin Tung
bbf7fb9322 Add MeasurementCorrections AIDL HAL (hardware/interfaces)
Bug: 208728105
Test: atest VtsHalGnssTargetTest
Change-Id: I2192670951a517bd229535a083997cc9bab31287
2022-01-19 16:50:58 +08:00
TreeHugger Robot
2717842105 Merge "Combining GnssVisibilityControl to gnss aidl_interface" 2022-01-18 21:39:45 +00:00
Edwin Tung
4c7b8f8fd9 Combining GnssVisibilityControl to gnss aidl_interface
Bug: 208728105
Test: atest VtsHalGnssTargetTest
Change-Id: I7295a59a93778a186727e2a22c9669770f021d1a
2022-01-18 21:08:17 +08:00