Explicilty set capabilities and hardware info.
- We have VTS failures in GPS due to not calling
the capabiliies and harware info callbacks.
We now explicitly initialize the device and
pass all the VTS tests.
Bug: b/63628848
Test: run vts -m VtsHalGnssV1_0Target
Test: PASSED: 5, FAILED: 0, MODULES: 1 of 1
Change-Id: I6d7d4193744ec94a749ab4720994101de8e5542c
diff --git a/gps/gps_qemu.c b/gps/gps_qemu.c
index 23348bb..dc7351f 100644
--- a/gps/gps_qemu.c
+++ b/gps/gps_qemu.c
@@ -834,6 +834,16 @@
state->callbacks = *callbacks;
+ // Explicitly initialize capabilities
+ state->callbacks.set_capabilities_cb(0);
+
+
+ // Setup system info, we are pre 2016 hardware.
+ GnssSystemInfo sysinfo;
+ sysinfo.size = sizeof(GnssSystemInfo);
+ sysinfo.year_of_hw = 2015;
+ state->callbacks.set_system_info_cb(&sysinfo);
+
D("gps state initialized");
return;