Commit Graph

1066 Commits

Author SHA1 Message Date
Yu-Han Yang
f9f553805d Merge "Correct getExtras("satellites")" into udc-dev 2023-03-30 21:37:32 +00:00
Yu-Han Yang
5b7e2b63ae Correct getExtras("satellites")
To return the number of satellites instead of signals

Bug: 275611082
Test: manual
Change-Id: I766159baf6cb16f902cb1395f9d12f8bbda9e8f0
2023-03-29 20:49:17 +00:00
Zhanghao Wen
9a28d06889 Update the Javadoc of getReceivedSvTimeNanos()
Added GPS L1C(P), BDS B1C(P) with value: CODE_LOCK(10 ms), STATE_2ND_CODE_LOCK(18000 ms), TOW_KNOWN(1 week).
Added BDS B2AQ: Same as E5AQ
Added IRNSS: Same as GPS L1 C/A

Bug: 264588057
Test: Javadoc only
Change-Id: I187ecd0452efa97700a141a1837801b45f82da2d
2023-03-08 22:23:07 +00:00
Yu-Han Yang
c00597fea7 Update hasAccumulatedDeltaRange() to return a 3-state int
Bug: 267312779
Test: atest GnssCapabilitiesTest
Change-Id: Id94d8a5f0765600627ba51fff9b1fe41b581e372
2023-03-03 05:45:12 +00:00
Yu-Han Yang
62940e47a3 Merge "Add isAccumulatedDeltaRangeCapabilityKnown for backward compatibility (frameworks/base)" 2023-01-30 17:18:13 +00:00
Yu-Han Yang
f8448a2448 Merge "Rename hasFullTracking to hasIsFullTracking (frameworks/base)" 2023-01-28 01:47:36 +00:00
Yu-Han Yang
7118cf4d80 Rename hasFullTracking to hasIsFullTracking (frameworks/base)
Bug: 265815272
Test: atest GnssMeasurementsEventTest
Change-Id: I5e8e267a020454726c2c0377cba85d4355a8b5b6
2023-01-27 18:46:30 +00:00
Yu-Han Yang
17d08b8f02 Add isAccumulatedDeltaRangeCapabilityKnown for backward compatibility (frameworks/base)
Bug: 260002331
Test: atest GnssCapabilitiesTest
Change-Id: I82356bc84abddf36b04da5576d34ba6d3f01f32f
2023-01-27 18:20:35 +00:00
Andrew Solovay
8970870803 Merge "docs: Fixing typo (i.e without closing period)" 2023-01-25 17:48:26 +00:00
Neil Fuller
899d2fe8f8 Merge "Refactoring: Support alt. network time source" 2023-01-25 09:50:03 +00:00
Andrew Solovay
062f767dc4 docs: Fixing typo (i.e without closing period)
The CommonTypos linter complained about "i.e" without a closing period.
Since our tech writing style guide says to avoid "i.e." in general, I
rephrased as "that is".

Per go/fix-refdocs, tm-qpr-dev is now the preferred branch for doc fixes
until the U dev branch is open. Since this CL hasn't been reviewed yet,
I'm CPing it over here and abandoning the original CL.

Docs-only change, no change to code.

Change-Id: Id8de0d371e1290a7e8ed1831f2fbca063f9ff835
Test: [go/abtd docs build]
Bug: 263824202
2023-01-25 00:41:52 +00:00
Neil Fuller
8ad07e271f Refactoring: Support alt. network time source
Refactoring to support an alternative source of network time for passing
to the GNSS component. The new implementation will be submitted in a
follow-up.

NtpTimeHelper has been replaced by NetworkTimeHelper in
GnssLocationProvider. NetworkTimeHelper provides the stable interface
between GnssLocationProvider and the original / alternative impl for
what was NtpTimeHelper.

NtpTimeHelper has been renamed NtpNetworkTimeHelper.

These changes are not intended to change any behavior. There are some
minor changes between the interaction between GnssLocationProvider and
the NetworkTimeHelper class, but these are not expected to alter the
runtime behavior.

