Fix crashes
This commit is contained in:
parent
86376c9ed8
commit
4fc3b20e5d
2 changed files with 5 additions and 3 deletions
|
@ -13,7 +13,7 @@ import android.content.res.Configuration;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.util.Log;
|
||||||
import net.osmand.IProgress;
|
import net.osmand.IProgress;
|
||||||
import net.osmand.IndexConstants;
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
|
@ -67,7 +67,6 @@ import java.util.Locale;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import btools.routingapp.BRouterServiceConnection;
|
import btools.routingapp.BRouterServiceConnection;
|
||||||
|
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.getPendingIntent;
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLastCheck;
|
||||||
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn;
|
import static net.osmand.plus.liveupdates.LiveUpdatesHelper.preferenceLiveUpdatesOn;
|
||||||
|
@ -353,6 +352,7 @@ public class AppInitializer implements IProgress {
|
||||||
return app.getString(in);
|
return app.getString(in);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
LOG.info("No translation: " + keyName);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1231,7 +1231,9 @@ public class GPXUtilities {
|
||||||
public static String writeGpxFile(File fout, GPXFile file, OsmandApplication ctx) {
|
public static String writeGpxFile(File fout, GPXFile file, OsmandApplication ctx) {
|
||||||
Writer output = null;
|
Writer output = null;
|
||||||
try {
|
try {
|
||||||
fout.getParentFile().mkdirs();
|
if(fout.getParentFile() != null) {
|
||||||
|
fout.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
output = new OutputStreamWriter(new FileOutputStream(fout), "UTF-8"); //$NON-NLS-1$
|
output = new OutputStreamWriter(new FileOutputStream(fout), "UTF-8"); //$NON-NLS-1$
|
||||||
String msg = writeGpx(output, file, ctx);
|
String msg = writeGpx(output, file, ctx);
|
||||||
if(Algorithms.isEmpty(file.path)) {
|
if(Algorithms.isEmpty(file.path)) {
|
||||||
|
|
Loading…
Reference in a new issue