diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-06-22 13:24:50 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-06-22 13:24:50 -0700 |
commit | 15d748659df12d05289a00a850547b241470a959 (patch) | |
tree | cd8a63103027a9c3eedec4027f3d1c5442e6eca3 /location | |
parent | 4527acb0c39258792ae55604cb4d71006bf8d938 (diff) | |
parent | cde13e6bfa6465d5770755892e2ee234a1f85d5c (diff) | |
download | frameworks_base-15d748659df12d05289a00a850547b241470a959.zip frameworks_base-15d748659df12d05289a00a850547b241470a959.tar.gz frameworks_base-15d748659df12d05289a00a850547b241470a959.tar.bz2 |
am cde13e6b: Merge change 4954 into donut
Merge commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c'
* commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c':
gps: Check for null APN name to avoid a runtime restart.
Diffstat (limited to 'location')
-rwxr-xr-x | location/java/com/android/internal/location/GpsLocationProvider.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java index e4ff0e3..5c8fcf2 100755 --- a/location/java/com/android/internal/location/GpsLocationProvider.java +++ b/location/java/com/android/internal/location/GpsLocationProvider.java @@ -949,8 +949,13 @@ public class GpsLocationProvider extends ILocationProvider.Stub { int result = mConnMgr.startUsingNetworkFeature( ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL); if (result == Phone.APN_ALREADY_ACTIVE) { - native_agps_data_conn_open(mAGpsApn); - mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN; + if (mAGpsApn != null) { + native_agps_data_conn_open(mAGpsApn); + mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPEN; + } else { + Log.e(TAG, "mAGpsApn not set when receiving Phone.APN_ALREADY_ACTIVE"); + native_agps_data_conn_failed(); + } } else if (result == Phone.APN_REQUEST_STARTED) { mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING; } else { |