History log of /frameworks/base/services/core/java/com/android/server/LocationManagerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4257db35fe7333a40329b8d107b8e30fd547d3d9 24-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Refactor GnssBatchingProvider" into pi-dev
3557cc71ea9fe06e4352ce8657d2a4ea1c144994 21-Mar-2018 Yu-Han Yang <yuhany@google.com> Refactor GnssBatchingProvider

Bug: 77974758
Fixes: 77974758
Test: m -j ROBOTEST_FILTER=GnssBatchingProviderTest RunFrameworksServicesRoboTests

Change-Id: I907265358abdd5486dc1040c7d7bf912942bcb1d
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
a2b4cc9ea09755ebe88adba5896d8fe7753c5955 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adding Location Request History Foreground Tracking" into pi-dev
f7075e05e2368e99f0529e5544c5686fb1232f61 13-Apr-2018 Wyatt Riley <wyattriley@google.com> Adding Location Request History Foreground Tracking

Improving adb shell dumpsys location in light of
Background Location Limits

Bug: 73598719
Test: atest and on-device verification
Change-Id: I0b24d14f1557a36d9162770c9bc7081d9787d0cf
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
519f0d079256a5f7199a9067cf782406cb3a6cbe 13-Apr-2018 Lifu Tang <lifu@google.com> Mark location-related PendingIntents as restricted

Bug: 77237719
Test: build and flash a device
Change-Id: Id12792aca29fef6adff4943c551c03e6eb6e851c
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
2a9409e91457c175be5ee36d3e676a70dc52bdca 21-Mar-2018 Maggie <yiranwang@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
aa8cbab151f4df89e3e2c7f3df36b005e01d8558 22-Mar-2018 Wyatt Riley <wyattriley@google.com> Merge "GNSS Model Name constant string and comment updates" into pi-dev
4cc3a1c056f69ac4da1dc5055c36b7357e9f673c 08-Mar-2018 Jiyong Park <jiyong@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
49097c0b99c0fda9f5343406d28027a726bb94ee 15-Mar-2018 Wyatt Riley <wyattriley@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
c84d42e7d6eb63781d4ad7b39171554d5fa07e97 01-Feb-2018 Lifu Tang <lifu@google.com> Remove unused methods from LocationManagerService

Test: Built and Manually tested
Change-Id: I7e13d51864d86054eb9394704927dc4d449c0b13
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
91e630c4eeaa74b9843c3e384f770fa82e0270c4 25-Jan-2018 Maggie <yiranwang@google.com> Fix location QuickSettings bug

Problem: LocationManager.getAllProviders() is only returning "network" for Quick Settings. The root cause is getAllProviders() method is filtering results by permission when it shouldn't.

1. Remove permission check logic in getAllProviders.
2. Exclude PASSIVE_PROVIDER from setLocationEnabled and
getLocationEnabled.

Bug: 72495506
Test: Robo
Test: Manual
Change-Id: I37a2238d094ffbdff788e90b71d1e70b81fca79a
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
3bcddc94acd311af599a8dc6548b22474b63ca38 25-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Chained attribution for GnssLocationProvider."
9ebcf05596ec242a601924df46a951459ca59a72 24-Jan-2018 Maggie <yiranwang@google.com> Fix location INTERACT_ACROSS_USERS bug

Use UserHandle.getCallingUserId in LocationManager.isProviderEnabled

Bug: 72430849
Test: Manual
Change-Id: I1ddfc4fd308889b1f2247df038d22e2f7b08da74
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
32684ddf3c4b377c6fd6dccd2119942c0afb04f5 08-Jan-2018 Narayan Kamath <narayan@google.com> Chained attribution for GnssLocationProvider.

The change is slightly more involved than similar changes in this area
because GnssLocationProvider doesn't treat WorkSources as opaque, it
tries to compute diffs between them (using the only call to
WorkSource.setReturningDiffs in the platform). It also uses WorkSources
tags to make calls to AppOps.

Some of this can be improved generally, but this change is narrower in
scope and only tries to improve battery related attribution.

Test: BatteryStatsTests
Bug: 62390666

Change-Id: Ie28bc91d74d3a0c3b6aaef6ba7c59fc58633efb1
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
aa080f96763a9d38f21fb33de93216cd207a5930 05-Jan-2018 Maggie <yiranwang@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
11cc74913d7c5c06ae12ea232a53918c0959fc86 17-Jan-2018 Wyatt Riley <wyattriley@google.com> GnssMeasurementsListener - Fix indexing, add & remove

