summaryrefslogtreecommitdiffstats
path: root/services/jni
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-08-04 11:40:25 -0400
committerMike Lockwood <lockwood@android.com>2011-08-04 11:40:25 -0400
commit2b15cb21b313f83f7cccdc6f9116ba31ddc190ad (patch)
tree68405f8f6a26b7b410e6d491273224953fc64955 /services/jni
parent7abaecc3dbb610b24e22685e6aa749c7011be1eb (diff)
parent75f1fdec3e95e9c8b5add02ba6e9b14913058f22 (diff)
downloadframeworks_base-2b15cb21b313f83f7cccdc6f9116ba31ddc190ad.zip
frameworks_base-2b15cb21b313f83f7cccdc6f9116ba31ddc190ad.tar.gz
frameworks_base-2b15cb21b313f83f7cccdc6f9116ba31ddc190ad.tar.bz2
Resolve merge conflict for '75f1fdec':
GPS Provider Service changes GPS engine needs to receive network state changes from Android fw. Added db query for the current APN, also added a new parameter between JNI / HAL to the new method in AGpsRilInterface struct for gps engine to receive APN from GPSLocationService Conflicts: services/java/com/android/server/location/GpsLocationProvider.java Change-Id: I33c45027f1571493d3525324f62d199517c4960c Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services/jni')
-rwxr-xr-xservices/jni/com_android_server_location_GpsLocationProvider.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/jni/com_android_server_location_GpsLocationProvider.cpp b/services/jni/com_android_server_location_GpsLocationProvider.cpp
index c29be3a..c823da5 100755
--- a/services/jni/com_android_server_location_GpsLocationProvider.cpp
+++ b/services/jni/com_android_server_location_GpsLocationProvider.cpp
@@ -543,7 +543,7 @@ static jstring android_location_GpsLocationProvider_get_internal_state(JNIEnv* e
}
static void android_location_GpsLocationProvider_update_network_state(JNIEnv* env, jobject obj,
- jboolean connected, int type, jboolean roaming, jstring extraInfo)
+ jboolean connected, int type, jboolean roaming, jboolean available, jstring extraInfo, jstring apn)
{
if (sAGpsRilInterface && sAGpsRilInterface->update_network_state) {
@@ -554,6 +554,14 @@ static void android_location_GpsLocationProvider_update_network_state(JNIEnv* en
} else {
sAGpsRilInterface->update_network_state(connected, type, roaming, NULL);
}
+
+ // update_network_availability callback was not included in original AGpsRilInterface
+ if (sAGpsRilInterface->size >= sizeof(AGpsRilInterface)
+ && sAGpsRilInterface->update_network_availability) {
+ const char *c_apn = env->GetStringUTFChars(apn, NULL);
+ sAGpsRilInterface->update_network_availability(available, c_apn);
+ env->ReleaseStringUTFChars(apn, c_apn);
+ }
}
}
@@ -582,7 +590,7 @@ static JNINativeMethod sMethods[] = {
{"native_send_ni_response", "(II)V", (void*)android_location_GpsLocationProvider_send_ni_response},
{"native_agps_ni_message", "([BI)V", (void *)android_location_GpsLocationProvider_agps_send_ni_message},
{"native_get_internal_state", "()Ljava/lang/String;", (void*)android_location_GpsLocationProvider_get_internal_state},
- {"native_update_network_state", "(ZIZLjava/lang/String;)V", (void*)android_location_GpsLocationProvider_update_network_state },
+ {"native_update_network_state", "(ZIZZLjava/lang/String;Ljava/lang/String;)V", (void*)android_location_GpsLocationProvider_update_network_state },
};
int register_android_server_location_GpsLocationProvider(JNIEnv* env)