summaryrefslogtreecommitdiffstats
path: root/services/java/com
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-10-08 15:45:03 -0400
committerMike Lockwood <lockwood@android.com>2009-10-08 17:24:21 -0400
commit03d246779ea65fc2bd10d0b4f32620f45211133a (patch)
treec0bba5558070d24e11c324af60f716f580229703 /services/java/com
parent9d5b58991ef90e91b3c942c80ae3502ed62d10aa (diff)
downloadframeworks_base-03d246779ea65fc2bd10d0b4f32620f45211133a.zip
frameworks_base-03d246779ea65fc2bd10d0b4f32620f45211133a.tar.gz
frameworks_base-03d246779ea65fc2bd10d0b4f32620f45211133a.tar.bz2
GPS: Fix problem with SUPL when SUPL APN is already active.
Use ConnectivityManager.CONNECTIVITY_ACTION broadcast in LocationManagerService to notify GPS when SUPL connection is ready instead of TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED, which is not sent in all cases. Expand LocationProvider.updateNetworkState() to include NetworkInfo object. Fixes bug b/2155661 Change-Id: Iee227ace7d536b36cf7973e3e6a8b7a621ce6565 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services/java/com')
-rw-r--r--services/java/com/android/server/LocationManagerService.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/java/com/android/server/LocationManagerService.java b/services/java/com/android/server/LocationManagerService.java
index c8fa4c3..d1b3bd0 100644
--- a/services/java/com/android/server/LocationManagerService.java
+++ b/services/java/com/android/server/LocationManagerService.java
@@ -48,6 +48,7 @@ import android.location.Location;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Binder;
import android.os.Bundle;
@@ -529,7 +530,7 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
}
// notify provider of current network state
- proxy.updateNetworkState(mNetworkState);
+ proxy.updateNetworkState(mNetworkState, null);
}
}
@@ -1600,13 +1601,15 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
} else {
mNetworkState = LocationProvider.TEMPORARILY_UNAVAILABLE;
}
+ NetworkInfo info =
+ (NetworkInfo)intent.getExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
// Notify location providers of current network state
synchronized (mLock) {
for (int i = mProviders.size() - 1; i >= 0; i--) {
LocationProviderProxy provider = mProviders.get(i);
if (provider.requiresNetwork()) {
- provider.updateNetworkState(mNetworkState);
+ provider.updateNetworkState(mNetworkState, info);
}
}
}