The NetworkTimeHelper.setPeriodicTimeInjectionMode() method touches
a pre-existing bug: The method name reflected the effect of the method,
which is the near-opposite of what the capability name would suggest.
This appears to be due to an accidental logic inversion, not by intent.
As can be seen in the changes for GnssLocationProvider: the
enablePeriodicTimeInjection() method was called when
mGnssNative.getCapabilities().hasOnDemandTime() was true. The existence
of bug 73893222 supports the fact that there is a long-standing bug
here. The intent with this commit is not to fix it or alter behavior,
just to make it more obvious, as it is unclear if the current behavior
is relied upon somewhere. Comments and field names have been improved to
try to clarify the actual behavior.

Bug: 73893222
Bug: 222295093
Test: atest services/robotests/src/com/android/server/location/gnss/NtpNetworkTimeHelperTest.java
Change-Id: I0b1ba43a55ff531df343c022650e3f5721dda7f1
2023-01-19 14:08:46 +00:00
Yu-Han Yang
4baa4f67e7 Use deepToString for 2d arrays
Bug: 259324783
Test: manual
Change-Id: I030de60258f11ec6ab719fb7cb5d6118c1814594
2023-01-18 17:03:05 +00:00
TreeHugger Robot
404b71818e Merge "Clarify javadoc of Full Tracking" 2023-01-05 22:11:06 +00:00
Yu-Han Yang
5b131befc9 Merge "Add hasFullTracking for backward compatibility" 2022-12-22 22:42:15 +00:00
Yu-Han Yang
dcb79a624f Add hasFullTracking for backward compatibility
Also add plumbing for isFullTracking in JNI

Bug: 257549183
Test: atest GnssMeasurementRegistrationTest
Change-Id: I2d41b7aaaceb225c29cf282a2733ab9dfdd9d6c0
2022-12-22 00:06:12 +00:00
Yu-Han Yang
5475ae5312 Merge "Add ADR in GnssCapabilities (frameworks/base)" 2022-12-20 00:58:10 +00:00
Yu-Han Yang
40076acfb1 Add ADR in GnssCapabilities (frameworks/base)
Bug: 260002331
Test: GnssCapabilitiesTest
Change-Id: I15f768d10982f9d9fb60f6beb88f42b2f7f638b4
2022-12-19 18:17:03 +00:00
Brian Julian
82d65fbdc2 Adds hidden AltitudeConverter.addMslAltitudeToLocation(Location) that does not load data from raw assets.
Relnote: N/A
Bug: 231327615
Test: atest FrameworksMockingServicesTests:AltitudeConverterTest
Change-Id: Idb699d03035c7ec56a07f3c648f49119b014363f
2022-12-14 17:32:27 +00:00
David Christie
5c7a3cdb10 Merge "Add permission gated provider to access the hardware GPS directly." 2022-12-12 23:53:40 +00:00
Nagendra Prasad Nagarle Basavaraju
32765d94a1 Merge changes from topic "COUNTRY_DETECTOR_API_ENHANCEMENT"
* changes:
  API Enhancement CountryDetector
  Revert CountryDetector changes
2022-12-09 14:53:09 +00:00
Brian Julian
be73c90d7b Renames addMslAltitude method in AltitudeConverter to addMslAltitudeToLocation, and updates Javadoc to use @throws.
Relnote: N/A
Bug: 261696975
Test: atest CtsLocationNoneTestCases
Change-Id: I01c9c640eba6ab49b364f3aadcf86701f8aefb95
2022-12-07 20:44:28 +00:00
David Christie
b983a450d0 Add permission gated provider to access the hardware GPS directly.
-Only applicable when an app level GPS provider override is present which may mask the hardware provider.

Bug: 260010264
Test: atest LocationManagerServiceTest, atest LocationProviderManagerTest

Change-Id: I085152f9074863dcf8d8ee96981846b847966018
2022-12-06 17:47:14 -08:00
Brian Julian
a5dc8a76dd Removes catch on IOException as GeoidHeightMap#loadFromCacheAndDisk supports this type of throw.
Relnote: N/A
Bug: 231327615
Test: atest CtsLocationNoneTestCases
Change-Id: I7a89f51d60837f709dce9b28afd1b52c49c339cf
2022-12-06 18:37:44 +00:00
Brian Julian
1214e5f30c Merge "Adds complete U implementation of AltitudeConverter." 2022-12-06 17:04:08 +00:00
Brian Julian
ef711ca481 Adds complete U implementation of AltitudeConverter.
Relnote: N/A
Bug: 231327615
Test: atest CtsLocationNoneTestCases
Change-Id: I7bac8b12ddd68732f99ff04e30f169657c2d2e71
2022-12-02 15:33:50 +00:00
Nagendra Prasad Nagarle Basavaraju
576862f579 API Enhancement CountryDetector
-Replace CountryListener with a Consumer<Country>
-Add registerCountryDetectorCallback to take an Executor Vs addCountryListener taking Looper
-Add unregisterCountryDetectorCallback to remove Consumer<Country> callback interface
-Adding getSource to return an IntDef
-Expose Country constructor
-Adding alternative API with new naming for getCountryIso
-Refactoring addCountryListener() & removeCountryListener API's

Bug: 252989268, 258197470
CTS-Coverage-Bug: 255511190
Test: manual test && make update-api
Change-Id: I5a2f253a87d1037837bc161a80cb873a6471c229
2022-12-01 02:45:46 +00:00
David Christie
0a84941129 Add option for framework overlay to handle the GPS_PROVIDER in LocationManagerService.
Bug: 260010264
Test: Manual

Change-Id: I657a6c9061492c31382a7ab619607d4a011a0af9
2022-11-29 19:14:46 -08:00
Yu-Han Yang
6c109ef89e Clarify javadoc of Full Tracking
Bug: 257549183
Test: doc update only
Change-Id: Ia66235c20a527c4355b1ce9fae7c157dd90d2c84
2022-11-22 21:32:06 +00:00
Nagendra Prasad Nagarle Basavaraju
e655f11ca5 Revert CountryDetector changes
-Revert detectCountry() to UnsupportedAppUsage
-Revert addCountryListener & removeCountryListener to UnsupportedAppUsage
-Revert countryListener to UnsupportedAppUsage
-Revert getCountryIso() to UnsupportedAppUsage to support api with new naming convention

Bug: 252989268
Test: manual test && make update-api
Change-Id: I5c5978f4460eb6bce8d3ed97458b5cc6ac6d788d
2022-11-22 09:14:06 +00:00
Yu-Han Yang
1a133aa12a Merge "Add isFullTracking in GnssMeasurementsEvent (frameworks/base)" 2022-11-21 19:11:40 +00:00
Yu-Han Yang
0d08d6da0a Use unmodifiableList for gnssSignalType
Bug: 258197332
Test: atest GnssCapabilitiesTest
Change-Id: I37e4f6b03726d8169cbff0202f5cb0b7af423c65
2022-11-15 05:02:54 +00:00
Yu-Han Yang
8c071a43a4 Add isFullTracking in GnssMeasurementsEvent (frameworks/base)
Bug: 257549183
Test: atest GnssMeasurementsEventTest
Change-Id: Icd57e644a50cef3f6633388a2ce3d0242385f13c
2022-11-10 19:34:05 +00:00
Nagendra Prasad Nagarle Basavaraju
a0bd82a164 Merge "Expose Country & CountryDetector API's" 2022-11-05 01:20:50 +00:00
Yu-Han Yang
e75758a781 Pipe GnssSignalType from HAL to Java
Bug: 253319784
Test: manual on cuttlefish
Change-Id: I85a652338b9ec0fc9b1fc17ff9057d73a6c796ae
2022-11-04 17:54:06 +00:00
Nagendra Prasad Nagarle Basavaraju
9fe25438f0 Expose Country & CountryDetector API's
To Support new mainline module expose getCountryIso,
getSource,addCountryListener,detectCountry API's as
System API

