403 Commits

Author SHA1 Message Date
Sundong Ahn
50cd1a972d Build com.android.location.provider with java_sdk_library
com.android.location.provider is built with java_sdk_library and api
files are added by running "make update-api".
Remove com.android.location.provider.xml since it will be
make auto generation by soong when the library is built with
java_sdk_library.

Bug:77577799
Test: make -j
Test: make checkapi
Test: adb shell cmd package list libraries |\
      grep com.android.location.provider
      And check the com.android.location.provider library

Change-Id: Iad0b4452fd87716c277235f3da6f3540aafdbed3
2018-06-07 12:08:35 +00:00
Jiyong Park
fa15a99fe9 Remove FlpHardwareProvider
After Treble's FLP merge into GNSS HAL, the FlpHardwareProvider is just
an empty shell. Removing FusedLocation and/or Flp + Hardware classes
altogether.

Bug: 35726697
Test: m -j
Test: Open Google Map and then walk around. The dot moves as I walk.

Merged-In: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
(cherry picked from commit 4cc3a1c056f69ac4da1dc5055c36b7357e9f673c)
2018-05-25 16:38:52 +09:00
Jiyong Park
409e5d25a9 Create the stubs lib for com.android.location.provider
com.android.location.provider.stubs is the stubs library for the shared
library com.android.location.provider. The stubs library is intended to
provide the stable set of APIs to the apps implementing location
provider.

Without the stubs library, apps had to directly link to the shared
library which is built without Android SDK and exposes private APIs that
are not intended to be used by apps. This also has been causing the
lin-type check warnings when the shared lib is used by apps built with
SDK; apps built with SDK is not allowed to link to lib built without
SDK. This has been reported as warnings but will soon be errors. Now
such apps are required to link to the stubs lib, which is built with
SDK.

While building the stubs library, following APIs are made hidden because
they are exposing private APIs from the Android platform.

1) Activity* classes are removed from the API, as they are not intended
to be used by apps since O.
2) GeocodeProvider and GeofenceProvider are removed from the API.
3) LocationProvider.mLocationManager is removed as it is exposing the
private symbol ILocationProvider
4) ProviderPropertiesUnbundle.getProviderProperties are removed from the
API as it is exposing the private symbol ProviderProperties.
5) The constructor of ProviderRequestUnbundled is removed since the
class is intended to be instantiated by the service.

Bug: 71420593
Test: m -j com.android.location.provider.stubs

Merged-In: I20aba7e9ca9c3adc75db241f37a55f0d657f3ced
Change-Id: I20aba7e9ca9c3adc75db241f37a55f0d657f3ced
(cherry picked from commit eee99986c8021d6825f99a25434725fccf7b2b12)
2018-05-25 16:30:22 +09:00
Anton Hansson
a3e79fbb8c frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Change-Id: Ibcffec873a693d1c792ca210fb597d2bf37e9068
Merged-In: I4233b9091d9066c4fa69f3d24aaf367ea500f760
2018-02-28 17:15:21 +00:00
Dan Willemsen
a56e4df08d Remove undefined all-aidl-files-under
This is not a defined function, and there are no aidl files under these
directories anyways.

Bug: 72661763
Test: find location/lib -name '*.aidl'
Test: find media/lib -name '*.aidl'
Change-Id: I000d8febd54a50d4c07b910fa374ac8019f696be
2018-01-29 16:41:43 -08:00
Siddharth Ray
168f12a056 Average of top 4 CNO
Addition of average of top 4 CNO to GNSS metrics

BUG: 62727230
Change-Id: Icef0ff5c25596fc1ae787907c0aea305eaf156d6
2017-07-10 19:00:27 +00:00
Wyatt Riley
7f2cfed525 Ensure complete GnssStatus construction
Using volatile reference & final member pattern.

Bug: 37517406
Test: basic GNSS & GPS Status output works
Change-Id: I5650149e0a3f63a52734c8f044d38f3956819921
2017-06-28 15:13:10 -07:00
Jeff Sharkey
28f6dc9512 Merge "Give Doclava our manifest; more permission docs." into oc-dev am: 65d4cbba37
am: 67cb5f5210

