992 Commits

Author SHA1 Message Date
David Christie
c80684b7c1 Merge "Update location OWNERS files" am: b3249c820f am: d0e5951d42 am: 731c34c0e7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2042803

Change-Id: Ia817c9d3e70e11f1e15861e272ea7d861ce996af
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 15:31:34 +00:00
David
b84bb82fbc Update location OWNERS files
Test: N/A
Change-Id: I4a2871228a179eb80f556719aae0a78fca1616da
2022-03-28 09:25:17 -07:00
Grace Cheng
6f99e1a33d Adds RequiresFeature annotation to ADAS APIs
Bug: 215299508
Test: presubmit

Change-Id: Iaa29a383613b48ef7baa7fd8cd73b8fbf797d6bb
2022-03-25 03:37:08 +00:00
Grace Cheng
329d712936 Merge "Removes WRITE_SECURE_SETTINGS from location bypass APIs" into tm-dev 2022-03-19 08:36:07 +00:00
Yu-Han Yang
1257c4108a Merge "Add GnssExcessPathInfo (frameworks/base)" into tm-dev 2022-03-17 16:31:42 +00:00
Grace Cheng
a7bf3a7b5b Removes WRITE_SECURE_SETTINGS from location bypass APIs
Bug: 215299508
Test: presubmit

Change-Id: Ice5e28858efa07c4bea5540aad8bb0bcf0a69137
2022-03-16 23:09:58 +00:00
Yu-Han Yang
97f3b91c53 Add GnssExcessPathInfo (frameworks/base)
Also add combinedAttenuationDb in GnssSingleSatCorrection

Bug: 201253590
Test: atest GnssExcessPathInfoTest
      atest GnssSingleSatCorrectionTest
Change-Id: I7f629f2fbca563a36d1b4543f768b8fabd5d91fd
2022-03-16 12:11:22 -07:00
Soonil Nagarkar
91e3a080aa Update Location APIs per feedback
Bug: 200730770
Test: presubmits
Change-Id: I251dcce3bae431ab3770e0610105c75e377c8d10
2022-03-15 16:46:14 -07:00
Yu-Han Yang
091f9b53f5 Append 'Seconds' to timeOfClock and timeOfEphemeris
Bug: 219575003
Test: atest SatellitePvtTest
Change-Id: I28d1e5b16db8b5f75015c54bcfcc391a6a50082b
2022-02-25 21:12:13 +00:00
TreeHugger Robot
0d4e785115 Merge "Change TimeOfClock and TimeOfEphemeris to long" 2022-02-16 23:31:11 +00:00
Yu-Han Yang
979a2b76a3 Change TimeOfClock and TimeOfEphemeris 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

Bug: 219575003
Test: atest SatellitePvtTest
Change-Id: Ic663e45adafbd1778528a985c1670898d5653e00
2022-02-16 11:00:02 -08:00
Neil Fuller
490d480a95 Switch "UTC time" to "Unix epoch time" (Location)
This is more correct. Android devices, even under ideal conditions,
don't track UTC (which contains leap seconds and uses the SI definition
of a second) but use a clock based on Unix epoch time (no leap seconds,
but clocks may skip/stop or smear around leap seconds to ensure a fixed
number of second increments per calendar day when leap seconds are
applied to UTC).

Bug: 218802673
Test: Compile only
Change-Id: If87023af06ba9933f96029e52df9cb3841bca0cb
2022-02-11 11:29:05 +00:00
Grace Cheng
74bfabdade Adds LOCATION_BYPASS permission.
Bug: 215299508
Test: presubmit

Change-Id: I3768fb7bcc8da64ddad1d2e0a4bb3feaec244104
2022-01-28 01:33:30 +00:00
Eva Chen
b9314e1681 Merge "Update GNSS S2R APIs based on API Council feedback." 2022-01-27 23:05:30 +00:00
Yu-Han Yang
c8b3508deb Merge "Add ephSource, toc, toe, IODC, IODE to SatellitePvt (frameworks/base)" 2022-01-26 18:53:47 +00:00
Eva Chen
a10ba7bb2c Update GNSS S2R APIs based on API Council feedback.
Bug: 215304589
Test: atest GtsLocationTestCases:AutomotiveGnssControlsTest
Change-Id: Ie1ff0698df9e23fa280fbbf71f1330bdf14f5f2c
2022-01-25 12:58:55 -08:00
Yu-Han Yang
e088750093 Add ephSource, toc, toe, IODC, IODE to SatellitePvt (frameworks/base)
Bug: 206670536
Test: atest SatellitePvtTest
Change-Id: I3b4f084bc2a0b1e7603acb49f9bfbad1dbd441bb
2022-01-24 14:41:12 -08:00
Soonil Nagarkar
abb7ac8e60 Change default LocationRequest quality
In order to maintain backwards compatibility with SystemApi versions of
LocationRequest, we chose to keep the default quality level as low.
However, this is causing problems when LocationRequests are created
through the use of legacy public APIs, leading to location requests that
do not receive locations as expected. Default the quality level to
balanced to address this issue.

