Selaa lähdekoodia

Don't log empty journeys

master
Chris Smith 14 vuotta sitten
vanhempi
commit
2056f8b7f2

+ 1
- 1
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/ContextAnalyserService.java Näytä tiedosto

@@ -182,7 +182,7 @@ public class ContextAnalyserService extends Service {
182 182
             if ((lastLocation == null || !lastLocation.equals(location))) {
183 183
                 Log.i(getClass().getSimpleName(), "New location, broadcasting: " + location);
184 184
 
185
-                if (lastLocation != null) {
185
+                if (lastLocation != null && !activityLog.isEmpty()) {
186 186
                     Log.i(getClass().getSimpleName(), "Activity log to here: " + activityLog);
187 187
                     dataHelper.addJourney(lastLocation, location, activityLog);
188 188
                 }

Loading…
Peruuta
Tallenna