Safer indexing open requests by IBinder instead of IInterface
Covers GnssNavigationMessage as well.
Also dumping currently open GnssMeasurement & NavMsg requests

Bug: 71917458
Test: Able to repro issue consistently before, fixed after
logs look as expected as well, on Pixel 2

Change-Id: I2e4722a23355295a5f597541f31a3b77534cadd7
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
8671feab630c1938691f44502ff7be9c7b03e7c4 09-Dec-2017 Ram Periathiruvadi <ramperry@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
d87cf9176237bd3233edded7dbb9276226d764dc 05-Dec-2017 Wyatt Riley <wyattriley@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
48f1a647655f3479bc655d2c3c4873c6aa9b712c 11-Nov-2017 gomo <gomo@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7a222661b523c6a51ac61b9f939eb594776c6307 20-Nov-2017 Olivier Gaillard <gaillard@google.com> Update LocationManagerService wakelock tag to follow the naming
convention.

Tags of Wakelocks with a WorkSource should use the naming convention
*tag*. This will help app developers to understand which wakelocks come
from the platform.

Test: n/a

Change-Id: I7bd51ebb3db04e06bbd05e964efef9743fcaa6da
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
0eb9738d1708d9aa7846782046e6828ffc9fe901 04-Oct-2017 Todd Kennedy <toddke@google.com> Move mPermissions from package settings

Create a settings class only for use with permissions. It's
subservient [and should only be accessed directly by] package
settings or the permission manager. The rest of the permission
related data needs to be moved to permission settings. At
which point we can start pulling the permission methods out of
the package manager service and into the permission manager.

We still have a somewhat tight relationship between package
manager and the permission manager. It's unclear how far we need
to separate them and if relying entirely on an internal
interface is sufficient.

Bug: 63539144
Test: Manual. Builds and runs
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.PermissionsHostTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermissionTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsPermission2TestCases
Test: bit FrameworksServicesTests:com.android.server.pm.PackageManagerSettingsTests
Change-Id: I616184fa2135a11687e4ce615884f861466fdebe
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b376b3b57379cfe4e1c32ec0aa6b3e774ec82187 06-Sep-2017 destradaa <destradaa@google.com> Fix inconsistent permission check in LocationManager.

Ensures there is a consistent permission check between the LocationManager APIs:
- getProviders(Criteria, boolean)
- getAllProviders()

Bug: 24776299
Test: ran LocationManagerTest#testGetProviders from CTS
Change-Id: Ia0d5a510a6cdb34df1f53bb0b3885aa295ba51ae
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
069897258548c5ccf6c6c684d66b6343336fc5a7 22-Jul-2017 Wyatt Riley <wyattriley@google.com> Merge "Fix RemoteListenerHelper vs. HAL deadlock" into oc-dr1-dev
am: ec996b381d

Change-Id: I345871c43857d1d0e01377a50e9745ce3c598955
aa420d5e1432d8669ecc10a52246e734b4eea156 04-Jul-2017 Wyatt Riley <wyattriley@google.com> Fix RemoteListenerHelper vs. HAL deadlock

Releasing lock before calling into HAL.

Fixes: 62776535
Bug: 63264577
Test: Build, GNSS location & GnssMeasurement toggling
Reproed issue with test sleep code without fix and passed with.

Change-Id: I44e183e98edd972619a068bbcc95468e9a9cdee1
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
e056b0d8314a546d1875c23e01a076f6598b57d1 21-Jun-2017 Soonil Nagarkar <sooniln@google.com> Move UID update code to location thread to prevent ANRs.

BUG: 62776535
Test: Not tested
Change-Id: Icecb6b32c9bf637fa15cf13a0c44ab3d29de1658
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
d4def0c6b4bfde47ab8d0e77f5f08795e485cb87 24-May-2017 Soonil Nagarkar <sooniln@google.com> Properly battery blame throttled location requests

Bug: 37552457
Fixes: 37552457
Test: manual

Change-Id: Iba980eb885b5a6465bafc12c9ee35831b7a4ff31
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
ebda0286d4326c67d9e13202180f37ee41b5323a 10-Apr-2017 Soonil Nagarkar <sooniln@google.com> Fix foreground importance bug in LocationManagerService.

Bug: 37121975
Test: tested locally
Change-Id: I2563408d10edfac74d04d68116cbf2a2ac66e9a3
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
bb608c8958a96b450094417482ba05126ce0c8f0 16-Mar-2017 Siddharth Ray <siddharthr@google.com> Addition of GNSS key performance indicator logs

Bug: 35963181
Test: Manual
Change-Id: Ibbc8986eb5c52b8e0065b5fd2fdb8579eda11949
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
fe9a53bc45fd0124a876dc0a49680aaf86641d3e 31-Mar-2017 Jeff Sharkey <jsharkey@android.com> Consistent dump() permission checking.

This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access. It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
681d71120041b769fb2ca3938f4016239ed744fe 24-Feb-2017 Soonil Nagarkar <sooniln@google.com> Throttle GNSS measurements and GNSS navigation
messages in background (completely).

Test: manual
Change-Id: I32e3572c5ce32cd39b22e62f6b3499d292e1badc
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
2b565df36710371be066d4f5186c9a02833831ce 14-Feb-2017 Soonil Nagarkar <sooniln@google.com> Use SystemConfig to control background location throttling whitelist.

Test: manual

Change-Id: I51285f9a463381855f2bb3fa9af34af1930b8ebd
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
e5d975cdffc29aa8f9390f001e15d2eb0f19ce82 08-Feb-2017 Wyatt Riley <wyattriley@google.com> Merge "GNSS Batching - Default Implementation"
cf879db3666523404ff7e15e77b11434732b4a06 12-Jan-2017 Wyatt Riley <wyattriley@google.com> 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
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
de6780acb62e948ed4ddadc6e06ff13db89c16eb 07-Feb-2017 Soonil Nagarkar <sooniln@google.com> Set default throttle to 30m.

Test: manually

Change-Id: Ib8ce75819095af7e01124a2c55c3a96f7c38740c
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
2f1f7e8d68a5408b0fd1967b15b0766ba3318f5d 24-Jan-2017 Soonil Nagarkar <sooniln@google.com> Add background location throttling whitelist support.

Test: manually

Change-Id: I6754fbb8f5eaf7bec3e469a9f25ac4a77965ea50
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7decfb6b76f73505946a3da32faa7b36d77e87c4 18-Jan-2017 Soonil Nagarkar <sooniln@google.com> Add background location throttling to LocationManagerService

Test: manual tests
Change-Id: I27f060d2f5338a8750dcbe5cbe4cfadb4edb0464
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7cec76de0fed67bff9feace9ff44e337744cb64b 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872 am: 3380a77516 am: 0a8978f04b am: 1684e5f344 am: d28eef0cc2 am: 1f458fdc66 am: d82f8a67fc am: 1ac8affd51
am: 56098f81b6

Change-Id: I14fcacaede569580c8ca8e5bbbebb408ddcce76a
d82f8a67fc453953a89ed2cd4c783a85cc9b3547 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872 am: 3380a77516 am: 0a8978f04b am: 1684e5f344 am: d28eef0cc2
am: 1f458fdc66

Change-Id: I61d4b25ee0264397693f30e2091997c058d0c5fc
1f458fdc66c27977a2f93ba473d120aad190282a 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872 am: 3380a77516 am: 0a8978f04b am: 1684e5f344
am: d28eef0cc2

Change-Id: If937d91cee2bb06406cf3cd1ae6ac3402a51e88d
1684e5f344e385a88c5f672619c4aeaed9417957 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872 am: 3380a77516
am: 0a8978f04b

Change-Id: I693665a57465ec57f946fad57cda9ce48389408f
0a8978f04b4cc2e273545568b424756ee5a40a3d 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e am: d417e54872
am: 3380a77516

Change-Id: Ice61f337e1fcfd0569431538e475d94f9d205423
3380a775163f480f39d41572b06c433d45d42f79 22-Dec-2016 Tom O'Neill <tomo@google.com> Fix exploit where can hide the fact that a location was mocked am: a206a0f17e
am: d417e54872

Change-Id: I2f47020055f962b36f095137d75c9cbfe6b1a6db
a8037fffd3d95822a186b3008825f71eb8b00344 05-Aug-2016 Wyatt Riley <wyattriley@google.com> LocationManager - Handle Shutdown for right User

