From c5fc9988f11acc58229fb6ae80d346277318ada4 Mon Sep 17 00:00:00 2001 From: Zhentao Sun Date: Wed, 17 Apr 2013 17:47:53 -0700 Subject: [PATCH] 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 | 54 +++++++ core/res/res/values/symbols.xml | 8 ++ .../server/LocationManagerService.java | 29 ++-- .../com/android/server/ServiceWatcher.java | 134 ++++++++++++------ .../server/location/GeocoderProxy.java | 14 +- .../server/location/GeofenceProxy.java | 15 +- .../location/LocationProviderProxy.java | 15 +- 7 files changed, 204 insertions(+), 65 deletions(-) diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index 84e300a112c68..5c772b2e99faf 100644 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -633,6 +633,60 @@ true + + true + + @null + + + true + + com.android.location.fused + + + true + + @null + + + true + + @null +