Change-Id: Ic4c30cdb8bbfda5b3703eb3c7c36c1bf8ab3a216
2017-06-06 16:17:39 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Jeff Sharkey
bfc4fcde9f Give Doclava our manifest; more permission docs.
We've seen some @SystemApi methods protected with non-system
permissions, so give Doclava the platform AndroidManifest.xml so it
can parse the actual permission protection levels to look for APIs
that are letting in non-system apps.

Also document more @SystemApi permissions.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api
Bug: 62263906
Change-Id: Ie0f0a5fb0033817bcc95060f2183a52ae4ae7b06
2017-06-05 17:38:19 -06:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Wyatt Riley
455c3037c1 Fix typo in Galileo TOW flag
Test: Builds, code inspect it's just comments.
Change-Id: I014f9a418f8d2845fbdc83f79298fe9f604e5f80
2017-05-11 10:06:47 -07:00
Siddharth Ray
dff73b6a04 Merge "Added Channel for Network Initiated Notifications" into oc-dev am: 84ed81ed39
am: e24e12df35

Change-Id: Id050d77a7df66451311713cdd54209109cda9d7a
2017-05-02 23:27:43 +00:00
Siddharth Ray
1d35540315 Added Channel for Network Initiated Notifications
Bug=37659896

Change-Id: I1c04a9455c320330efbcb92c352fc31b16ed8378
2017-05-02 20:44:08 +00:00
Yipeng Cao
f9045a9c52 Merge "Fixed the hasCarrierFrequency flag in GnssStatus (part1)" into oc-dev am: 80e1b2fc56
am: d78417d6cc

Change-Id: I804d261ffe382ea283fdbbd0e3973810a723315e
2017-04-29 22:49:26 +00:00
Yipeng Cao
2171781a7c Fixed the hasCarrierFrequency flag in GnssStatus (part1)
Bug: 37757180
Fixes: 37757180
Test: 1. built img locally and flash the device
make -j 40 
vendor/google/tools/flashall
2. run cts
cts-tradefed run cts -m CtsLocationTestCases --test
android.location.cts.GnssStatusTest

Change-Id: I5046dbe28518812192de20daca91a8511a1558c0
2017-04-28 02:11:59 +00:00
Yu Liu
4a1d2779d5 Merge "Remove newly added remove methods in Location and deprecate the old ones, this is the request from the android API council Test: Existing unit tests still pass. BUG: 36552859" into oc-dev am: 500c1d0749
am: 3c68867864

Change-Id: I3233a604cda1ca48fad524b5c02d54847d67cfc0
2017-04-19 01:46:47 +00:00
Yu Liu
b87243cb43 Remove newly added remove methods in Location and deprecate the old ones, this is the request from the android API council
Test: Existing unit tests still pass.
BUG: 36552859

Change-Id: Ib4cdcef90be3d5b3be329dd780bcb40275b89ef4
2017-04-18 16:12:16 -07:00
Yu Liu
c831fe6183 Merge "Fix some issues came up from the reviews of the newly added APIs Test: Existing unit tests still pass. BUG: 36554361 Change-Id: I6c2dab2e0df7f8578f92c70907f45aa69909892c" into oc-dev am: e425b366ba
am: 5303f33bdc

Change-Id: I138cf20ba4b804fb3627458acf6796203c37be39
2017-04-14 15:30:05 +00:00
TreeHugger Robot
efb8882b47 Merge "ECBM SystemProperty cleanup" into oc-dev 2017-04-13 19:53:14 +00:00
Yu Liu
5303f33bdc Merge "Fix some issues came up from the reviews of the newly added APIs Test: Existing unit tests still pass. BUG: 36554361 Change-Id: I6c2dab2e0df7f8578f92c70907f45aa69909892c" into oc-dev
am: e425b366ba

Change-Id: I371260b7a82bbda02f978c2396385c96fd03ec66
2017-04-13 19:34:48 +00:00
Yu Liu
0e342e1fdb Fix some issues came up from the reviews of the newly added APIs
Test: Existing unit tests still pass.
BUG: 36554361
Change-Id: I6c2dab2e0df7f8578f92c70907f45aa69909892c
2017-04-12 23:02:35 +00:00
Shuo Qian
cfe9e61ce4 ECBM SystemProperty cleanup
- Add getEmergencyCallbackMode() method in the TelephonyManager.java
to get the boolean value for ECBM callback mode from the phone through
ITelephony.aidl/java interface

