Commit Graph

388 Commits

Author SHA1 Message Date
Anil Admal
3ba0fa9999 Add separate hasCapabilityName() methods in GnssCapabilities
Fixes: 130802613
Test: Verified on a Pixel device.
Change-Id: I00418f12004b28de666ec2a73203611f73af3e18
2019-04-19 18:26:46 -07:00
Yu-Han Yang
284234ea8c Log constellation types in GnssMetrics
Bug: 121157068
Test: on device
Change-Id: I9e2c1238e46422f9c11b748567c2741ed95aeaa0
2019-04-12 18:22:05 +00:00
TreeHugger Robot
433bb84545 Merge "Adding documentation to getElapsedRealtimeUncertaintyNanos following api council guidance." into qt-dev 2019-04-08 17:13:58 +00:00
Pierre Fite-Georgel
d017319f57 Adding documentation to getElapsedRealtimeUncertaintyNanos following api council guidance.
Test: N/A comment only
Bug: 129769397
Change-Id: I906494b0b72898149322959f5900626a12d6d86b
(cherry picked from commit d6d4d1efa2)
2019-04-06 00:44:46 +00:00
Yu-Han Yang
3cd9a8631c Change elapsedRealtimeUncertaintyNanos from long to double
Bug: 129166160
Fixes: 129166160

Test: builds and existing tests passed
Change-Id: I948382a9e486b8ddc1ba6a9fe0fd9bb88e9bfb71
2019-04-05 23:23:51 +00:00
Anil Admal
312fddb323 Update getGnssCapabilities() in LMS to include sub-HAL capabilities (part 2)
Implement the getGnssCapabilities() method in LocationManagerService
class to return the capabilities exposed through the GnssCapabilities
class. This part 2 is a follow up to CL ag/6776830.

Bug: 128913861
Test: Tested with cuttlefish and blueline device.
Change-Id: I766e8dc841b5f329d1773e5b37076ed99c55ebf6
2019-04-02 16:17:43 -07:00
Wei Wang
114922a8fa Address API council review comments.
Rename the setters and getter for location package extra. The getter is
not used by prebuilt apps, so they are renamed directly. The setter is
used by GmsCore, so mark as @removed for now.

Bug: 123587501
Test: Manual

Change-Id: Ia5167d20aff92242036e3642a176fe2ab03d8a52
2019-03-26 16:11:18 -07:00
TreeHugger Robot
c90040e0b3 Merge "Add elapasedRealtimeNanos and elapsedRealtimeUncertaintyNanos to GnssClock" 2019-03-22 18:04:53 +00:00
Yu-Han Yang
5d3dcd5625 Add elapasedRealtimeNanos and elapsedRealtimeUncertaintyNanos to GnssClock
Bug: 128713045
Test: atest GnssClockTest
Change-Id: I5950184202cfbb3b7a7a777b88045d0fb3ea98b1
2019-03-21 17:39:57 -07:00
Chad Brubaker
39392304c5 Merge "Add location backed system clock" 2019-03-21 16:23:31 +00:00
Yu-Han Yang
6b49665d79 Add CONSTELLATION_IRNSS constant in GnssStatus
Bug: 119270132
Test: builds and existing tests passed.
Change-Id: Ida9c33ddf87d799ff6e46dab7312d4e3dfc66d33
2019-03-20 17:47:22 -07:00
Chad Brubaker
f113333b98 Add location backed system clock
This provides a permissionless way to use the location (e.g. GNSS)
provided time data for more accurate time keeping.

Test: atest LocationManagerTest#testGnssProvidedClock
Bug: 123530510
Change-Id: Ifbc45997868040abbb3e1399a8649911afb0af05
2019-03-20 16:10:08 -07:00
Anil Admal
500b316a02 Merge "Update getGnssCapabilities() in LMS to include sub-HAL capabilities" 2019-03-20 23:05:12 +00:00
Anil Admal
993497864e Update getGnssCapabilities() in LMS to include sub-HAL capabilities
The GNSS capabilities in the gnss@2.0 HAL have been refactored
(b/128028791, b/127434062, b/128309220). The sub-HAL capabilities
in the top level IGnssCallback.hal have been moved into their
respective sub-HALs. Consequently, the getGnssCapabilities()
method in LocationManagerService is hereby modified to include
the capabilities from all sub-HALs and the top level HAL.

A new GnssCapabilities class needs to be added so that we don't
expose the implementation details of the capabilities (a Java
int bitmask of capability flags) to the LocationManager client.

Bug: 128913861
Test: TBD
Change-Id: I5ed90332c7c0e783de771f573a58f79d1d6d89ff
2019-03-20 09:51:39 -07:00
Soonil Nagarkar
eaffea6d57 Update API documentation
Add information on exact API level for intent extra.

