383 Commits

Author SHA1 Message Date
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
Siddharth Ray
1d35540315 Added Channel for Network Initiated Notifications
Bug=37659896

Change-Id: I1c04a9455c320330efbcb92c352fc31b16ed8378
2017-05-02 20:44:08 +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
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
TreeHugger Robot
efb8882b47 Merge "ECBM SystemProperty cleanup" into oc-dev 2017-04-13 19:53:14 +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
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
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
Lifu Tang
047b05ea6e Added missing constants to GnssMeasurement
Bug: 27816668
Change-Id: Ib1638f5ac3941c4b6d9babca0acdc80df498e0af
2016-03-25 12:56:32 -07:00
Lifu Tang
145ff558ad Merge "A few changes to the measurement implementation" into nyc-dev 2016-03-22 23:08:39 +00:00
Lifu Tang
17350f925f A few changes to the measurement implementation
- Fixed the device crashing bug in JNI code
- Fixed a typo ('lock' => 'clock')
- Added hardware clock discontinuity count in toString()

(cherry picked from commit 3a21b02ee2dc8f2c6c879109757d89a2be5d720a)

Change-Id: I6dbda85abda20da0240ac08b22b81729eae7b6f0
2016-03-22 15:29:24 -07:00
Jeff Sharkey
620a28bad2 Merge "Mark more Bundles as being defusable." into nyc-dev 2016-03-18 19:54:52 +00:00
Julius D'souza
77e645123f Merge "CTS: Add @hide annotations to several @IntDef elements" into nyc-dev 2016-03-18 19:53:56 +00:00
Glenn Kasten
ff7c8b9e9d Fix CRLF
Change-Id: I6740b5fefae2f16d0ce247ff78e7cb5a6f3f8642
2016-03-18 12:30:09 -07:00
Julius D'souza
2b67c07d82 CTS: Add @hide annotations to several @IntDef elements
Bug: 27232186

Change-Id: Idd70359e22606a5ff21dfaffd119528cedd08b5a
2016-03-18 12:18:18 -07:00
Jeff Sharkey
a04c7a7c64 Mark more Bundles as being defusable.
They're destined for the system, so they're okay to look inside.

Bug: 27726127
Change-Id: Ic85c308a8efe6f9b8652952717c72b3c663d328a
2016-03-18 12:20:39 -06:00
Lifu Tang
275b4499bc Merge "Removed unused methods from GnssMeasurement" into nyc-dev 2016-03-17 19:23:40 +00:00
Lifu Tang
1778b030f7 Fixed bugs in serialization and object cloning
Bug: 27621461
Change-Id: I52cbf874d506cc5f6dee73d1a14b5dc07f87bd39
2016-03-17 10:40:47 -07:00
Lifu Tang
b9048f88ce Removed unused methods from GnssMeasurement
Bug: 27633183
Change-Id: I6304a431b75aaa338b6f22e6d213cd5f4f10cd60
2016-03-14 01:28:45 -07:00
Lifu Tang
0f1ab04516 Modified the API to make coverage test possible
Bug: 27462840
Change-Id: Idfd2c3c108b25f8be9046fd4bb72dbc57edc24bd
2016-03-09 11:32:43 -08:00
Lifu Tang
76a620f048 Addressed the review comments from API Council
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
2016-03-02 16:41:47 -08:00
Jeff Sharkey
f8880561e6 When system server goes down, crash apps more.
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
2016-02-27 17:17:01 -07:00
Lifu Tang
38bce7925c Removed clock type from GnssClock
Bug: 27341583
Change-Id: I5ffd891737c3ddf83d9c6a78aa36c94858591199
2016-02-25 15:46:41 -08:00
Lifu Tang
9363b949a1 Finalized GPS=>GNSS changes with documents
Bug: 27098594
Change-Id: I24529e60d8eb9b48b644cf01e5efc684e6f04839
2016-02-19 16:59:28 -08:00
Lifu Tang
120480f17a Optimized the memory consumption and renamed PRN
Bug: 27058251
Change-Id: I2309943b1a4e7565868ed0f247b84edc631fbd59
2016-02-11 11:29:40 -08:00
Lifu Tang
d46d308562 Worked around the crash caused by API renaming
Bug: 26885642
Change-Id: I1f1ad76d18444d5f250397ef491e1dd4858f0a1d
2016-02-02 17:25:32 -08:00
Lifu Tang
818aa2c2c4 Rename Gps to Gnss for measurement-related APIs
Bug: 26895757
Change-Id: I12d89dc251e356cf976a4bcd3589a8925a8ad745
2016-02-02 16:15:03 -08:00
Lifu Tang
e5a0e21b6f Framework support to read newly added fields
Change-Id: Ie43395addd102656a4dbf9c25111ac50ec9afe41
2016-01-27 18:01:33 -08:00