diff options
Diffstat (limited to 'location')
-rw-r--r-- | location/java/com/android/internal/location/CellState.java | 11 | ||||
-rw-r--r-- | location/java/com/android/internal/location/INetworkLocationManager.java | 2 |
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); |