am cde13e6b: Merge change 4954 into donut

Merge commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c'

* commit 'cde13e6bfa6465d5770755892e2ee234a1f85d5c':
  gps: Check for null APN name to avoid a runtime restart.
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 @@
                  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 {