Get the update interval right
This commit is contained in:
parent
01114da06d
commit
3296e0da57
@ -122,11 +122,13 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long elapsed = System.currentTimeMillis() - lastUpdate;
|
long elapsed = System.currentTimeMillis() - lastUpdate;
|
||||||
if (elapsed < interval * 60 * 60) {
|
if (elapsed < interval * 60 * 60 * 1000) {
|
||||||
Log.d("FDroid", "Skipping update - done " + elapsed
|
Log.d("FDroid", "Skipping update - done " + elapsed
|
||||||
+ "ms ago, interval is " + interval + " hours");
|
+ "ms ago, interval is " + interval + " hours");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Log.d("FDroid", "Unscheduled (manually requested) update");
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean notify = prefs.getBoolean("updateNotify", false);
|
boolean notify = prefs.getBoolean("updateNotify", false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user