diff --git a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java index d30665dfc7..1a74139640 100644 --- a/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java +++ b/OsmAnd/src/net/osmand/plus/inapp/InAppPurchaseHelper.java @@ -252,7 +252,7 @@ public class InAppPurchaseHelper { } public boolean needRequestInventory() { - return !ctx.getSettings().BILLING_PURCHASE_TOKEN_SENT.get() + return (ctx.getSettings().LIVE_UPDATES_PURCHASED.get() && !ctx.getSettings().BILLING_PURCHASE_TOKEN_SENT.get()) || System.currentTimeMillis() - lastValidationCheckTime > PURCHASE_VALIDATION_PERIOD_MSEC; } diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java index f7e5099b9f..bcf8804b92 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/ContourLinesMenu.java @@ -1,6 +1,5 @@ package net.osmand.plus.srtmplugin; -import android.content.Intent; import android.view.View; import android.widget.ArrayAdapter; @@ -11,8 +10,8 @@ import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.activities.PluginActivity; import net.osmand.plus.activities.SettingsActivity; +import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; import net.osmand.plus.download.DownloadActivityType; import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.DownloadResources; @@ -135,9 +134,12 @@ public class ContourLinesMenu { } }); } else if (itemId == R.string.srtm_plugin_name) { + ChoosePlanDialogFragment.showHillshadeSrtmPluginInstance(mapActivity.getSupportFragmentManager()); + /* Intent intent = new Intent(mapActivity, PluginActivity.class); intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, plugin.getId()); mapActivity.startActivity(intent); + */ closeDashboard(mapActivity); } else if (contourWidthProp != null && itemId == contourWidthName.hashCode()) { plugin.selectPropertyValue(mapActivity, contourWidthProp, widthPref, new Runnable() { diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java index 2a1979fefc..821def2866 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeMenu.java @@ -10,6 +10,7 @@ import net.osmand.plus.OsmandPlugin; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.chooseplan.ChoosePlanDialogFragment; import net.osmand.plus.download.DownloadActivityType; import net.osmand.plus.download.DownloadIndexesThread; import net.osmand.plus.download.DownloadResources; @@ -19,6 +20,8 @@ import net.osmand.plus.download.IndexItem; import java.io.IOException; import java.util.List; +import static net.osmand.plus.srtmplugin.ContourLinesMenu.closeDashboard; + public class HillshadeMenu { private static final String TAG = "HillshadeMenu"; @@ -71,6 +74,14 @@ public class HillshadeMenu { }); } }); + } else if (itemId == R.string.srtm_plugin_name) { + ChoosePlanDialogFragment.showHillshadeSrtmPluginInstance(mapActivity.getSupportFragmentManager()); + /* + Intent intent = new Intent(mapActivity, PluginActivity.class); + intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, plugin.getId()); + mapActivity.startActivity(intent); + */ + closeDashboard(mapActivity); } return false; }