diff options
author | Mike Lockwood <lockwood@android.com> | 2009-05-07 11:49:01 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2009-05-07 11:49:01 -0400 |
commit | 8dfe5d8c6ba9cb165994f09843abaa6302d63c1d (patch) | |
tree | f6299aadc4c3572ab9e96325332b1b890c76697c | |
parent | 0528b9b26a9d64ba43acd0e334638303d514b8eb (diff) | |
download | frameworks_base-8dfe5d8c6ba9cb165994f09843abaa6302d63c1d.zip frameworks_base-8dfe5d8c6ba9cb165994f09843abaa6302d63c1d.tar.gz frameworks_base-8dfe5d8c6ba9cb165994f09843abaa6302d63c1d.tar.bz2 |
location: Remove two unnecessary variables.
Signed-off-by: Mike Lockwood <lockwood@android.com>
-rw-r--r-- | services/java/com/android/server/LocationManagerService.java | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java index 9750d4d..c924d8d 100644 --- a/services/java/com/android/server/LocationManagerService.java +++ b/services/java/com/android/server/LocationManagerService.java @@ -122,8 +122,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run private static boolean sProvidersLoaded = false; private final Context mContext; - private LocationProviderProxy mGpsLocationProvider; - private LocationProviderProxy mNetworkLocationProvider; private IGeocodeProvider mGeocodeProvider; private IGpsStatusProvider mGpsStatusProvider; private LocationWorkerHandler mLocationHandler; @@ -548,9 +546,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Run // Create a gps location provider GpsLocationProvider provider = new GpsLocationProvider(mContext, this); mGpsStatusProvider = provider.getGpsStatusProvider(); - mGpsLocationProvider = - new LocationProviderProxy(LocationManager.GPS_PROVIDER, provider); - addProvider(mGpsLocationProvider); + LocationProviderProxy proxy = new LocationProviderProxy(LocationManager.GPS_PROVIDER, provider); + addProvider(proxy); } updateProvidersLocked(); @@ -614,15 +611,12 @@ public class LocationManagerService extends ILocationManager.Stub implements Run } synchronized (mLock) { - // FIXME - only network location provider supported for now - if (LocationManager.NETWORK_PROVIDER.equals(name)) { - mNetworkLocationProvider = new LocationProviderProxy(name, provider); - addProvider(mNetworkLocationProvider); - updateProvidersLocked(); + LocationProviderProxy proxy = new LocationProviderProxy(name, provider); + addProvider(proxy); + updateProvidersLocked(); - // notify NetworkLocationProvider of any events it might have missed - mNetworkLocationProvider.updateNetworkState(mNetworkState); - } + // notify provider of current network state + proxy.updateNetworkState(mNetworkState); } } @@ -1929,8 +1923,6 @@ public class LocationManagerService extends ILocationManager.Stub implements Run synchronized (mLock) { pw.println("Current Location Manager state:"); pw.println(" sProvidersLoaded=" + sProvidersLoaded); - pw.println(" mGpsLocationProvider=" + mGpsLocationProvider); - pw.println(" mNetworkLocationProvider=" + mNetworkLocationProvider); pw.println(" mCollector=" + mCollector); pw.println(" Listeners:"); int N = mReceivers.size(); |