Commit Graph

443 Commits

Author SHA1 Message Date
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
Yu-Han Yang
a9b72b30eb Update JavaDoc of LocationManager#requestLocationUpdates
Bug: 111522117
Change-Id: If92dd8b2517769ef2964c671fcbd41b58e8727f2
Fixes: 111522117
Test: n/a (javadoc only)
2018-07-23 11:06:31 -07:00
Yu-Han Yang
241898259e Release wakelock in LocationManagerService if client thread is dead
- also put a timeout on the wakelock so that it won't be held forever.

Bug: 111321558
Fixes: 111321558
Test: Tested on device.
Change-Id: I36e90f73143ff12d8622dbbb3aad643b283d17ce
2018-07-16 17:39:24 -07:00
Wei Wang
25bc14e91f Improve document for Location#setExtras(Bundle).
Bug: 69682430
Test: it compiles
Change-Id: I4e2d0ab05faa8cd8c08cd19b130a1022ae1068f0
2018-05-21 19:26:12 -07:00
Wyatt Riley
b95c4e8847 Merge "Simplify Javadoc for easier parsing." into pi-dev am: f707c55725
am: 0e34c367a1

Change-Id: I5ed07e3aff0f363190985633e1c0310abd7a848f
2018-05-14 18:40:49 -07:00
Wyatt Riley
5b630af857 Simplify Javadoc for easier parsing.
Change-Id: I48abfa8eb8ccfd031d2364ef9acfa39d4bec4cb4
Fixes: 76874150
Test: Builds & comment-only
2018-05-11 11:21:05 -07:00
Philip P. Moltmann
33115156f9 Expose APIs used by CtsPermissionTestCases
Test: atest CtsPermissionTestCases
Bug: 77604428
Change-Id: Ib5e9b678e98aab86dac90610ed071eb89f14fce9
2018-04-26 09:40:57 -07:00
Yu-Han Yang
9240f1fe02 Merge "Update Java doc of GnssMeasurementEvent#STATUS_NOT_ALLOWED" into pi-dev am: d5a1bb621a
am: ac1a1280f0

Change-Id: I6f941e0e7028eec19e55d0a74ce0de95ec4bc37f
2018-04-23 21:19:29 -07:00
TreeHugger Robot
d5a1bb621a Merge "Update Java doc of GnssMeasurementEvent#STATUS_NOT_ALLOWED" into pi-dev 2018-04-24 04:01:56 +00:00
Yu-Han Yang
e048bab281 Update Java doc of GnssMeasurementEvent#STATUS_NOT_ALLOWED
Bug: 74218424
Test: N/A
Change-Id: Icf7fae3b252ce44d3a82cdce06b4dd78026f6fb7
2018-04-10 15:35:06 -07:00
Philip P. Moltmann
325f7284d9 Merge "Expose TestAPIs needed by GtsOsTestCases" into pi-dev am: d565f04957
am: e2e7dd4eda

Change-Id: I57cbfacd181876b65447e5fe7497c83802a55b60
2018-04-09 09:17:38 -07:00
Philip P. Moltmann
f80809ffd7 Expose TestAPIs needed by GtsOsTestCases
Test: atest GtsOsTestCases on pi-dev:taimen and oc-mr1:sailfish
Bug: 77497338
Change-Id: I5de976991a857bfbed2faa943822af542601fa8b
2018-04-06 14:59:07 -07:00
Maggie Wang
8a5425e103 Merge "Fix test location provider bug" into pi-dev am: 4f79a18cc5
am: 542c52372c

Change-Id: Ic45d9f719ae064085a598024be85d13a4f3a00c3
2018-04-03 16:47:04 -07:00
Maggie Wang
4f79a18cc5 Merge "Fix test location provider bug" into pi-dev 2018-04-03 20:44:29 +00:00
Maggie
2a9409e914 Fix test location provider bug
LocationManager.isProviderEnabled should return true for a test provider if:
1. A test provider is added through LocationManager.addTestProvider
2. The test provider is enabled through LocationManager.setTestProviderEnabled

