Fix error
This commit is contained in:
parent
57570ff78a
commit
cf4d383b58
2 changed files with 5 additions and 3 deletions
|
@ -356,11 +356,14 @@ public class FavouritesDbHelper {
|
|||
fld.mkdirs();
|
||||
}
|
||||
int back = 1;
|
||||
DecimalFormat formatter = new DecimalFormat("00");
|
||||
String backPrefix = "" + back;
|
||||
if(back < 10) {
|
||||
backPrefix = "0"+backPrefix;
|
||||
}
|
||||
File firstModified = null;
|
||||
long firstModifiedMin = System.currentTimeMillis();
|
||||
while(back <= BACKUP_CNT) {
|
||||
File bak = new File(fld, "favourites_bak_" + formatter.format(back) +".gpx.bz2");
|
||||
File bak = new File(fld, "favourites_bak_" + backPrefix +".gpx.bz2");
|
||||
if (!bak.exists()) {
|
||||
return bak;
|
||||
} else if (bak.lastModified() < firstModifiedMin) {
|
||||
|
|
|
@ -176,7 +176,6 @@ public class NavigationService extends Service implements LocationListener {
|
|||
if(plugin.getTracker().isEnabledTracker()) {
|
||||
plugin.getTracker().disableTracker();
|
||||
}
|
||||
plugin.getService().disconnect();
|
||||
}
|
||||
NavigationService.this.stopSelf();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue