OSDN Git Service

Made it easier to disable overlay mechanism of location components.
authorZhentao Sun <robinvane@google.com>
Thu, 18 Apr 2013 00:47:53 +0000 (17:47 -0700)
committerZhentao Sun <robinvane@google.com>
Mon, 22 Apr 2013 17:02:08 +0000 (10:02 -0700)
commitc5fc9988f11acc58229fb6ae80d346277318ada4
tree164c0888771ce16e2a8d4ae8b146cd6f20c9c312
parent339ac85483145972da010ad34cbcb29ed70cb822
Made it easier to disable overlay mechanism of location components.

Fixed b/8276827

Vendor might want to provide their own implementation of "network
location", "fused location" and "geocoder" service. Location manager now
allows those service to be replaced by packages that have the same
signature as one of the packages in config_locationProviderPackageNames.
Such behavior might not be desirable on some devices. This change
make this behavior configurable by 3 boolean flags.

Details:
- Added three boolean flags in core/res/res/values/config.xml to enable
or disable NLP/FLP/Geocoder overlay
- Added 3 package name for the stock NLP/FLP/Geocoder. They are needed
  only when overlay is disabled because LocationManagerService need to
  know which package is preferred when searching for
  NLP/FLP/Geocoder service.
- Made ServiceWatcher able to handle non-overlayable services.
- Fixed an NPE isue in ServiceWatcher. mPm.queryIntentServicesAsUser
  might return null.
- Fixed an bug: justCheckThisPackage in bindBestPackageLocked is always
  ignored.

Change-Id: Id221961ac7c3aa8ad44b894f9523f04f770ae237
core/res/res/values/config.xml
core/res/res/values/symbols.xml
services/java/com/android/server/LocationManagerService.java
services/java/com/android/server/ServiceWatcher.java
services/java/com/android/server/location/GeocoderProxy.java
services/java/com/android/server/location/GeofenceProxy.java
services/java/com/android/server/location/LocationProviderProxy.java