diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java index c40e66a608..a7abe02140 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/RoutePreferencesMenu.java @@ -43,6 +43,7 @@ import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.routing.RouteProvider; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.views.MapControlsLayer; +import net.osmand.plus.voice.MediaCommandPlayerImpl; import net.osmand.router.GeneralRouter; import net.osmand.router.GeneralRouter.RoutingParameter; import net.osmand.util.Algorithms; @@ -339,7 +340,7 @@ public class RoutePreferencesMenu { if (extStorage.exists()) { for (File f : extStorage.listFiles()) { if (f.isDirectory()) { - if (addJS && hasJavaScript(f)) { + if ((addJS && hasJavaScript(f)) || MediaCommandPlayerImpl.isMyData(f)) { setFiles.add(f.getName()); } else if (!addJS) { setFiles.add(f.getName()); diff --git a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java index b1b0b28dfc..45e046de08 100644 --- a/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/JSMediaCommandPlayerImpl.java @@ -90,6 +90,9 @@ public class JSMediaCommandPlayerImpl extends MediaCommandPlayerImpl { } public static boolean isMyData(File voiceDir) { + if (voiceDir.getName().contains("tts")) { + return false; + } for (File f : voiceDir.listFiles()) { if (f.getName().endsWith(IndexConstants.TTSVOICE_INDEX_EXT_JS)) { return true; diff --git a/OsmAnd/src/net/osmand/plus/voice/JSTTSCommandPlayerImpl.java b/OsmAnd/src/net/osmand/plus/voice/JSTTSCommandPlayerImpl.java index da4ee6e644..e0567be6a4 100644 --- a/OsmAnd/src/net/osmand/plus/voice/JSTTSCommandPlayerImpl.java +++ b/OsmAnd/src/net/osmand/plus/voice/JSTTSCommandPlayerImpl.java @@ -323,8 +323,7 @@ public class JSTTSCommandPlayerImpl extends AbstractJSCommandPlayer { } public static boolean isMyData(File voiceDir) { - boolean isTTS = voiceDir.getName().contains("tts"); - if (!isTTS) { + if (!voiceDir.getName().contains("tts")) { return false; } for (File f : voiceDir.listFiles()) {