use of net.osmand.aidl.gpx.AGpxFileDetails in project Osmand by osmandapp.
the class OsmandAidlApi method getImportedGpx.
boolean getImportedGpx(List<AGpxFile> files) {
List<GpxDataItem> gpxDataItems = app.getGpxDbHelper().getItems();
for (GpxDataItem dataItem : gpxDataItems) {
File file = dataItem.getFile();
if (file.exists()) {
String fileName = file.getName();
boolean active = app.getSelectedGpxHelper().getSelectedFileByPath(file.getAbsolutePath()) != null;
long modifiedTime = dataItem.getFileLastModifiedTime();
long fileSize = file.length();
AGpxFileDetails details = null;
GPXTrackAnalysis analysis = dataItem.getAnalysis();
if (analysis != null) {
details = createGpxFileDetails(analysis);
}
files.add(new AGpxFile(fileName, modifiedTime, fileSize, active, details));
}
}
return true;
}
Aggregations