Update downloads

This commit is contained in:
Victor Shcherb 2015-10-19 23:44:06 +02:00
parent 869a5569a0
commit 5d412c8f94
3 changed files with 7 additions and 5 deletions

View file

@ -85,8 +85,6 @@ public class OsmAndAppCustomization {
}
public void updatedLoadedFiles(Map<String, String> indexFileNames, Map<String, String> indexActivatedFileNames) {
}
public List<String> onIndexingFiles(IProgress progress, Map<String, String> indexFileNames) {
return Collections.emptyList();

View file

@ -44,7 +44,6 @@ public class DownloadResources extends DownloadResourceGroup {
listWithAlternatives(dateFormat, app.getAppPath(""), IndexConstants.EXTRA_EXT, indexActivatedFileNames);
Map<String, String> indexFileNames = app.getResourceManager().getIndexFileNames();
listWithAlternatives(dateFormat, app.getAppPath(""), IndexConstants.EXTRA_EXT, indexFileNames);
app.getAppCustomization().updatedLoadedFiles(indexFileNames, indexActivatedFileNames);
listWithAlternatives(dateFormat, app.getAppPath(IndexConstants.TILES_INDEX_DIR), IndexConstants.SQLITE_EXT,
indexFileNames);
app.getResourceManager().getBackupIndexes(indexFileNames);
@ -124,6 +123,7 @@ public class DownloadResources extends DownloadResourceGroup {
protected void updateFilesToUpdate() {
initAlreadyLoadedFiles();
List<IndexItem> stillUpdate = new ArrayList<IndexItem>();
for (IndexItem item : itemsToUpdate) {
String sfName = item.getTargetFileName();

View file

@ -270,6 +270,11 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
textView = (TextView) v.findViewById(R.id.title);
}
private boolean isParentWorld(DownloadResourceGroup group) {
return group.getParentGroup() == null
|| group.getParentGroup().getType() == DownloadResourceGroupType.WORLD;
}
private Drawable getIconForGroup(DownloadResourceGroup group) {
Drawable iconLeft;
if (group.getType() == DownloadResourceGroupType.VOICE_REC
@ -277,8 +282,7 @@ public class DownloadResourceGroupFragment extends DialogFragment implements Dow
iconLeft = ctx.getMyApplication().getIconsCache().getContentIcon(R.drawable.ic_action_volume_up);
} else {
IconsCache cache = ctx.getMyApplication().getIconsCache();
if (group.getParentGroup() == null
|| group.getParentGroup().getType() == DownloadResourceGroupType.WORLD) {
if (isParentWorld(group) || isParentWorld(group.getParentGroup())) {
iconLeft = cache.getContentIcon(R.drawable.ic_world_globe_dark);
} else {
DownloadResourceGroup ggr = group