Also removes old UnsupportedAppUsage annotations (past the 2 release
support limit now), and updates some variable names accordingly.

Bug: 215186921
Test: presubmits
Change-Id: I6e1fdb0b94438fd3dede75103cd70443e863a3f2
2022-01-24 12:42:11 -08:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a6431d6489f8d1e1b80cb510d0ee073c50.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Yu-Han Yang
4ff8affb7c Merge "Add GnssAutomaticGainControl to GnssMeasurementsEvent (frameworks/base)" 2022-01-14 22:07:59 +00:00
Yu-Han Yang
af90af7931 Add GnssAutomaticGainControl to GnssMeasurementsEvent (frameworks/base)
AgcLevelDb has been a subfield of GnssMeasurement. However,
GnssMeasurement is only reported by the chipset when there
is GNSS signal. For example, in deep indoor, or when there
is strong jamming signal, no GnssMeasurement can be reported,
and thus no AGC value can be reported.

To resolve that, we are adding this GnssAgc to GnssMeasurementsEvent
directly, so that the client can get AGC values even without GNSS
signal (i.e., without GnssMeasurement).

Bug: 206670536
Test: atest GnssAutomaticGainControlTest
      atest GnssMeasurementsEventTest
Change-Id: I97c7ec98b6e8cc977c6e879b52a8cf75c355ae33
2022-01-14 09:54:38 -08:00
Soonil Nagarkar
967a70e580 Merge "Add missing javadoc param" 2022-01-14 02:20:51 +00:00
Soonil Nagarkar
36063b228b Add missing javadoc param
Bug: 214389219
Test: presubmits
Change-Id: I0328b640378efab4c41c76f5a9bcce557339fc1a
2022-01-13 11:03:16 -08:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc75f7e44914222114752de5bce133d4.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Soonil Nagarkar
471b107d52 Merge "Ensure location provider exceptions are visible" 2022-01-11 00:17:40 +00:00
Soonil Nagarkar
a25ac6d49b Ensure location provider exceptions are visible
Exceptions thrown on one-way binder threads are dropped and ignored,
which is very harmful to writing stable code. Rethrow any exceptions
from these binder calls on the main thread to crash the process.

Test: presubmits
Change-Id: Ie5986061c6d664f59b83679c90dd07adad1a7ec2
2022-01-10 12:14:34 -08:00
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +00:00
TreeHugger Robot
855774347e Merge "Fix parcel creation bug in GnssSingleSatCorrection" 2022-01-05 17:40:24 +00:00
Yu-Han Yang
3ce77a50da Fix parcel creation bug in GnssSingleSatCorrection
Bug: 211497888
Test: atest GnssSingleSatCorrectionsTest
Change-Id: I7687ffa68d463c943606d3e20a7253fa70211ead
2022-01-04 17:23:00 -08:00
Yu-Han Yang
799b03522c Add intervalMs to GnssMeasurementRequest
Bug: 206670536
Test: atest GnssMeasurementRequestTest
Change-Id: I131c8f0f931d4f7cc57bd34009aa27961eadcf3c
2022-01-04 09:51:44 -08:00
Lee Shombert
0cece3898b Prepare PropertyInvalidatedCache for SystemApi
Bug: 152453213
Tag: #refactor

This commit prepares PropertyInvalidatedCache to function as a system
api.  Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected).  This
forces an update to all existing clients, to accommodate the change in
method visibility.

Two small changes have been made as cleanup:

 1. The awkwardly named debugCompareQueryResults() is now
    resultEquals(), which is more or less consistent with how other
    equality tests are named in Android.  This name change affects two
    clients.

 2. PackageManager has changed to use resultEquals() instead of
    maybeCheckConsistency().  This provides a simpler and more
    consistent use of the APIs.  maybeCheckConsistency() has been made
    private.

