OSDN Git Service

changes based on review feedback
[android-x86/hardware-libhardware_legacy.git] / gps / gps_qemu.c
index feae89f..5c06951 100644 (file)
@@ -247,12 +247,13 @@ nmea_reader_update_time( NmeaReader*  r, Token  tok )
     minute  = str2int(tok.p+2, tok.p+4);
     seconds = str2float(tok.p+4, tok.end);
 
-    tm.tm_hour = hour;
-    tm.tm_min  = minute;
-    tm.tm_sec  = (int) seconds;
-    tm.tm_year = r->utc_year - 1900;
-    tm.tm_mon  = r->utc_mon - 1;
-    tm.tm_mday = r->utc_day;
+    tm.tm_hour  = hour;
+    tm.tm_min   = minute;
+    tm.tm_sec   = (int) seconds;
+    tm.tm_year  = r->utc_year - 1900;
+    tm.tm_mon   = r->utc_mon - 1;
+    tm.tm_mday  = r->utc_day;
+    tm.tm_isdst = -1;
 
     fix_time = mktime( &tm ) + r->utc_diff;
     r->fix.timestamp = (long long)fix_time * 1000;
@@ -845,6 +846,12 @@ qemu_gps_inject_time(GpsUtcTime time, int64_t timeReference, int uncertainty)
     return 0;
 }
 
+static int
+qemu_gps_inject_location(double latitude, double longitude, float accuracy)
+{
+    return 0;
+}
+
 static void
 qemu_gps_delete_aiding_data(GpsAidingData flags)
 {
@@ -868,6 +875,7 @@ static const GpsInterface  qemuGpsInterface = {
     qemu_gps_stop,
     qemu_gps_cleanup,
     qemu_gps_inject_time,
+    qemu_gps_inject_location,
     qemu_gps_delete_aiding_data,
     qemu_gps_set_position_mode,
     qemu_gps_get_extension,