Commit Graph

480 Commits

Author SHA1 Message Date
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
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
Soonil Nagarkar
5e185019f0 Location settings documentation and migration
-Add new LOCATION_MODE_ON for internal use only
-Update location docs for Q
-Fix egregious copy/pasta bug

Bug: 118883513
Test: NA
Change-Id: I5c04786f912f1b8db33930449ae2ba5854a55981
2019-01-30 14:42:04 -08:00
gomo
6ec9538233 Bluesky add position uncertainty field
Add the horizontal position uncertainty for the provided location
by Bluesky at which the corrections are computed.

Bug: 111441283
Test: Existing tests pass.
Change-Id: I396bfce10deb9561b9f4d128b1f6a9641dedc3cc
2019-01-29 16:20:13 -08:00
Soonil Nagarkar
be93e9cc5b Add location settings piercing in emergencies
Add new field to LocationRequest that allows clients to ignore location
settings, and validate this field. Support returning location to clients
with this field even when location settings are turned off.

Bug: 118883513
Test: Manual + CTS
Change-Id: Idf4449ae7c20d03f42410936c35fadc602e83d11
2019-01-22 14:29:17 -08:00
gomo
b4635ba90d Bluesky change LOS from bool to float prob
Change the field indicating that the GNSS satellite is line of sight
or not from boolean to a float representing hte probability of being
line of sight.

Bug: 111441283
Test: Existing tests pass.
Change-Id: I746d7b16dcbb7c8968163f512a70aac7511402b6
2019-01-18 11:16:01 -08:00
TreeHugger Robot
a32c79d362 Merge "Add CodeType to GnssMeasurement API" 2019-01-15 18:55:03 +00:00
Soonil Nagarkar
48273286e5 Merge "Use LOCATION_MODE to control location" 2019-01-10 22:47:48 +00:00
Soonil Nagarkar
90da1ab3d2 Use LOCATION_MODE to control location
Completely deprecate LOCATION_PROVIDERS_ALLOWED (but still support it).
Adds additional locking and @GuardedBy annotations where appropriate,
and some minor code cleanup is copied from previous CLs.

Bug: 118885128
Test: Manual + CTS
Change-Id: I3c0b4b2354a4c2b6a120fc467af60cb3409dd671
2019-01-10 14:43:43 -08:00
Anil Admal
d71cf1499b Add emergency session extension duration (framework)
Add new method in IGnssConfiguration.hal to pass emergency
session extension duration to GNSS HAL implemenation so that
network initiated emergency location requests can be served
for this extra duration post emergency call.

Bug: 121204694
Test: GNSS HAL implementation not ready. So, tested with code
      instrumentation that this configuration parameter is
      called only for GNSS HAL 2.0 implementation.

Change-Id: I845cc13412d9027b7924bfcffecbf6438f2e4be7
2019-01-09 12:16:31 -08:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
TreeHugger Robot
7a01a91477 Merge "Bluesky Android Q Platform Changes" 2018-12-21 06:34:19 +00:00
gomo
226b7b7775 Bluesky Android Q Platform Changes
- Changes to C++ HAL and GNSS Location Provder Code to inject
corrections to chipset
- Changes to JNI bridge to translate the Java corrections to C++
- Changes to JAVA side of the bridge: GnssLocationProvider.cpp to pipe
the corrections through the JNI
- Build the Locaiton Manager First Party APIs and methods
- Build needed Java containers: GnssMeasuremetCorrections.java,
GnssSingleSatCorrections.java and ReflectingPlane.java
- Build the Parcelables to send all our Java objects through processes
- Build piping methods in CallbackTransport.java,
LocationMangerservice.java, etc to pass the data in both direcions
- update API docs: current.txt and system-current.txt

Bug: 111441283
Test: Existing tests pass.
Change-Id: I8650fea21c69c8f31ba9cabe63d4a6676ffe38d7
2018-12-20 15:27:08 -08:00
WyattRiley
a828d1d606 Merge "Adding SUPL NI Emergency Extension Time" into pi-dev am: 73c242793f
am: ac488cd7c5

Change-Id: I9f43a4bfc4f22229b10fbc8bc061d31fc8284904
2018-12-20 11:50:50 -08:00
WyattRiley
ac488cd7c5 Merge "Adding SUPL NI Emergency Extension Time" into pi-dev
am: 73c242793f

Change-Id: I2b2c76c98ba4460fff8ccba57e7b86acc3ec6575
2018-12-20 11:42:50 -08:00
Yu-Han Yang
5400946b92 Add CodeType to GnssMeasurement API
Bug: 120277977

