From 86a08ee892c0a569fa940f7bbd90116f502b2dc9 Mon Sep 17 00:00:00 2001 From: David 'Digit' Turner Date: Wed, 20 May 2009 14:18:45 +0200 Subject: [PATCH] Fix GPS emulation. The problem was that qemu_gps_set_position_mode() was called with the value GPS_POSITION_MODE_MS_BASED, which corresponds to AGPS (Assisted GPS), and returned an error (which was not properly filtered by the JNI caller, but this is the subject of another change). This explains why GPS emulation doesn't work in the 1.5_r1 SDK. Unfortunately, this fix requires generating a new system image for 1.5_r2 :-( By the way, Mike, I don't understand why this position mode is being passed. Looking at the code in GpsLocationProvider.java, I believe that this can only happen if a SUPL host is given by the network, and I don't think this is the case in the emulator, is it? --- gps/gps_qemu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gps/gps_qemu.c b/gps/gps_qemu.c index b12566e..feae89f 100644 --- a/gps/gps_qemu.c +++ b/gps/gps_qemu.c @@ -752,7 +752,7 @@ gps_state_init( GpsState* state ) return; } - D("gps emulation will read from %s", device); + D("gps emulation will read from '%s' qemud channel", QEMU_CHANNEL_NAME ); if ( socketpair( AF_LOCAL, SOCK_STREAM, 0, state->control ) < 0 ) { LOGE("could not create thread control socket pair: %s", strerror(errno)); @@ -853,9 +853,6 @@ qemu_gps_delete_aiding_data(GpsAidingData flags) static int qemu_gps_set_position_mode(GpsPositionMode mode, int fix_frequency) { // FIXME - support fix_frequency - // only standalone supported for now. - if (mode != GPS_POSITION_MODE_STANDALONE) - return -1; return 0; } -- 2.11.0