Only process a shutdown when it is for all users (whole system),
not a single user

Change-Id: Id51b7fb4606460462c2f6749e5ac3984bdd8319f
Bug: 30646142
(cherry picked from commit 1b24fb17b8613894d6066dcf408e60caf2a56192)
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
e998c73c3380f525b218cd95a3d3f575935c5222 10-Jun-2016 Svet Ganov <svetoslavganov@google.com> Blame only location observers that actually receive updates

The location manager service keeps update records for all apps
registered to receive location updates. If an app does not have
the location permission then its update record is skipped when
dispatching location updates. However, the battery blame is spread
across all apps requesting location updates even if they don't
receive such because of lacking permission.

bug:28804546

Change-Id: Iee96fd6f304c7a49f9c70484e52abc0ed1538a29
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
6b4893a2d169649a2e2a2efa5343f696712cc5df 04-May-2016 destradaa <destradaa@google.com> Update verbosity of hardware providers.

Uses a debug log for logging of messages related to hardware providers
that are not mandatory in the device.

Bug: 28530304
Change-Id: Ief1f193f934e7ebe7077366aafaa913b216e3481
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
7f98aa4aa93497692f200c553d2d6fff402e3de2 07-Apr-2016 Fyodor Kupolov <fkupolov@google.com> Added getProfileIds method returning array of userIds

Previously many usages of UserManager.getProfiles and getEnabledProfiles
were only using ids of returned users. Given that the list of users needs
to be parceled and unparceled for Binder calls, returning array of ids
minimizes memory usage and serialization time.

A new method getProfileIds was introduced which returns an array of userIds.
Existing method calls were updated where appropriate.

Bug: 27705805
Change-Id: Ic5d5decd77567ba0f749e48837a2c6fa10e812c0
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
9363b949a104786c87cd2cd18f206ff3c1957e5e 17-Feb-2016 Lifu Tang <lifu@google.com> Finalized GPS=>GNSS changes with documents

Bug: 27098594
Change-Id: I24529e60d8eb9b48b644cf01e5efc684e6f04839
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
818aa2c2c46addae934fb6cd42f889affc9ef747 01-Feb-2016 Lifu Tang <lifu@google.com> Rename Gps to Gnss for measurement-related APIs

Bug: 26895757
Change-Id: I12d89dc251e356cf976a4bcd3589a8925a8ad745
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
82f893d6df236d257ab2142dd63e72865a5e4f00 22-Jan-2016 Lifu Tang <lifu@google.com> Added an API to query GPS hardware version info

Change-Id: Ic45357d30da350759f56c9d061e60196acb3255b
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
30f95a7d67870c28d2aaa88ee989c099f5670225 08-Jan-2016 Lifu Tang <lifu@google.com> Supported GNSS multi-constellation in frameworks

Change-Id: I82574afd3697c47e806d2cfaedc33756d0353b73
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
2e38507b70d49985c16c9bc07b1ad8fe7f71c899 15-Oct-2015 destradaa <destradaa@google.com> Fix exception while shutting down FLP HW

Bug: 24877230
Change-Id: I7c342641b87ae6b1fd3623e4436fd985f67e1848
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
a4490622207804ef85f39439ff7b9cb2470f6287 23-Sep-2015 Xiaohui Chen <xiaohuic@google.com> Cleanup USER_OWNER in activity and location services

Bug: 19913735
Change-Id: Ie2b7acb3fa53b1dcf7319de1eb5bdec585dbf78c
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b902698632be50231d1597a38200a44026c1c94f 28-Aug-2015 destradaa <destradaa@google.com> Clean up Gps/Flp Hardware on shut-down.

Ensures that the GPS and FLP HAL interfaces are deinitialized upon
system shut-down. This gives a chance for the underlying HAL to
close cleanly any resources it could be holding.
Note this approach only works for a device's power-off, scenarios
such as adb shell stop / start cannot be handled, because in such
cases the process is terminated sending SIGKILL to it.

Bug: 23279835
Bug: 23279593
Change-Id: I29b3306c0ae2b384d0542031080a15fdbe49dd71
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
e1a5144a1ddded30dca1e1425739649032a86bac 24-Jun-2015 destradaa <destradaa@google.com> Cherry-pick: Add callback-based support for HW Activity Recognition.