- Use the added TelephonyManager Api to replace the 'get' of
PROPERTY_INECM_MODE system property in the framework/base

Change-Id: I83fbdeef5c0b43a8fc16ece044c9e191e9922bce
Test: manual
Bug: 30361624
2017-04-12 22:36:00 +00:00
Shuo Qian
c77146ceb1 Merge "ECBM SystemProperty cleanup" am: 4718606368 am: 40cde7b71f am: 36611a0958
am: 56d3af6680

Change-Id: Ida75e1835bc99a328baeee71b6838581800916b0
2017-04-12 22:11:17 +00:00
Shuo Qian
56d3af6680 Merge "ECBM SystemProperty cleanup" am: 4718606368 am: 40cde7b71f
am: 36611a0958

Change-Id: Ib68a4e3b34ad4d76e4b254350b523eaa424b30f9
2017-04-12 21:11:58 +00:00
shuoq
d199113e97 ECBM SystemProperty cleanup
- Add getEmergencyCallbackMode() method in the TelephonyManager.java
to get the boolean value for ECBM callback mode from the phone through
ITelephony.aidl/java interface

- Use the added TelephonyManager Api to replace the 'get' of
PROPERTY_INECM_MODE system property in the framework/base

Test: manual
Bug: 30361624

Change-Id: I355d69820b157f23e077a95a13f8509ee0fa5874
2017-04-11 14:59:29 -07:00
Siddharth Ray
bb608c8958 Addition of GNSS key performance indicator logs
Bug: 35963181
Test: Manual
Change-Id: Ibbc8986eb5c52b8e0065b5fd2fdb8579eda11949
2017-04-05 12:00:08 -07:00
Soonil Nagarkar
681d711200 Throttle GNSS measurements and GNSS navigation
messages in background (completely).

Test: manual
Change-Id: I32e3572c5ce32cd39b22e62f6b3499d292e1badc
2017-02-24 12:28:32 -08:00
Wyatt Riley
cf879db366 GNSS Batching - Default Implementation
Connections from .hal layer, through to
Location Manager System APIs

Bug: 31974439
Test: builds, boots, ordinary GNSS & new GNSS batching
      basic functional checks on Marlin
Change-Id: If75118c27b5ed34cfc16c9f817b60a3be5485095
2017-02-07 14:55:21 -08:00
gomo
d1e856cb9e Make the comments of some of the raw GNSS measurements more clear.
Test: Existing unit tests still pass.

Change-Id: I8c0a506b2c9f7979f8cdb33c9e65db53ff1c4b2b
2017-01-22 22:45:09 -08:00
gomo
127ba323d9 Unhide public methods for API Council review.
Test: Existing unit tests still pass.
Change-Id: I49b81f99e4e8d8300fbc6b3d74f336d4f291d171
2017-01-18 19:48:28 -08:00
gomo
4402af6be9 GNSS O Features according to go/o-gps-hal
Added "Tow Known" as a possible gnss measurement state. As well added Automatic Gain Control (AGC)
to allow jammer detection. Also added the GNSS carrier frequeny to SV status. Also added vertical
GPS position uncertainty, speed uncertainty and bearing uncertainty. Also propagate locaton new
fields to geofence engine.
Test: Existing unit tests still pass.

Change-Id: I472b2fd2516cb7614877dea4bb054a34f50844dc
2017-01-15 18:02:21 -08:00
Wyatt Riley
a2bbfbcf89 Removing @removed methods and constants
Several methods, plus a few hashmaps,
helper classes, and some constants
existed for an early builds
of NYC, and were marked @removed, and are
here finally removed.

Bug: 28208055
Change-Id: If650d83c0dc573e922342d09360ecf9a5bb0c98a
Fixes: 28208055
Test: GMaps, AndroiTS GPS Test, GnssLogger & CtsVerifier
      All run fine on a Pixel
2016-12-23 13:18:16 -08:00
Jeff Sharkey
c06f184ae9 Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
2016-12-02 15:17:20 -08:00
Hridya Valsaraju
2ea296029f Modify GnssLocationProvider to use Treble Gnss HAL
Test: GPS functionality tested in binderized and pass-through modes on
Angler. All interfaces except AGnssRil, GnssNavigationMessage and
GnssNi. AGnssRil and AGnssNavigationMessage are not implemented by conventional
GPS HALs in Google devices that would be upgrading to O.

