Revert updating routing.xml
This commit is contained in:
parent
29c7ee6e73
commit
a30421142b
1 changed files with 24 additions and 39 deletions
|
@ -1,21 +1,15 @@
|
||||||
package net.osmand.plus.resources;
|
package net.osmand.plus.resources;
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
import android.content.Context;
|
||||||
import java.io.FileFilter;
|
import android.content.res.AssetManager;
|
||||||
import java.io.FileOutputStream;
|
import android.database.sqlite.SQLiteException;
|
||||||
import java.io.IOException;
|
import android.graphics.Bitmap;
|
||||||
import java.io.InputStream;
|
import android.graphics.BitmapFactory;
|
||||||
import java.io.RandomAccessFile;
|
import android.os.HandlerThread;
|
||||||
import java.text.MessageFormat;
|
import android.text.format.DateFormat;
|
||||||
import java.util.ArrayList;
|
import android.util.DisplayMetrics;
|
||||||
import java.util.Collection;
|
import android.view.WindowManager;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
|
||||||
|
|
||||||
import net.osmand.AndroidUtils;
|
import net.osmand.AndroidUtils;
|
||||||
import net.osmand.GeoidAltitudeCorrection;
|
import net.osmand.GeoidAltitudeCorrection;
|
||||||
|
@ -49,7 +43,6 @@ import net.osmand.plus.resources.AsyncLoadingThread.MapLoadRequest;
|
||||||
import net.osmand.plus.resources.AsyncLoadingThread.TileLoadDownloadRequest;
|
import net.osmand.plus.resources.AsyncLoadingThread.TileLoadDownloadRequest;
|
||||||
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
import net.osmand.plus.srtmplugin.SRTMPlugin;
|
||||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||||
import net.osmand.router.RoutingConfiguration;
|
|
||||||
import net.osmand.util.Algorithms;
|
import net.osmand.util.Algorithms;
|
||||||
import net.osmand.util.MapUtils;
|
import net.osmand.util.MapUtils;
|
||||||
|
|
||||||
|
@ -58,15 +51,21 @@ import org.xmlpull.v1.XmlPullParser;
|
||||||
import org.xmlpull.v1.XmlPullParserException;
|
import org.xmlpull.v1.XmlPullParserException;
|
||||||
import org.xmlpull.v1.XmlPullParserFactory;
|
import org.xmlpull.v1.XmlPullParserFactory;
|
||||||
|
|
||||||
import android.content.Context;
|
import java.io.File;
|
||||||
import android.content.res.AssetManager;
|
import java.io.FileFilter;
|
||||||
import android.database.sqlite.SQLiteException;
|
import java.io.FileOutputStream;
|
||||||
import android.graphics.Bitmap;
|
import java.io.IOException;
|
||||||
import android.graphics.BitmapFactory;
|
import java.io.InputStream;
|
||||||
import android.os.HandlerThread;
|
import java.io.RandomAccessFile;
|
||||||
import android.text.format.DateFormat;
|
import java.text.MessageFormat;
|
||||||
import android.util.DisplayMetrics;
|
import java.util.ArrayList;
|
||||||
import android.view.WindowManager;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resource manager is responsible to work with all resources
|
* Resource manager is responsible to work with all resources
|
||||||
|
@ -553,7 +552,6 @@ public class ResourceManager {
|
||||||
context.getSettings().PREVIOUS_INSTALLED_VERSION.set(fv);
|
context.getSettings().PREVIOUS_INSTALLED_VERSION.set(fv);
|
||||||
copyRegionsBoundaries();
|
copyRegionsBoundaries();
|
||||||
copyPoiTypes();
|
copyPoiTypes();
|
||||||
copyRoutingXml();
|
|
||||||
for (String internalStyle : context.getRendererRegistry().getInternalRenderers().keySet()) {
|
for (String internalStyle : context.getRendererRegistry().getInternalRenderers().keySet()) {
|
||||||
File fl = context.getRendererRegistry().getFileForInternalStyle(internalStyle);
|
File fl = context.getRendererRegistry().getFileForInternalStyle(internalStyle);
|
||||||
if (fl.exists()) {
|
if (fl.exists()) {
|
||||||
|
@ -598,19 +596,6 @@ public class ResourceManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void copyRoutingXml() {
|
|
||||||
try {
|
|
||||||
File file = context.getAppPath(IndexConstants.ROUTING_XML_FILE);
|
|
||||||
if (file != null) {
|
|
||||||
FileOutputStream fout = new FileOutputStream(file);
|
|
||||||
Algorithms.streamCopy(RoutingConfiguration.class.getResourceAsStream("routing.xml"), fout);
|
|
||||||
fout.close();
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private final static String ASSET_INSTALL_MODE__alwaysCopyOnFirstInstall = "alwaysCopyOnFirstInstall";
|
private final static String ASSET_INSTALL_MODE__alwaysCopyOnFirstInstall = "alwaysCopyOnFirstInstall";
|
||||||
private final static String ASSET_COPY_MODE__overwriteOnlyIfExists = "overwriteOnlyIfExists";
|
private final static String ASSET_COPY_MODE__overwriteOnlyIfExists = "overwriteOnlyIfExists";
|
||||||
private final static String ASSET_COPY_MODE__alwaysOverwriteOrCopy = "alwaysOverwriteOrCopy";
|
private final static String ASSET_COPY_MODE__alwaysOverwriteOrCopy = "alwaysOverwriteOrCopy";
|
||||||
|
|
Loading…
Reference in a new issue