Add a callback-based mechanism for GmsCore to connect to Hardware Activity
Recognition. This allows GmsCore to stop polling to identify if the Android
platform supports the functionality or not.

Bug: 17112184
Change-Id: I8f9459cbd15eecd70f6919c6551e6f7a663c732f
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
6e2fe75624c069bd374da65dc9d6d9ba84b4b5ba 24-Jun-2015 destradaa <destradaa@google.com> Add callback-based support for Hardware Activity Recognition.
b/17112184

Add a callback-based mechanism for GmsCore to connect to Hardware Activity
Recognition. This allows GmsCore to stop polling to identify if the Android
platform supports the functionality or not.

Change-Id: I8f9459cbd15eecd70f6919c6551e6f7a663c732f
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b870dbf86bd47c750d2a5350a83ec245396578ee 22-Jun-2015 David Christie <dnchrist@google.com> Fix privacy leaks in LocationManager

-Register for listener for permission changes and stop
request immediately if client loses permission.
-Also remove permission requirement to remove geofences
and clean up permission annotations.

Bug: 21903866
Change-Id: I7e028b6b2ca5b21f25fcbba5de86dfb55caff872
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
1e575a0f32a00fc6a2f9a71fe1d1eb4426c71787 20-Jun-2015 Svet Ganov <svetoslavganov@google.com> Merge "Only grant runtime permissions to special components." into mnc-dev
adc1cf46045ae756d3a9ccbccf6b0f894e4c1edd 16-Jun-2015 Svet Ganov <svetoslavganov@google.com> Only grant runtime permissions to special components.

Now runtime permissions are granted only to components that are
part of the system or perform special system operations. For
exmple, the shell UID gets its runtime permissions granted by
default and the default phone app gets the phone permissions
granted by default.

bug:21764803

Change-Id: If8b8cadbd1980ffe7a6fc15bbb5f54a425f6e8f9
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b71218aec133981126b0f916fc1f731fdbb04b1b 17-Jun-2015 Jason Monk <jmonk@google.com> Add way to get the network location provider package

Bug: 21805447
Change-Id: Ie9fd35a69d8808ae4346927b30b77e9fd733b569
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
f7e9cf4fb48ea80cbc5088204ac3f898109623f7 13-May-2015 Svet Ganov <svetoslavganov@google.com> Access mock location is no longer a runtime permission - framework

The access mock location is no longer a runtime permission. It is a
signature protected one that apps cannot get but the fact they request
it means they want to inject location into the system. Now the user
gets to choose the current mock location app in developer options from
the apps that request the mock location permission. The access to mock
location is no longer guarded by the permisson but from a new app op
which is off by default and the settiings UI sets it to enabled only
for the currently selected mock location app.

bug:21078873

Change-Id: I19e3f9dc7c7de82eab46b30fec1abfbca54a0e59
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
8e4799ad456c972cc340d3f484afd69b2f14a761 13-May-2015 Wei Liu <luciferleo@google.com> resolved conflicts for merge of f0c4f0dd to mnc-dev

Change-Id: I16df088016c010aa25ee73ea8e68b3db8c0449e3
f0c4f0ddb6167bac5f40b1f68044ecbf8486db7c 12-May-2015 Wei Liu <luciferleo@google.com> am 3d76e2f3: Merge "Create GpsLocationProvider only if GPS is supported." into lmp-mr1-modular-dev

* commit '3d76e2f35ae5e4557979c053aa35c3cf3b02f1c3':
Create GpsLocationProvider only if GPS is supported.
5241a4cb55b4015549242ac7d8aa5c99e5f157e5 11-May-2015 Wei Liu <luciferleo@google.com> Create GpsLocationProvider only if GPS is supported.

The creation of GpsLocationProvider used to be inside the
GpsLocationProvider.isSupported() check.

https://googleplex-android-review.git.corp.google.com/#/c/288260/8/services/java/com/android/server/LocationManagerService.java
incorrectly moved it out.

b/20949616

Change-Id: I6ddd5be5a78f3156a4d5cfc4c756930558c3a8fc
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
ebc3d88380c6aa08ccae28c97d3b6374c20882e2 12-Nov-2014 Mike Lockwood <lockwood@google.com> am 4951482c: Merge "Skip receiver if failed linkToDeath to ILocationListener"