Change-Id: Ie4decb4c47892725c8c89bad3f48581550facff7
2016-11-23 17:16:59 -08:00
Jeff Sharkey
850c83e6da Move dump() to dumpAsync(), more oneway calls.
When calling out to dump services hosted by external apps, use
dumpAsync() to avoid hanging if the remote process is wedged.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: I70aa2666ae21dae8f09ded2063bed359c0b210c5
2016-11-09 12:25:48 -07:00
Jeff Sharkey
0a17db1cc5 Detect non-oneway calls leaving system_server.
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces.  It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.

This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into.  Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
2016-11-07 17:03:37 -07:00
Lifu Tang
4e82fe5120 Fix GNSS status delivery to the callbacks
Bug: 32357457
Change-Id: I8f2b8dae5472cb81313417e85c092dca0aae5bd9
2016-10-24 13:33:47 -07:00
Kevin Hufnagle
eed2c7d661 docs: Fixed misspelling in "Address" class overview.
am: b10a6dc963

Change-Id: I226f72cd0618166e61a95d95598c95a037e0b670
2016-09-26 23:30:19 +00:00
Kevin Hufnagle
b10a6dc963 docs: Fixed misspelling in "Address" class overview.
Bug: 30608455
Change-Id: Ic7d8492b15eeffe32393c018f3512101d5f0bcae
2016-09-22 16:14:27 -07:00
David Christie
30fe9229c5 Fix issue where GnssMeasurements wouldn't allow empty measurements.
Bug: 29966456

Change-Id: Ie74ed921d4ebe43e3ec086ef8fb96d54f992fa38
2016-07-07 14:07:48 -07:00
Gina Dimino
98ad88811c Docs: Suppress errors in SystemApi Build
Bug: 28427390

Change-Id: Ifea85bf7b1fcdd30a3d7f61bd17d0efba6368aa4
2016-06-01 16:13:53 -07:00
Wyatt Riley
f6527aebbc Adding SBAS offset to Gps/Gnss SvStatus converter
Opposite sign of Glonass & BDS offsets.  Noticed after screenshot search & further testing.

Bug: 28623392
Change-Id: I6a7c98f455ee7df278eed985ba57ec1c12d888e0
2016-05-24 09:25:02 -07:00
Wyatt Riley
49d9891c57 Mapping up/down of legacy Gps vs. Gnss Status
- Maps incoming (from HAL) GpsSvStatus for Glonass, Beidou, SBAS, and QZSS
  from defacto (NMEA-like) numbers to internal platform with detected constellation.
- Maps outgoing (to Java API) GpsStatus getSatellite info back into the de-facto
  overloaded (beyond 32) "GPS" ID numbers.
- Simplifies Glonass ID definition for N (comments only.)
- This enables GPS/GNSS Test apps a non-degrading upgrade path.

Bug: 28623392
Change-Id: I9a19db1f11267032c6927daed767df5afa51c770
2016-05-19 09:55:42 -07:00
Lifu Tang
e50607efab Fixed the sign error in GnssClock
Bug: 28068514
Change-Id: I71b68acb70d4139f94f3829bd4a280d926e251de
2016-04-08 14:10:42 -07:00
Lifu Tang
e8abe8e5ad Addressed API review comments and updated JavaDoc
Bug: 27274532
Bug: 27948390
Change-Id: I0255d2511deab788dcab9815def9c1287a50b7f9
2016-04-06 17:54:35 -07:00
Lifu Tang
e296ab692a Merge "Returns the correct elevation in GnssStatus" into nyc-dev 2016-03-30 19:52:57 +00:00
Glenn Kasten
0f5e32d8eb Merge "Fix CRLF" into nyc-dev 2016-03-30 19:41:05 +00:00
Lifu Tang
4fb5dc1e4a Returns the correct elevation in GnssStatus
Bug: 27902867
Change-Id: I57ea191e531305268d4a87f9d444425f20ef7f8e
2016-03-29 13:15:02 -07:00
Lifu Tang
a89a392aef Merge "Added missing constants to GnssMeasurement" into nyc-dev 2016-03-28 18:22:28 +00:00