427 Commits

Author SHA1 Message Date
Andrei-Valentin Onea
10c573ff85 Merge "Add @UnsupportedAppUsage annotations" 2019-03-07 17:26:15 +00:00
Andrei Onea
8c2fb5b99b Add @UnsupportedAppUsage annotations
For packages:
  android.database
  android.hardware.display
  android.hardware.input
  android.hardware.location
  android.location
  android.media
  android.media.projection
  android.media.tv

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
Merged-In: I570c08292f8a9f512c96f9dce13f5337718f112c
Change-Id: I1d6c60fcb53f404d5775163bf6929395921f5a45
2019-03-06 15:39:19 +00:00
Andrei Onea
cf1a82953b Add @UnsupportedAppUsage annotations
For packages:
  com.android.internal.app
  com.android.internal.appwidget
  com.android.internal.location
  com.android.internal.os
  com.android.internal.policy
  com.android.internal.statusbar
  com.android.internal.telecom
  com.android.internal.telephony
  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
Merged-In: I6eba34467b2492047e5264684312adfa029eb317
Change-Id: I413c4b6dd12bcf40b69423718ed278cbefe82087
2019-02-28 17:01:29 +00:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Mathew Inwood
55418eada5 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: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08: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 8c854f86a477fbbee38092f449333e1425e5cd7e)
2018-10-22 17:28:24 -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
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
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
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
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
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
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
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
b30c0b7477 Add Battery time to location dumpsys
BUG:73494617

Test: Manual
Change-Id: I162831387e65eff9856be8befe2b53b12ebf45f2
2018-03-27 15:24:53 -07:00
TreeHugger Robot
a106a1a6b4 Merge "Deprecating unused fields from GnssMeasurement" into pi-dev 2018-03-23 13:41:46 +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
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
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
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
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
Siddharth Ray
d679a767b4 GPS power metrics
Power metrics is added to GPS metrics

BUG:72383800

Test: Manual
Change-Id: I6b01c04984b750c6e079e26b2ad4730d647be382
2018-01-30 10:12:15 -08:00
Lifu Tang
7c30c68cc5 Move location-related code into client library
These first-party only methods can only be called by privileged
packages, and Settings.Secure already applies strict permission check to
them. Therefore moving the code into client library can save us from
unnecessary binder calls, and can also make checking the caller package
name much easier.

Test: Manual
Change-Id: I76a939a660357f87b01ff4ac07ec3f17093d3c41
2018-01-26 16:42:05 -08:00
Maggie
aa080f9676 Deprecate location modes
1. Mark public fields as deprecated: LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY,
LOCATION_MODE_BATTERY_SAVING, LOCATION_MODE_OFF.

2. Add new public  methods to LocationManager:
setLocationEnabled(boolean)
isLocationEnabled()
setLocationProviderEnabled(String, boolean)

3. Remove LOCATION_PREVIOUS_MODE and constant
LOCATION_MODE_PREVIOUS. Refactor code that references
LOCATION_MODE_PREVIOUS to use LocationManager.setLocationEnabled or
LOCATION_MODE_HIGH_ACCURACY.

4. Mark deprecated fields and methods as removed: LOCATION_PROVIDERS_ALLOWED, setLocationProviderEnabled(), isLocationProviderEnabled()

5. Refactor logic in Settings app and Quick Settings to call
LocationManager.setLocationEnabled() instead of setting location mode.

Bug: 70990911
Test: Manual
Change-Id: Ia49b385f8b6a358b62291983eb0146af0ecf8e02
2018-01-23 10:45:49 -08:00
Siddharth Ray
f87fe48456 Merge "GPS Signal Quality added to BatteryStats" 2018-01-19 21:40:07 +00:00
Siddharth Ray
78ccaf5d28 GPS Signal Quality added to BatteryStats
- GPS Signal Quality (Top four average CN0) added to Batterystats
(Aggregate + Historian)

- Added API to obtain Gps battery stats for power drain diagnostics.

BUG:38354997

Test: Manual
(https://docs.google.com/document/d/1X6g7HBZ80GA3KuqEYyQtD0WQRUnXN8nbCpf0G1HvzqY/edit?usp=sharing)

Change-Id: Ic23bfa758977bf0677f368f617b0c28196d2d0c1
2018-01-15 17:24:07 -08:00
Ram Periathiruvadi
8671feab63 Add a hidden API to inject location.
New API allows system clients with LOCATION_HARDWARE and
ACCESS_FINE_LOCATION to inject a location to the Location Manager.  This
is useful in products like Auto, where the location needs to be cached
across reboots.

Bug: b/64125396
Test: Foll. were tested:
1. location can be injected when lastLocation is not available
2. location cannot be injected when lastLocation is already available
Also, tested location availability on different devices for sanity.
Change-Id: I1fd060caafed0431074ae64439ac52e99e0d6032
2018-01-08 08:25:17 -08:00
Wyatt Riley
d87cf91762 Providing GNSS Model Name & Year
GNSS Model Year moves from a TestApi to public
GNSS Model Name is connected from a new .hal to public

Bug: 38003769
Test: Builds, works with CTS & Test App on Pixel 2
Change-Id: I3e0a56c60e1a4d298e120df11ffd37b06ecea050
2017-12-21 13:07:03 -08:00
gomo
48f1a64765 Duty Cycling and Low Power Mode GNSS feature implementations
Implementaion of 2 GNSS Android-P features:
- The Duty Cycling API to enable high accuracy applications development
- The Low Power Mode GNSS API to save power when indoor

Bug: 64009176
Test: Existing unit tests still pass.
Change-Id: I3ba3b86a635a54927c694fdd66a038757e843937
2017-12-13 13:38:31 -08:00
Maggie
fab2e2cbaa Send MODE_CHANGING broadcast before location mode change.
When location mode is about to change in Settings app, send
MODE_CHANGING broadcast.

Fixes: 28057031
Test: manual
Test: robotests
Change-Id: Id26325520211a8934c1670dfcd12e8d339766308
2017-12-07 23:22:35 +00:00
TreeHugger Robot
bb6468ba73 Merge "Fixing javadoc typo from gerrit 3027804" 2017-10-31 23:52:11 +00:00
Wyatt Riley
818347f056 Fixing javadoc typo from gerrit 3027804
Bug: 65369254
Test: Automated build/sanity only - just a comment change
Change-Id: I819b2f11f91454719269927ae93382253170938e
2017-10-31 14:12:27 -07:00
Wyatt Riley
e10c61a5f7 Clarifying GnssClock field
Based on partner feedback

Test: Doc only - build-check
Change-Id: I30ba539f5baad69aeb6973167067265b22964cc4
2017-10-25 14:13:56 -07:00
Wyatt Riley
252e0908bd Location & GNSS Measurement Documetation Fixes
Clarifying documenation of SNR, Vertical Accuracy, and
Accumulated Delta Range.

Change-Id: I2684c57e0f4aff2925549e01cbe4f546910f93e0
Fixes: 65369254
Test: Builds (comments only)
2017-10-18 15:27:30 -07:00
Wyatt Riley
70e34ce4c5 Correcting Speed and Bearing Uncertainty Doc
Test: Build by treehugger, code review as comments only.
Change-Id: Ib072bf42c51af8e91ae7554097e839316956dea1
2017-08-31 08:47:24 -07:00
Wyatt Riley
43336af356 Remove misleading Location Accuracy comment
Test: Treehugger to verify build (comment only)
Change-Id: Iea3c473219e21a58b01e613d14700d6972f5cce6
2017-08-08 15:24:44 -07: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