Commit Graph

453 Commits

Author SHA1 Message Date
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
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
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