Test: atest PropertyInvalidatedCacheTests

Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
2022-01-04 08:13:59 -08:00
Bernardo Rufino
90bb3709dc Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
2021-12-15 18:21:38 +00:00
Eva Chen
f65956e872 Merge "Implement GNSS APIs for Automotive Power Management." 2021-11-18 17:40:03 +00:00
Yu-Han Yang
d43b242660 Update wording about high GNSS accuracy applications
Test: javadoc only
Bug: 199933846
Change-Id: I2517910db88df90d9cafcf0e07b9384a1e9e2ec4
2021-11-08 11:25:34 -08:00
Eva Chen
c6a673d409 Implement GNSS APIs for Automotive Power Management.
Automotive Suspend to RAM doesn't work when GNSS requests are
actively running. This change introduces system APIs for suspending
and resuming GNSS.

Bug: 187348886
CTS-Coverage-Bug: 203703449
Test: Presubmits
Change-Id: If25c761e8618bebaf989392afc0a676f930dfd78
2021-11-04 14:20:32 -07:00
Yu-Han Yang
54cfe9208c Merge "Use TelephonyCallback to replace the deprecated broadcast" 2021-11-04 17:47:43 +00:00
Yu-Han Yang
fee50f1946 Clarify GNSS location is at the primary antenna
Bug: 199933846
Test: doc only
Change-Id: Ie883e0c221c8a5e28eaaa7feed6aea7b6003fab0
2021-11-03 13:57:43 -07:00
Yu-Han Yang
1096bce6b8 Use TelephonyCallback to replace the deprecated broadcast
Bug: 196115028
Test: manual
Change-Id: I53e8053d7f03e3263986d4e8ce03ebfbcfd79316
2021-11-03 13:40:09 -07:00
TreeHugger Robot
82521f588e Merge "Fix serialization bug in GpsNavigationMessage" 2021-09-30 00:00:45 +00:00
TreeHugger Robot
6b21c0accc Merge "Add asynchronous geocoding API" 2021-09-23 17:48:22 +00:00
Yu-Han Yang
dedaa90193 Fix serialization bug in GpsNavigationMessage
Bug: 196970023
Test: presubmits passing.
Change-Id: I69f51eb2faac0cf2ee9f7a5f94f7100925f7221c
2021-09-22 01:49:23 +00:00
Yu-Han Yang
ef7bdefa61 Fix serialization bug in GpsNavigationMessage
Bug: 196970023
Test: presubmits passing.
Change-Id: I69f51eb2faac0cf2ee9f7a5f94f7100925f7221c
2021-09-22 01:46:44 +00:00
TreeHugger Robot
e74dd0a572 Merge "Fix the link of addNmeaListener" 2021-09-21 19:01:47 +00:00
Yu-Han Yang
1fadf4d3b5 Fix the link of addNmeaListener
Bug: 157630227
Test: javadoc update only
Change-Id: Iccd8695572cd94c3ffe00b04445a026edf79ee88
2021-09-16 09:16:20 -07:00
TreeHugger Robot
ee88e0946e Merge "Clarify GnssAntennaInfo should be provided by OEM" 2021-09-15 04:31:06 +00:00
TreeHugger Robot
f3afe1a3c3 Merge "Update 'GPS message' to 'GNSS message'" 2021-09-10 18:05:04 +00:00
Yu-Han Yang
9786469624 Clarify GnssAntennaInfo should be provided by OEM
Bug: 193069052
Test: doc update only
Change-Id: I1c72469db4b67c6fd030b7fa93bde2d31fec140d
2021-09-09 21:37:55 +00:00
Yu-Han Yang
085701dcf9 Update 'GPS message' to 'GNSS message'
Bug: 197542267
Test: Javadoc update only
Change-Id: I6699c1f4e5b2df205fcd4762338a7e8e4cf63204
2021-09-09 14:21:39 -07:00
Soonil Nagarkar
03e0b89362 Add asynchronous geocoding API
Geocoding is unsupported, but the old APIs encourage bad behavior and
force clients to waste a thread blocking for results. This often causes
ANRs in a variety of applications. Provider an asynchronous API so
clients can avoid ANRs.

Bug: 197585308
Test: presubmits
Change-Id: I6fdd90d467f01892ce34371c2161721bd5976ca9
2021-08-30 14:49:50 -07:00