Commit graph

563 commits

Author SHA1 Message Date
Treehugger Robot
f9257b36c2 Merge "Adding bug component per http://go/xts-owners-policy" am: 827ca53e4e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2573050

Change-Id: Id0bd6ab28741908606d6ee6672fb9b25f0f6c95e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-02 20:13:48 +00:00
Wyatt Riley
96d835a892 Adding bug component per http://go/xts-owners-policy
Bug: 278494314
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:890bdd52fd3b406e750fffe40e9c5f3b331c0358)

Change-Id: I36a1781f1cf47d2b8177762b28a3d717484f0089
2023-04-28 20:08:30 +00:00
Treehugger Robot
a49dca7c1a Merge "Throw away initial measurements before interval tests" into android13-tests-dev am: 86206d71ca am: ee40587951 am: 4e76223023
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2506037

Change-Id: I3c7d3dd68ab1dc4a6683c0a294598d7b88546a7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 03:24:38 +00:00
Treehugger Robot
ee40587951 Merge "Throw away initial measurements before interval tests" into android13-tests-dev am: 86206d71ca
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2506037

Change-Id: If4e8ab003e754b4e9d0b4d507659049989941b51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-29 02:15:57 +00:00
Yu-Han Yang
41c5b4efe3 Throw away initial measurements before interval tests
Bug: 264597734
Test: atest VtsHalGnssTargetTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbab0de442246a78c42acf5ca7c4f7c94fd82651)
Merged-In: I1064807adf3264f13c1ef6678df37cff350503c5
Change-Id: I1064807adf3264f13c1ef6678df37cff350503c5

NOTE FOR REVIEWERS - original patch and result patch are not identical.
PLEASE REVIEW CAREFULLY.
Diffs between the patches:
47,6 +447,7 @@
                                               const int numMeasurementEvents,
                                               const int timeoutSeconds,
                                               std::vector<int>& deltasMs) {
+    callback->gnss_data_cbq_.reset();  // throw away the initial measurements if any
     int64_t lastElapsedRealtimeMillis = 0;
     for (int i = 0; i < numMeasurementEvents; i++) {
         GnssData lastGnssData;

Original patch:
From dbab0de442 Mon Sep 17 00:00:00 2001
From: Yu-Han Yang <yuhany@google.com>
Date: Tue, 07 Feb 2023 19:01:56 +0000
Subject: [PATCH] Throw away initial measurements before interval tests

Bug: 264597734
Test: atest VtsHalGnssTargetTest
Change-Id: I1064807adf3264f13c1ef6678df37cff350503c5
---
2023-03-23 20:52:08 +00:00
Yuchen He
6d9af6585c Fix epoll leaks: clean up file descriptor and epoll instance properly am: 6dddd6f43a
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/21914922

Change-Id: Icecac5bd27e6b9b7c15b62d54df506762ed87244
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-09 01:38:30 +00:00
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
f72b412a07 Skip TestGnssPowerIndication if capability is not supported am: 5da610c660 am: e0b0a8c2a7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397741

Change-Id: Ie26bcec33070bc82310231947497fee944e4e819
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-24 19:47:36 +00:00
Yu-Han Yang
e0b0a8c2a7 Skip TestGnssPowerIndication if capability is not supported am: 5da610c660
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2397741

Change-Id: I874c8f080db515cb36d3a0c5bf288b34d0fa0a9c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-24 19:07:48 +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
48eb52cd38 Update Cuttlefish mock GNSS hardware model name am: 08e0d7dfb0 am: c4c5d1549e am: c2e719bbd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/20489237

Change-Id: Ie918d5361864f515892e4aa971b91b5708792fe8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-17 20:18:48 +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
9fbde6a00d Call close() in TearDown() am: 25cd9d67d5
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2254818

Change-Id: I9cc41bc3989788511d799ddaa6cf9b881f11c980
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-19 20:33:30 +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
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
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