diff --git a/proguard-project.txt b/proguard-project.txt index f2fe155..af94546 100644 --- a/proguard-project.txt +++ b/proguard-project.txt @@ -18,3 +18,4 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} +-dontoptimize \ No newline at end of file diff --git a/src/edu/mit/media/funf/probe/builtin/WifiProbe.java b/src/edu/mit/media/funf/probe/builtin/WifiProbe.java index 430ec91..5007be5 100644 --- a/src/edu/mit/media/funf/probe/builtin/WifiProbe.java +++ b/src/edu/mit/media/funf/probe/builtin/WifiProbe.java @@ -38,6 +38,8 @@ import android.util.Log; import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; import edu.mit.media.funf.Schedule; import edu.mit.media.funf.probe.Probe.Base; @@ -52,6 +54,8 @@ @DisplayName("Nearby Wifi Devices Probe") public class WifiProbe extends Base { + public static final String TSF = "tsf"; + private static final String LOCK_KEY = WifiProbe.class.getName(); private WifiManager wifiManager; @@ -66,7 +70,12 @@ public void onReceive(Context context, Intent intent) { if (results != null) { Gson gson = getGson(); for (ScanResult result : results) { - sendData(gson.toJsonTree(result).getAsJsonObject()); + JsonObject data = gson.toJsonTree(result).getAsJsonObject(); + if (data.has(TIMESTAMP)) { + JsonElement el = data.remove(TIMESTAMP); + data.add(TSF, el); + } + sendData(data); } } if (getState() == State.RUNNING) {