diff options
author | Mike Lockwood <lockwood@android.com> | 2011-08-04 11:40:25 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-08-04 11:40:25 -0400 |
commit | 2b15cb21b313f83f7cccdc6f9116ba31ddc190ad (patch) | |
tree | 68405f8f6a26b7b410e6d491273224953fc64955 /services/jni | |
parent | 7abaecc3dbb610b24e22685e6aa749c7011be1eb (diff) | |
parent | 75f1fdec3e95e9c8b5add02ba6e9b14913058f22 (diff) | |
download | frameworks_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-x | services/jni/com_android_server_location_GpsLocationProvider.cpp | 12 |
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) |