* commit '4951482c4de1780a9103189aa4eff93b2e91c804':
Skip receiver if failed linkToDeath to ILocationListener
cb3ab221f72fa10a3c72142dd7567161fb9af878 27-Mar-2014 Wen Jing <jing1.wen@sonymobile.com> Skip receiver if failed linkToDeath to ILocationListener

linkToDeath may failed when app was dead immediately after
starting the call to requestLocationUpdates in Location
service. If receiver still record in maps, an exception
will occurred when try to remove receiver's update because
unlinkToDeath will failed.

Change-Id: Id9b00da3b17c1371d61ab4644a70cf9ee934cdcc
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
6568d709e78d6ccaf256b7d0e4a19cdfb26deafb 27-Oct-2014 destradaa <destradaa@google.com> Add support for GPS measurement/navigation message capabilities.
b/16727892
b/16815124

The listeners are changed to receive statuses asynchronously, this is required because GPS HAL,
requires time to be notified of the capabilities it supports.

Change-Id: Ie69fdd629d8680341386a2c736bc851632dd2bda
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b254ab6addb46aefa59d26d261f846f381f4ece8 23-Oct-2014 Takayuki Hoshi <hoshi@google.com> Fix a bug where LocationManager's addGpsStatusListener does not throw a
SecurityException if LocationManagerService.mGpsStatusProvider is null
even when ACCESS_FINE_LOCATION permission is not present.

Tested under Nexus 5 and Molly with lmp-mr1-dev build with
android.location2.cts.LocationManagerTest#testGpsStatusListener CTS
test case such that it has been modified to expect SecurityException
only from .addGpsStatusListener.

Bug: 18095673
Change-Id: I09f9e7224a3b0eab91001f5092f0ef6e0ada7b08
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
beea442e72ddf03efe79d216288ea320fc4c308b 31-Jul-2014 destradaa <destradaa@google.com> Fix crash in Volantis because there is not FLP support.

b/16690237

Change-Id: Ie2dd159ad4e9b5cf4b3e2e66023b456927f18130
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
f9a274c9b8578dda6afeda422bff18b1577028b9 26-Jul-2014 destradaa <destradaa@google.com> Add support for sources in Geofencing APIs.

Support setting the source when adding geofences.
b/14117199

Surface the source when FLP geofence changes state.
b/14119200

Change-Id: I50dc40a9caee400594e1778c98e284e0db0d5e66
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
4b3e3931270f8e406fc806bc7fa1c2788256687d 22-Jul-2014 destradaa <destradaa@google.com> Expose Gps Navigation Messages in the platform.
b/16405976

Change-Id: Ic982ea2467d116585780c20c2fa7e974e50f8345
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
a4fa3b5aa53cf677b623fe346c585cb8a0c1ce26 09-Jul-2014 destradaa <destradaa@google.com> Add support in the platform for Activity Recognition Hardware.

Change-Id: I7c4fff3526583475a5edf1f4ba8fede4e9419ead
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
ea8a8a6076f04360de2d25b3e5853cde8026cd5f 24-Jun-2014 destradaa <destradaa@google.com> Update location framework to accept raw data from GPS HAL.

Change-Id: Ib4feca004b53fa89dcece4299974ab08913455a0
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
d5323174d85b6685672e321f045c44637e777618 12-Jun-2014 destradaa <destradaa@google.com> Separate Hardware Flp ServiceWatcher flags from the ones used by Software Flp.

Change-Id: I6c15665118d52627978381935716436981a058d1
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
b27528d066644e9a81ebac27822186fa61c89003 06-Jun-2014 Amith Yamasani <yamasani@google.com> Make LocationManagerService aware of user profiles

LocationManagerService normally doesn't provide location to background users.
With managed profiles, there are more than one foreground users and they both
need to get location when in the foreground. So LMS will now compare the caller
against all foreground users and provide location if valid.

Bug: 14671472
Change-Id: If3baabfc5a3ab3f2f081d7fc28f35d840d5f1489
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
5ce66d8dcc786b3d6a0fdfb42074e6c9741590ef 29-May-2014 destradaa <destradaa@google.com> Re-work the initialization of FLP HAL to make isSupported() static.
b/14839888

