am cde13e6b: Merge change 4954 into donut

Merge commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c'

* commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c':
  gps: Check for null APN name to avoid a runtime restart.
This commit is contained in:
Android (Google) Code Review
2009-06-22 13:24:50 -07:00
committed by The Android Open Source Project

View File

@@ -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 {