Bug: 252989268
CTS-Coverage-Bug: 255511190
Test: manual test && make update-api
Change-Id: I6c4b2980ee04e56e8d0bb9ddda0391e3e23ada7e
2022-11-03 07:06:30 +00:00
Yu-Han Yang
d4dea7daee Add signal type to GnssCapabilities (frameworks/base)
Bug: 253319784
Test: atest GnssCapabilitiesTest
Change-Id: I550ca8a957d0dfd8bd4702739415fb2fa9994a61
2022-11-01 22:48:33 +00:00
Yu-Han Yang
a80e61d0a4 Merge "Update svid range" 2022-10-26 20:37:07 +00:00
Yu-Han Yang
ac91396be4 Rename SingleShot to SingleShotFix
Bug: 254279031
Test: atest GnssCapabilitiesTest
Change-Id: I98d5a6aa2842d445a1b22ea6371705fa3469272e
2022-10-25 17:28:43 +00:00
Yu-Han Yang
109472aa4b Update svid range
Bug: 237129569
Test: atest GnssStatusTest
Change-Id: I779157e8693c62616303e38e35e611a9f1b8bb97
2022-10-25 17:28:16 +00:00
TreeHugger Robot
5b63d18ab2 Merge "Make GnssCapabilities methods public." 2022-10-13 16:33:45 +00:00
Yu-Han Yang
7756059320 Make GnssCapabilities methods public.
Bug: 252920075
Test: atest GnssCapabilitiesTest
Change-Id: Ide95f69c605f50f205f202640f9a51fd8c8e78b8
2022-10-13 00:14:20 +00:00
TreeHugger Robot
d71dd97d97 Merge "Use non-deprecated methods." 2022-10-10 18:04:04 +00:00
Yu-Han Yang
b1218f1de1 Add doc for PASSIVE_INTERVAL in older version
Bug: 251279388
Test: doc update only
Change-Id: I419da5319a8d414b277871848b3fad52fe060306
2022-10-06 20:44:41 +00:00
Kweku Adams
3bb858b2f4 Use non-deprecated methods.
Feature ID was renamed to Attribution Tag. The old methods were marked
@Deprecated and @removed.

Bug: 135214188
Test: atest MediaInserterTest
Change-Id: Id2fd77dcdc5125ea949c23825606e7a046697e8e
2022-10-03 15:48:50 +00:00
Yu-Han Yang
d2309fa3a9 Add passive listener support for GnssMeasurement
Bug: 248291428
Test: atest GnssMeasurementRegistrationTest
Change-Id: Ifac665ff1e85ee9625613e87548460c8974a81bc
2022-09-30 01:08:14 +00:00
Treehugger Robot
8f49373913 Merge "Clarify method names and improve debug" am: 1ab7ac7f56 am: 1d74b8207b am: a6a8219798 am: f1f8a7519c am: dd2eed7053
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2217306

Change-Id: I35466159e53b25b3b00c0b2afd540a265b43f482
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-17 12:35:25 +00:00
Treehugger Robot
dd2eed7053 Merge "Clarify method names and improve debug" am: 1ab7ac7f56 am: 1d74b8207b am: a6a8219798 am: f1f8a7519c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2217306

Change-Id: I0139bcffa3e11a90e36e228d371f478ae851d5c9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 13:58:32 +00:00
Treehugger Robot
f1f8a7519c Merge "Clarify method names and improve debug" am: 1ab7ac7f56 am: 1d74b8207b am: a6a8219798
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2217306

Change-Id: If9182dd9cf8c31229b1cf2048111204a9b6411a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-16 13:30:56 +00:00
Neil Fuller
d272f786c2 Clarify method names and improve debug
Change LocationTime.getTime() -> getUnixEpochMillis() for clarity.
Add LocationTime.toString() to improve log messages involving
LocationTime.

Test: build only
Bug: 236611620
Change-Id: I6f33bec6288c67e18a2008a735e88a8981186183
2022-09-16 09:03:00 +00:00