Test: builds and tests passed.
Change-Id: Id7f59d083b52e3179e60db560a2d84d1a94c402f
2018-12-19 14:36:13 -08:00
TreeHugger Robot
e48e378bee Merge "Add APIs to set Location History package name." 2018-12-15 05:10:30 +00:00
Wei Wang
980b7c20d6 Add APIs to set Location History package name.
The package name will be used by Permission Controller to properly
handle permissions for location history package.

Bug: 119226131

Test: manually tested on device
Change-Id: I522517272c132a054c44489d16626509cf2b42ee
2018-12-12 16:48:51 -08:00
Lifu Tang
78e0756ece Undeprecate injector API to allow change summary
Bug: 120236748
Test: build, flash, and test manually
Change-Id: I96042f51ce3fe32d15596b026f802f89dabf8405
2018-12-12 11:30:31 -08:00
Soonil Nagarkar
cae8ed62b4 Merge "Refactor how location providers are managed" 2018-12-10 22:25:21 +00:00
WyattRiley
a725dd6650 Adding SUPL NI Emergency Extension Time
Configurable by carrier config.xml resource

Bug: 118839234
Bug: 115361555
Bug: 112159033
Test: On device, see b/115361555#comment14
Change-Id: I52e61656cca8b6fa6468d32d2e69bf60f4c83c61
2018-12-10 10:51:20 -08:00
Soonil Nagarkar
1575a04e7b Refactor how location providers are managed
Put enabled/disabled state under location provider control, and use it
to represent whether a location provider may be used, not whether the
user has enabled or disabled a location provider.

Bug: 118885128
Test: manually
Change-Id: I1209c49c13ca8995b223f383ad332322fffc7a96
2018-12-10 10:29:17 -08:00
Anil Admal
75b9fd6de3 Show location icon when reporting GNSS measurements/status
GNSS measurements and status can be used to compute user location.
Hence, the location icon must be turned on in the status bar to
notify the user every time the measurements are reported to an
application. Also, check for location permission before delivery
as the application may have lost location permission.

Bug: 113332106
Test: Tested it manually using GNSS logger application.
Change-Id: I985610cab207af50a84e7e47390c51359375bb78
2018-12-05 18:15:51 +00:00
Philip P. Moltmann
c20f1b78a9 Revert "Allow location provider to deep link into permissions UI"
This reverts commit ed98828335.

Reason for revert: The exposed API is not needed anymore

Test: Built
Bug: 118437704
Change-Id: I155eb0f7241327b34ea5beaabee514ba2a018998
2018-11-27 17:03:24 -08:00
Soonil Nagarkar
94749f7ad1 Deprecate location provider status callbacks
Deprecate and remove logic around location provider status.

Bug: 118885128
Test: Tested manually on device
Change-Id: I68289cb5ed22e66532847758c36155a4ce607bbc
2018-11-26 23:19:00 +00:00
Bookatz
48d362e323 Statsd atom: GpsSignalQuality
Gps Signal Quality is used in the BatteryStats power usage calculations,
so it should also be logged to statsd.

Bug: 113524439
Test: Turned GPS on and made sure a signal level was logged
Change-Id: Id770ec549bbb47621f2585b9dbd09333f78656d1
2018-11-14 11:59:20 -08:00
TreeHugger Robot
a737061a3f Merge "Update javadoc for carrier phase alignment in getAccumulatedDeltaRangeMeters" 2018-11-09 23:47:28 +00:00
Yu-Han Yang
10ecc846da Update javadoc for carrier phase alignment in
getAccumulatedDeltaRangeMeters

Bug: 112260995
Test: javadoc update only.
Change-Id: I08877b656a629f6a930255f6d5172fe7652cf276
2018-11-08 16:49:22 -08:00
Philip P. Moltmann
ed98828335 Allow location provider to deep link into permissions UI
Test: Built
Bug: 118437704
Change-Id: I566acaf09bad27a47ec3822816c136c01b18bfc9
2018-11-08 09:11:05 -08:00
Nathan Harold
41e2d7494f Merge "Move some members to the "Q blacklist"." am: f5cf9f24ed
am: 13c9e7e2f3

Change-Id: Ia2419cce28d26d9464da2a5172cb332b629e943e
2018-10-24 16:14:06 -07:00
Mathew Inwood
45d2c252b1 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 8c854f86a4)
2018-10-22 17:28:24 -07:00
Philip P. Moltmann
39e00d53c9 Add Doc and nullability to LocationManager#getNetworkProviderPackage
Test: Built
Bug: 116798569
Change-Id: Iead34b0f93e4f5331ba49ec0d170f1ec0db0d4c3
2018-10-08 16:37:06 -07:00
Todd Kopriva
62e668cc6c Merge "docs: bug 37130805, typo" into pi-dev am: 7c5c4d1ca8
am: 0afec3a1ba

Change-Id: Ia83041c3b857d313d6e40f53cd0de3d4d68f85ef
2018-10-02 13:59:57 -07:00
Todd Kopriva
0afec3a1ba Merge "docs: bug 37130805, typo" into pi-dev
am: 7c5c4d1ca8

Change-Id: I687b0cd961d714a012e389122d01271800ddc376
2018-10-02 13:21:59 -07:00
kopriva
5ba798e9d1 docs: bug 37130805, typo
I fixed an extra 'and' while I was at it.

Test: make ds-docs

Bug: 37130805

Change-Id: Ia1e9a991f824253feca628022414f2e1fbdcfea8
Exempt-From-Owner-Approval: Docs-only change
2018-10-01 14:38:57 -07:00
kopriva
b7b399ed76 Merge "docs: fixing several minor documentation bugs" into pi-dev am: 82b0d17b39
am: f6b27fbff0

Change-Id: I14f98e023001c75719ab8b891db6abf3f0fd4564
2018-09-20 17:12:29 -07:00
kopriva
f6b27fbff0 Merge "docs: fixing several minor documentation bugs" into pi-dev
am: 82b0d17b39

Change-Id: Ieb1447c0d7cda629338de8d6e03f46670d8ed0b0
2018-09-20 16:55:47 -07:00
kopriva
f07a46058c docs: fixing several minor documentation bugs
Test: make ds-docs

Bug: 36949243
Bug: 116169695
Bug: 37001248
Bug: 37044885
Bug: 37053166

Change-Id: I844a8978518cd7214bf9d068d602902dfa7e8246
Exempt-From-Owner-Approval: Docs-only change
2018-09-20 11:20:27 -07:00
Mathew Inwood
8c854f86a4 Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
2018-09-14 13:18:34 +01:00
Philip P. Moltmann
71225ecc0c Expose LocationManager#getNetworkProviderPackage as @SystemApi
The PermissonController is going to become a mainline module, hence it
has to compile against @SystemApi.

The permission controller needs to know which package is the network
provider as it treats the location permission of the location provider
page special.

As far as I understood the current API is not protected. I would like to
leave adding the protection to the location team.

Bug: 110953302
Test: Built
Change-Id: Ic0691bd2254137273160ee6c2e6bb10257205d54
2018-08-31 11:30:57 -07:00
Mathew Inwood
aa3a71bd85 Merge "Add @UnsupportedAppUsage annotations" am: df82ab2de2
am: b6c87140c7

Change-Id: I659cfb3d4b18ccaf860721f5908a0d6d4814b3b1
2018-08-22 07:18:53 -07:00
Mathew Inwood
c185f08c4a Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.widget

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: I1c2954c5a579f073017c1794fd2d200e0a471602
Merged-In: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:28:54 +01:00
Mathew Inwood
af972c802d Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal
  com.android.internal.annotations
  com.android.internal.app
  com.android.internal.app.procstats
  com.android.internal.appwidget
  com.android.internal.backup
  com.android.internal.car
  com.android.internal.content
  com.android.internal.inputmethod
  com.android.internal.location
  com.android.internal.logging
  com.android.internal.midi
  com.android.internal.net
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony.euicc
  com.android.internal.textservice
  com.android.internal.util
  com.android.internal.view
  com.android.internal.view.animation
  com.android.internal.view.menu
  com.android.internal.widget

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: Ib31b52e6957869e5744dadbb35cb4584ef17187f
2018-08-20 14:13:20 +01:00
Mathew Inwood
42197c1b35 Merge "Add @UnsupportedAppUsage annotations" am: fd07385fea
am: d1299b89dd

Change-Id: I6409a83bb9223930eaa2bfbd51e54bc354411f7f
2018-08-16 02:56:55 -07:00
Siddharth Ray
0d5cb9a5de Merge "Add HW Revision to GNSS Metrics" into pi-dev am: b0b70b8e87
am: 66dcecd4a7

Change-Id: Ia350d430cda47cce23f5c3e81ee06dfa7261a51c
2018-08-15 12:30:46 -07:00
Siddharth Ray
dcbed5fbe6 Add HW Revision to GNSS Metrics
Test:
adb shell dumpsys location
Hardware Version: EVT2.0

BUG:112541087
Change-Id: I6278188f15f22ff7b4f5cc30c4c225e0f95ec53d
2018-08-13 15:57:02 -07:00
Mathew Inwood
8eb07d9011 Add @UnsupportedAppUsage annotations
For packages:
  android.location

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: I74c0dba2a25f1a4c3991e19221a277efe9230f3b
Merged-In: I2e49951f49072866906ecb8fba133ff16293e65a
2018-08-09 16:52:22 +01:00
Mathew Inwood
735497ed3e Add @UnsupportedAppUsage annotations
For packages:
  android.location

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: I2e49951f49072866906ecb8fba133ff16293e65a
2018-08-09 16:44:32 +01:00