summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:24 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 14:04:24 -0800
commit076357b8567458d4b6dfdcf839ef751634cd2bfb (patch)
treeefbb2fd6f1dc67d2d606382fc3b82983e7cb2e1f /location
parent3dec7d563a2f3e1eb967ce2054a00b6620e3558c (diff)
downloadframeworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.zip
frameworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.tar.gz
frameworks_base-076357b8567458d4b6dfdcf839ef751634cd2bfb.tar.bz2
auto import from //depot/cupcake/@132589
Diffstat (limited to 'location')
-rw-r--r--location/java/com/android/internal/location/CellState.java11
-rw-r--r--location/java/com/android/internal/location/INetworkLocationManager.java2
2 files changed, 10 insertions, 3 deletions
diff --git a/location/java/com/android/internal/location/CellState.java b/location/java/com/android/internal/location/CellState.java
index eb6535e..8f6ca1f 100644
--- a/location/java/com/android/internal/location/CellState.java
+++ b/location/java/com/android/internal/location/CellState.java
@@ -168,8 +168,15 @@ public class CellState {
}
}
- public void updateRadioType(int radioType) {
- mRadioType = radioType;
+ public void updateRadioType(TelephonyManager telephonyManager) {
+ // Get radio type
+ int radioType = telephonyManager.getNetworkType();
+ if (radioType == TelephonyManager.NETWORK_TYPE_GPRS ||
+ radioType == TelephonyManager.NETWORK_TYPE_EDGE) {
+ mRadioType = RADIO_TYPE_GPRS;
+ } else if (radioType == TelephonyManager.NETWORK_TYPE_UMTS) {
+ mRadioType = RADIO_TYPE_WCDMA;
+ }
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.d(TAG, "updateRadioType(): " + mLac +"," + mCid + "," + mMnc +"," + mMcc + "," +
diff --git a/location/java/com/android/internal/location/INetworkLocationManager.java b/location/java/com/android/internal/location/INetworkLocationManager.java
index d85ff0a..6b632fd 100644
--- a/location/java/com/android/internal/location/INetworkLocationManager.java
+++ b/location/java/com/android/internal/location/INetworkLocationManager.java
@@ -28,7 +28,7 @@ public interface INetworkLocationManager {
/* callback to allow installation to occur in Location Manager's thread */
public interface InstallCallback {
- void installNetworkLocationProvider(INetworkLocationManager manager);
+ void installNetworkLocationProvider(Context context, INetworkLocationManager manager);
}
void setInstallCallback(InstallCallback callback);