This fix changes the logic if LocationManager.isProviderEnabled and
LocationManager.setProviderEnabledForUser to allow users get/set test
location provider status.

Bug: 72647543
Bug: 77238940
Test: Manual
Test: run cts --module CtsLocationTestCases -t android.location.cts.LocationManagerTest
Change-Id: Ib241e5b487fd873c1fa0d7ac34b82b8592fc0906
2018-04-03 18:56:47 +00:00
Siddharth Ray
312a394aa1 Merge "Add Battery time to location dumpsys" into pi-dev am: b1d14ec3e1
am: e5893a78ad

Change-Id: I1acdeaf8012f231267c9e49e0eb71527935395d6
2018-03-29 06:09:27 +00:00
Siddharth Ray
b30c0b7477 Add Battery time to location dumpsys
BUG:73494617

Test: Manual
Change-Id: I162831387e65eff9856be8befe2b53b12ebf45f2
2018-03-27 15:24:53 -07:00
Wyatt Riley
8a26977813 Merge "Deprecating unused fields from GnssMeasurement" into pi-dev am: a106a1a6b4
am: ea5ad6d83f

Change-Id: Idab41f714fba955b9043db3cfe70915c452647f5
2018-03-23 14:02:39 +00:00
TreeHugger Robot
a106a1a6b4 Merge "Deprecating unused fields from GnssMeasurement" into pi-dev 2018-03-23 13:41:46 +00:00
Wyatt Riley
0d909e574f Merge "GNSS Model Name constant string and comment updates" into pi-dev am: aa8cbab151
am: c0b6f1db3e

Change-Id: Ife249a2ce6508299199042b38612df3092c13502
2018-03-22 16:33:08 +00:00
Wyatt Riley
aa8cbab151 Merge "GNSS Model Name constant string and comment updates" into pi-dev 2018-03-22 16:10:08 +00:00
Jiyong Park
c296e7f805 Merge changes I7f413e38,I20aba7e9 into pi-dev am: 4d6dc48d24
am: 189cc7df45

Change-Id: I725063a24bd1c5713cfbdd63753b8fdb0d552a26
2018-03-22 01:41:21 +00:00
TreeHugger Robot
4d6dc48d24 Merge changes I7f413e38,I20aba7e9 into pi-dev
* changes:
  Remove FlpHardwareProvider
  Create the stubs lib for com.android.location.provider
2018-03-22 00:29:38 +00:00
Maggie Wang
c2ac5721c2 Merge "Fix location settings bug on non-GPS devices" into pi-dev am: b2637dac49
am: d57c508f5d

Change-Id: Ie05fbbeb119657cbae102e33baccf1677d1f4ba8
2018-03-21 23:58:33 +00:00
Maggie Wang
b2637dac49 Merge "Fix location settings bug on non-GPS devices" into pi-dev 2018-03-21 22:02:03 +00:00
Maggie
83e03f5559 Fix location settings bug on non-GPS devices
The old location_mode API hardcoded gps and network location provider when it enables/disables location, without checking whether the providers exist on device.
It causes bugs when used together with the new
LocationManager.setLocationEnabled() APIs.

This fix modified LocationManager.setLocationEnabled() API when user
tries to disable location on device. Besides turning off the providers
from LocationManager.getAllProviders(), it also turns off GPS and
network provider explicitly.

To reduce times of binding to the service and chance of race condition, we also
modified SettingsProvider.updateLocationProvidersAllowedLocked() to
accept a string param with multiple location providers to be
enabled or disalbed at the same time.

Bug: 73261572
Test: Manual on chromebook
Change-Id: I2e59e0d4cf395b98cd481af5d7f3c762274d7826
2018-03-21 12:14:47 -07:00
Yu-Han Yang
1f1008a6fc Merge "Merge "Fix docs for LocationRequest#setLowPowerMode()" into pi-dev am: dbad69dd42" into pi-dev-plus-aosp
am: 840f101124