Bug: 128904083
Test: manual
Change-Id: Ie45feeea43b0fed72bee682b1c6a2076a2f85824
2019-03-19 12:31:28 -07:00
Soonil Nagarkar
3126c90786 Add PROVIDERS_CHANGED_ACTION extra for provider
Give clients a way to know which providers have changed state, useful
since LOCATION_PROVIDERS_ALLOWED will be removed in the future.

Bug: 127372321
Test: manual
Change-Id: I16c0acbaad97930bea23084b50193582cc918fa2
2019-03-18 12:00:44 -07:00
TreeHugger Robot
2df78c38f8 Merge "Address API review comments" 2019-03-16 18:56:36 +00:00
TreeHugger Robot
7475b9b7bf Merge "Change CodeType from enum to string (framework)" 2019-03-15 02:07:11 +00:00
Lifu Tang
0f69b15099 Address API review comments
- Add comment to clarify that onGetSummary() is only called on K and Q
- Annotate context parameter as @NonNull

Bug: 123222995
Test: Build and flash
Change-Id: I18ea3c80031a344be03307ca7fc26beb76288698
2019-03-14 12:35:42 -07:00
TreeHugger Robot
9c5458edb7 Merge "Remove deprecated Settings APIs." 2019-03-14 17:06:04 +00:00
Soonil Nagarkar
d55e1b1788 Merge "Revert removal of GpsStatus APIs" 2019-03-14 04:23:13 +00:00
Soonil Nagarkar
a491b7abb1 Revert removal of GpsStatus APIs
Bug: 126698813
Test: manual
Change-Id: I174d3f4cd21259e59381fc79990005c644380065
2019-03-13 17:36:44 -07:00
Yu-Han Yang
fbcc5cf0b7 Change CodeType from enum to string (framework)
Bug: 127464982
Fixes: 127464982

Test: atest GnssMeasurmeentTest
Change-Id: I127b33207712ea25780deb8bbb7c1155582508b0
2019-03-13 15:45:33 -07:00
Soonil Nagarkar
6dac9d1bf5 Remove deprecated Settings APIs.
Bug: 128348646
Test: manual
Change-Id: I40dbfc78ee983ffacc56a68d2c5ba2aefb16357f
2019-03-13 10:13:31 -07:00
Tyler Trephan
6c58d5b2df Fix bug setting the 9th bit of a mFieldsMask byte.
Fix: 127516341
Test: Passed LocationTest CTS test.
Change-Id: Ib56daccd33e6362434e466211236a5eb4d3a4610
2019-03-12 16:42:37 -07:00
Soonil Nagarkar
1cc1db0ab2 Merge "Remove unused broadcasts from GNSS" 2019-03-07 04:48:02 +00:00
Mohammed Khider
3b989d0f31 Merge "Bluesky: Handle null correction objects gracefully." 2019-03-06 23:02:56 +00:00
gomo
5716ab8855 Bluesky: Handle null correction objects gracefully.
Allow any correction elements to be null and handle that gracefully.

Test: Existing tests pass and as well tested GPS on device.
Bug: 111441283
Bug: 126699094
Bug: 126699206
Bug: 126699579
Change-Id: Idbab6eefae485f62b86570f54228d79e15b861cb
2019-03-06 02:55:57 -08:00
Soonil Nagarkar
00fe7e2d78 Remove deprecated GNSS APIs + add nullability
Cleans up location APIs by removing old deprecated APIs (deprecated
since API 24) and adding nullability annotations everywhere.

Bug:126698813,126701422,126702274
Test: built
Change-Id: I6caf7f9778100bb3eee53178c25ce1694fb2d395
2019-03-05 16:38:45 -08:00
Soonil Nagarkar
d08180c49f Remove unused broadcasts from GNSS
Test: manual
Change-Id: Iad78fac0071a443d75cfc1d57b25017db7f84de3
2019-03-05 16:04:18 -08:00
Colin Cross
0e9cf5151a Merge "Revert "This CL introduces new member variable on android.location.Location (see api/current.txt)."" 2019-03-04 23:19:58 +00:00
Colin Cross
cef1e80327 Revert "This CL introduces new member variable on android.location.Location (see api/current.txt)."
This reverts commit 9e96c57083.

Reason for revert: b/127312065

Change-Id: I8e7248efd74f2a4e6b0a491e5afe03568214cd23
2019-03-04 23:17:53 +00:00
Pierre Fite-georgel
bbc8ad9991 Merge "This CL introduces new member variable on android.location.Location (see api/current.txt). In this CL, I pushed location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos()); (from Java)" 2019-03-02 02:36:30 +00:00
Pierre Fite-Georgel
9e96c57083 This CL introduces new member variable on android.location.Location (see api/current.txt).
In this CL, I pushed
   location.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos()); (from Java)

