use of net.osmand.aidl.gpx.ASelectedGpxFile in project Osmand by osmandapp.
the class OsmandAidlApi method getActiveGpx.
boolean getActiveGpx(List<ASelectedGpxFile> files) {
if (files != null) {
List<SelectedGpxFile> selectedGpxFiles = app.getSelectedGpxHelper().getSelectedGPXFiles();
String gpxPath = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath();
for (SelectedGpxFile selectedGpxFile : selectedGpxFiles) {
String path = selectedGpxFile.getGpxFile().path;
if (!Algorithms.isEmpty(path)) {
if (path.startsWith(gpxPath)) {
path = path.substring(gpxPath.length() + 1);
}
files.add(new ASelectedGpxFile(path));
}
}
return true;
}
return false;
}
Aggregations