Change-Id: I351efbe3ccd3130928ad43c1575299ad816a77f7
2018-03-21 07:44:05 +00:00
Jiyong Park
4cc3a1c056 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.
Change-Id: I7f413e38b57424e8ebb9d7d14d94f145a48d10f8
2018-03-21 10:36:44 +09:00
Yu-Han Yang
b640517a2e Fix docs for LocationRequest#setLowPowerMode()
Bug: 74218111
Change-Id: Ib77a58c21e2cc3601221c8b5cc13eb416dccfbc9
Fixes: 74218111
Test: N/A
2018-03-20 17:04:59 -07:00
Wyatt Riley
4cbcb411b1 Deprecating unused fields from GnssMeasurement
Deprecating CarrierPhase, that are redundant
with AccumualtedDeltaRange fields (that remain in place)
Adding additional enum per partner feedback

Bug: 71908529
Bug: 72405353
Test: GnssLogger on device GnssMeasurement screen & file

Change-Id: I524e47aa9420d83d87b22334378e0c9a800cf179
2018-03-16 13:12:14 -07:00
Victor Chang
9c617f5677 Make the GnssStatus constructor public and mark as hidden.
Android Things user-driver model for GNSS requires that the GNSS driver
to be implemented by the developer in Java and have its updates
forwarded down to the GNSS framework. This means that the developer will
need to be able to create GnssStatus objects.

A GnssStatusBuilder class is being added in ag/3726284, intended to be
used to create GnssStatus objects. We do not intend for the developer to
construct a GnssStatus object directly, so while this constructor is
being made public, it's also being marked as hidden.

Test: Builds.
Change-Id: Ie8e75e2bc264fe8b1981afebb3f4d10fadd89915
2018-03-16 17:56:53 +00:00
Wyatt Riley
49097c0b99 GNSS Model Name constant string and comment updates
Addressing API review feedback
Removed string, returning Null instead
Updated comments

Bug: 73951626
Test: Runs on device w/GnssLogger
Change-Id: I54d05a7ae000e9ff52ec1f6646f83aed7de81b94
2018-03-15 10:52:12 -07:00
Maggie
2e17d3f4f8 Remove javadoc for return value
LocationManager#setLocationEnabledForUser has documentation for return value even though it's void. Fix the bug by removing the return javadoc.

Bug: 73751024
Test: Manual
Change-Id: I785e9f08674f472fe0f248972d5cc6055e64412a
2018-03-02 11:46:59 -08:00
Jeff Sharkey
98af2e4fec Add RequiresFeature annotation.
Certain APIs require that a device have a specific feature to operate
correctly, so start annotating them.

Test: builds, boots
Bug: 72284763
Change-Id: Ie2f30284bdfdb6acc4067f434eba3b5433837606
Exempt-From-Owner-Approval: simple annotations
2018-02-16 20:45:22 +00:00
Maggie
9ca162532e Check for null LOCATION_PROVIDERS_ALLOWED value
After reading LOCATION_PROVIDERS_ALLOWED value from settings provider,
check for null first.

Bug: 72711160
Bug: 72732478
Test: Manual
Change-Id: I813e40f11f078d80c4cc20986f030fdadfe433c6
2018-02-07 16:19:42 -08:00
Maggie Wang
6fdf781aa7 Merge "LocationManager constants for footer injector" 2018-02-06 02:35:24 +00:00
Maggie
589f038d63 LocationManager constants for footer injector
Add broadcast actions and metadata names in LocationManager for
injecting footers under Settings -> Security & Location -> Location.

Bug: 70350519
Test: Manual
Change-Id: I4d187a54cd87d8964d84bfef44515ac9ef77db29
2018-02-01 18:23:13 -08:00
Lifu Tang
c84d42e7d6 Remove unused methods from LocationManagerService
Test: Built and Manually tested
Change-Id: I7e13d51864d86054eb9394704927dc4d449c0b13
2018-02-01 18:56:53 +00:00