Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-08-28 00:36:11 +02:00
commit e12e040117
2 changed files with 9 additions and 1 deletions

View file

@ -315,7 +315,12 @@ public class ItemViewHolder {
break; break;
case ASK_FOR_SRTM_PLUGIN_PURCHASE: case ASK_FOR_SRTM_PLUGIN_PURCHASE:
OsmandPlugin plugin = OsmandPlugin.getPlugin(SRTMPlugin.class); OsmandPlugin plugin = OsmandPlugin.getPlugin(SRTMPlugin.class);
if(plugin == null || plugin.getInstallURL() == null) {
Toast.makeText(context.getApplicationContext(),
context.getString(R.string.activate_srtm_plugin), Toast.LENGTH_LONG).show();
} else {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(plugin.getInstallURL()))); context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(plugin.getInstallURL())));
}
break; break;
case ASK_FOR_SRTM_PLUGIN_ENABLE: case ASK_FOR_SRTM_PLUGIN_ENABLE:
context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization() context.startActivity(new Intent(context, context.getMyApplication().getAppCustomization()

View file

@ -96,6 +96,9 @@ public class MapDataMenuController extends MenuController {
OsmandPlugin plugin = OsmandPlugin.getPlugin(SRTMPlugin.class); OsmandPlugin plugin = OsmandPlugin.getPlugin(SRTMPlugin.class);
if (plugin != null) { if (plugin != null) {
mapActivity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(plugin.getInstallURL()))); mapActivity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(plugin.getInstallURL())));
} else {
Toast.makeText(mapActivity.getApplicationContext(),
mapActivity.getString(R.string.activate_srtm_plugin), Toast.LENGTH_LONG).show();
} }
} else { } else {
mapActivity.startActivity(new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization() mapActivity.startActivity(new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()