Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
oaliaga committed May 15, 2023
1 parent 1f65f7d commit e4dd752
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/prey/json/actions/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public List<HttpDataService> get(Context ctx, List<ActionResult> list, JSONObje
HttpDataService data = null;
ArrayList<HttpDataService> dataToBeSent = null;
float accuracy = -1;
boolean enviar;
boolean send;
while (i < maximum) {
enviar = false;
send = false;
try {
data = LocationUtil.dataLocation(ctx, messageId, true);
dataToBeSent = new ArrayList<HttpDataService>();
Expand All @@ -85,13 +85,13 @@ public List<HttpDataService> get(Context ctx, List<ActionResult> list, JSONObje
}
if (newAccuracy > 0) {
if (accuracy == -1 || accuracy > newAccuracy) {
enviar = true;
send = true;
accuracy = newAccuracy;
}
}
}
if (enviar) {
PreyLogger.d(String.format("enviar [%s]:%s", i, accuracy));
if (send) {
PreyLogger.d(String.format("send [%s]:%s", i, accuracy));
PreyWebServices.getInstance().sendPreyHttpData(ctx, dataToBeSent);
}
try {
Expand Down

0 comments on commit e4dd752

Please sign in to comment.