Following are the review comments from API Council:
(Places below that reference "s/foo/bar/" below are suggesting that "foo" be
replaced with "bar".)
GnssClock
-- Class docs should not refer to "GPS" at the top level
-- s/InNs/Nanos/
-- s/Sec/Second/
GnssMeasurement
-- s/In// for "InUnitname"
-- s/Sec/Second/
-- s/Ms/Millis/
-- s/Deg/Degrees/
-- STATUS_GPS_LOCATION_DISABLED -> STATUS_GNSS_LOCATION_DISABLED
GnssMeasurementsEvent.Callback
-- "returns" -> "reports" in the method docs as the methods return void
LocationManager
-- register/unregisterGnssMeasurementEventCallback ->
register/unregisterGnssMeasurementsEventCallback (plural)
GnssNavigationMessage
-- MESSAGE_TYPE_ constants -> change to just TYPE_; the "MESSAGE" is redundant
with the class name
-- is a signed byte/short ok based on the standard here? If not consider using
int in the public api
GnssStatus
-- Make sure @IntDef exists for the constellation type
-- Please append unit types for values returned to match GnssMeasurement methods
GnssStatusCallback
-- Please document time base/units for the time parameter of onFirstFix
Bug: 27385557
Change-Id: Ifed6a2eca3fd7ba89b3ded6964a70376235af8f4
Similar to first patch, but now using new "rethrowFromSystemServer()"
method which internally translates DeadObjectException into
DeadSystemException. New logic over in Log.printlns() now
suppresses the DeadSystemException stack traces, since they're
misleading and just added pressure to the precious log buffer space.
Add some extra RuntimeInit checks to suppress logging-about-logging
when the system server is dead.
Bug: 27364859
Change-Id: I05316b3e8e42416b30a56a76c09cd3113a018123
Those APIs are already used by first-party Apps for a while. We now make them
available to third-party Apps as well.
Change-Id: I87d9f0dbb04831fc849228d7df03a2686e2eb383
-Use bitmask for has*** methods.
-Use ThreadLocal for caching intermediate computations
rather than preallocating memory in every Location
Change-Id: If2fa17bfd59511ec0b809f4b7d7cd8028360c340
Minute values in the range [0, 59] are valid if seconds are
present. If seconds are not present then minute values are
valid in the range [0, <60]
Second values are valid in the range [0, <60]
Examples:
50:59:59.99999 is valid
50:59.99999 is valid
50:59.1:1 is not valid
Patch taken from Motorola: partner gerrit 137210
Bug: 17958582
Change-Id: I0d1265534092157883af564119f723984362d436
Issues: 2667 and 2668
Add a callback-based mechanism for GmsCore to connect to Hardware Activity
Recognition. This allows GmsCore to stop polling to identify if the Android
platform supports the functionality or not.
Bug: 17112184
Change-Id: I8f9459cbd15eecd70f6919c6551e6f7a663c732f
Ensure that activities are unregistered from AR HW when the client's
binder dies. This clean up is required to prevent AR HW to keep active
when there are no clients listening for events.
Bug: 19894637
Change-Id: Iccd609cf1d2d4a4453c7a96cb8645b61639c3234
-Register for listener for permission changes and stop
request immediately if client loses permission.
-Also remove permission requirement to remove geofences
and clean up permission annotations.
Bug: 21903866
Change-Id: I7e028b6b2ca5b21f25fcbba5de86dfb55caff872
Country information is already available elsewhere (MNC/MCC), so there's no
point enforcing these permissions.
It wasn't properly enforcing the permissions anyway, since the code path in
question was sometimes executed on a handler thread.
Bug 20927020
Change-Id: Ia090664917f7b694e80dd55934db442633bab1d8
The access mock location is no longer a runtime permission. It is a
signature protected one that apps cannot get but the fact they request
it means they want to inject location into the system. Now the user
gets to choose the current mock location app in developer options from
the apps that request the mock location permission. The access to mock
location is no longer guarded by the permisson but from a new app op
which is off by default and the settiings UI sets it to enabled only
for the currently selected mock location app.
bug:21078873
Change-Id: I19e3f9dc7c7de82eab46b30fec1abfbca54a0e59
b/19938206
All new introduced APIs are hidden.
GpsMeasurement#isPseudorangeRateCorrected() is need to properly identify different types
of data provided by different partners. Given the nature of each GPS engine, this change is
required to accomodate the data that can be provided by many partners.
GpsNavigationMessage#getStatus() is required to ensure that the Location process is aware
if the state of the messages, and can act depending on it.
Change-Id: Ie34b1e69bf26a1bde86931ce61168421429bf8f8
Retain compatibility with implementations compiled
against old headers or left unchanged from LMP.
Change-Id: I3f7cfaaf0cba8697c312940a805b053c6040caa6
Currently GmsCore has to guess how many locations to retrieve
based on requested frequency and then demux the output looking
for timestamps (that aren't monotonically increasing). This
capability gives GmsCore a more graceful solution.
Change-Id: Ie1d71615f699bc0d3c63f8b80aa7b40b9971cf96
Let HAL implementation tell if geofencing/batching is
supported and which technologies (GNNS, wifi, etc)
can be used.
Still todo: Add ability for GmsCore geofencing to
tell which technologies are supported (instead of
just using it to update monitoring). This requires
SystemApi change + approval so will do in separate CL.
Note that the classes in the lib are not copied
directly into GmsCore. The instance will always
be whatever is in the platform. This is why
the callback is backwards compatible as long as
their is a default implementation (but not if
it's abstract).
Change-Id: I7d6adeb049b89935bc4443785df5d7ef4c730e5d