Test: This patchset include a CTS test for location.java changes.
Bug: 121353225
Change-Id: I606e23175e2fb6405660ed032b41c9996f1ba0c8
2019-03-01 15:20:21 -08:00
Kweku Adams
f6410681b9 Merge "Adding new Battery Saver location mode." 2019-03-01 22:17:29 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
If they were null, then the Parcelable would fail to work.

Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
2019-02-28 23:29:04 -07:00
Kweku Adams
4fb074e7f4 Adding new Battery Saver location mode.
When this new mode (LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF) is
enabled, LocationManagerService will avoid sending almost all
LocationRequests to providers. The only requests that will continue to
be sent will be providers are the requests that ignore location
settings.

Bug: 121256487
Bug: 122849003
Bug: 119261320
Test: atest android.os.cts.batterysaving.BatterySaverLocationTest
Change-Id: Iee95a6fb5ca11d4db7a0f0661bf3cb1051a5d710
2019-02-28 14:55:39 -08:00
Andrei Onea
da6e570f1e Add @UnsupportedAppUsage annotations
For packages:
  android.database
  android.hardware
  android.hardware.display
  android.hardware.input
  android.hardware.location
  android.location
  android.media
  android.media.tv
  android.media.projection

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I570c08292f8a9f512c96f9dce13f5337718f112c
2019-02-27 13:31:11 +00:00
gomo
3796ab1bf3 Bluesky API council review
Making method names clearer and adding more annotations.

Bug: 124882841
Test: Current Tests Pass.
Change-Id: Ic36f9ac6e69280f3efa9f812fee1ff6e4e4b1773
2019-02-21 15:28:25 -08:00
Soonil Nagarkar
5140e4fb86 Add API to expose ignore settings whitelist for GTS
Bug: 124517571
Test: manually
Change-Id: I846f9112c3cc3dde1466ff13e740ccf72c16b833
2019-02-15 19:29:06 +00:00
Soonil Nagarkar
509580fbdf Refactor API naming and add unbundled support
Rename APIs while there are no clients. Also prevent throttling when
location settings are being ignored.

Bug: 118883513
Test: manual
Change-Id: I225c50b152e77ab181c959ecd9dc652333f59d5e
2019-02-13 13:34:45 -08:00
Yu-Han Yang
786a2bd746 Add GnssMeasurementState::STATE_2ND_CODE_LOCK to GnssMeasurement API
- Also updates the Javadoc of getReceivedSvTimeNanos

Bug: 123297074
Test: builds and tested on cuttlefish
Change-Id: I96c828b2e66545a3615689cc299585511e13f9bf
2019-02-12 11:26:31 -08:00
TreeHugger Robot
e27f8dabbd Merge "Add CODE_TYPE_OTHER and otherCodeTypeName to GnssMeasurement API" 2019-02-07 20:27:04 +00:00
Yu-Han Yang
a3214010db Add CODE_TYPE_OTHER and otherCodeTypeName to GnssMeasurement API
Bug: 112260995
Test: atest GnssMeasurementTest
Change-Id: Ie4a7ed0a866cd93b85d2bd81fbde1f7b72760e04
2019-02-06 15:48:29 -08:00
Soonil Nagarkar
11a7994c7a Merge "Add TestApi annotations to LocationManager" 2019-02-05 21:07:52 +00:00
Soonil Nagarkar
ec2718d4e8 Remove unused API
getNetworkProviderPackage() has been replaced by isProviderPackage().

Bug: 123766886
Test: manually
Change-Id: I39eda1910af0d298beabc224ab33c35190d0e21f
2019-02-04 17:52:59 -08:00
Soonil Nagarkar
0d77ea6893 Change provider packages API to test all providers
This will replace the LocationManager.getNetworkProviderPackage() API
with LocationManager.isProviderPackage(). The network provider should
not be considered special.

In addition, providers now have the ability to specify additional
packages that may make location requests on their behalf, so that those
packages can be considered location providers as well.

Bug: 117177078
Test: manually
Change-Id: I204b56e7bb40874ac3347988474fb8afa787feb8
2019-02-04 10:58:24 -08:00
Soonil Nagarkar
ac1879ab06 Add TestApi annotations to LocationManager
Expose some APIs for CTS tests.

Bug: 123766886
Test: N/A
Change-Id: I4fe7d05cf13c3cff793803297698452c1bfc247e
2019-02-04 10:29:10 -08:00
Soonil Nagarkar
2348248e80 Merge "Fix location ignore settings bugs" 2019-01-31 01:59:20 +00:00
Soonil Nagarkar
835a0a07a7 Fix location ignore settings bugs
Whitelist not properly initialized and LocationRequest settings not
properly serialized.

Test: manually
Change-Id: I3e8a8883dcf8859e6684e092818121b3360d3f17
2019-01-30 14:58:52 -08:00