Change-Id: Ib5973586fd8a2d4a1e5fd09cf82dd4f4493398d0
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
1f141c1cbc1925fec36edb8a34a229cf6209d13a 15-May-2014 David Christie <dnchrist@google.com> Fix bug where location provider fails on secondary users.
Bug: 12592045

Change-Id: I196b8621c7f61c3492ad29ae90b608304dc29d66
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
a4dfc2c56b0efd0094d8cf9156c7b24fb4e67d25 13-May-2014 Zhentao Sun <robinvane@google.com> Make sure nativeInit is called on an object.

This bug is introduced by the attempt to fix b/14117917.
Worked around b/14469172. The implementation of nativeInit assumes that
it's called on a object instead of class.

Change-Id: I73241e62aa73ce98358ff37b772d1a26daf9e53c
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
cfbdcd259497ec5800028074ae487e5d4f112e5c 30-Apr-2014 destradaa <destradaa@google.com> Make sure the FlpHardwareProvider is only advertised to GmsCore if the platform supports it.
b/14117917

Change-Id: Id6c2444893bcf192049e3233d1296eac16fcf826
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
26bdb8fb6c006ba06bcf8c9f06d56d8894cc9783 21-Apr-2014 Ji-Hwan Lee <jihwan@google.com> Add config resource to add inital mock location providers

So that we can provide mock location providers, e.g., in emulator build.

Change-Id: Ia8fe0925abc2faa4999ef17e386d7f3f8b13a0dc
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
09d47bbb43fcda1d1cc05f88849ed011a84d0d60 14-Mar-2014 Victoria Lease <violets@android.com> am c2d934d7: am f8ce43ea: am 1365d982: am 4cde7734: Merge "remove unnecessary switchUser call"

* commit 'c2d934d7e87b9eb8cbb15ccc0c39b13ad32de460':
remove unnecessary switchUser call
f8ce43ea146cace780cb4f75348d4eca4526660a 14-Mar-2014 Victoria Lease <violets@android.com> am 1365d982: am 4cde7734: Merge "remove unnecessary switchUser call"

* commit '1365d98270e0a0a61d10743820e923aeff974b39':
remove unnecessary switchUser call
fe6d3c54944b56a34394a83b81a3d20cec52b3c9 04-Mar-2014 Tom O'Neill <tomo@google.com> Remove reference to internal bug number

Change-Id: Idec0d6529ee9742b226260df09cfe7cd2b3823fb
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
07ee5d1f1db4d6df4bdb52af2eb4ab7b167df0b4 04-Mar-2014 Tom O'Neill <tomo@google.com> Removing a test provider clears its enabled state

- Bug: 11446702

Change-Id: I56ad9235a99772079193553c0f28bd8d74b3d8e3
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
afecea18054c457cbd55d1ed9c023f2c2aa3726b 01-Mar-2014 Tom O'Neill <tomo@google.com> Seeing if a provider is enabled doesn't require special permissions

- Bug: 10696351

Change-Id: I4f1612ce10587728e71277587144fdcb59445b3f
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
2ff96af24de2c22a21de9b56ea8543dccdbdcb9d 31-Jan-2014 David Christie <dnchrist@google.com> Log history of location requests in LocationManager.
-Assists with debugging power issues.
Bug: 12824233

Change-Id: Iaaef0dbe00154c7668034a166587671b75d1f3c7
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java
94827c3484da6f0a9cd171e6892d2710b1eafa12 13-Jan-2014 Daniel Cashman <dcashman@google.com> am 21a801d0: am 0d30e07d: am 3d5ea26f: am 4503409a: Merge "Clear cached locations when location providers disabled Bug: 12118307" into klp-dev

* commit '21a801d0885d65f128b84a593140b07fd0d4e980':
Clear cached locations when location providers disabled Bug: 12118307
49782e46c0eb85a25ae2abcf80880c48dbab5aea 20-Dec-2013 Amith Yamasani <yamasani@google.com> am 9158825f: Move some system services to separate directories

* commit '9158825f9c41869689d6b1786d7c7aa8bdd524ce':
Move some system services to separate directories
9158825f9c41869689d6b1786d7c7aa8bdd524ce 22-Nov-2013 Amith Yamasani <yamasani@google.com> Move some system services to separate directories

Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
/frameworks/base/services/core/java/com/android/server/LocationManagerService.java