Added choose plan dialog to configure map srtm/hillshade settings
This commit is contained in:
parent
849c3849b4
commit
607a32ad46
3 changed files with 16 additions and 3 deletions
|
@ -252,7 +252,7 @@ public class InAppPurchaseHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean needRequestInventory() {
|
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;
|
|| System.currentTimeMillis() - lastValidationCheckTime > PURCHASE_VALIDATION_PERIOD_MSEC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package net.osmand.plus.srtmplugin;
|
package net.osmand.plus.srtmplugin;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
|
||||||
|
@ -11,8 +10,8 @@ import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.activities.PluginActivity;
|
|
||||||
import net.osmand.plus.activities.SettingsActivity;
|
import net.osmand.plus.activities.SettingsActivity;
|
||||||
|
import net.osmand.plus.chooseplan.ChoosePlanDialogFragment;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread;
|
import net.osmand.plus.download.DownloadIndexesThread;
|
||||||
import net.osmand.plus.download.DownloadResources;
|
import net.osmand.plus.download.DownloadResources;
|
||||||
|
@ -135,9 +134,12 @@ public class ContourLinesMenu {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (itemId == R.string.srtm_plugin_name) {
|
} else if (itemId == R.string.srtm_plugin_name) {
|
||||||
|
ChoosePlanDialogFragment.showHillshadeSrtmPluginInstance(mapActivity.getSupportFragmentManager());
|
||||||
|
/*
|
||||||
Intent intent = new Intent(mapActivity, PluginActivity.class);
|
Intent intent = new Intent(mapActivity, PluginActivity.class);
|
||||||
intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, plugin.getId());
|
intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, plugin.getId());
|
||||||
mapActivity.startActivity(intent);
|
mapActivity.startActivity(intent);
|
||||||
|
*/
|
||||||
closeDashboard(mapActivity);
|
closeDashboard(mapActivity);
|
||||||
} else if (contourWidthProp != null && itemId == contourWidthName.hashCode()) {
|
} else if (contourWidthProp != null && itemId == contourWidthName.hashCode()) {
|
||||||
plugin.selectPropertyValue(mapActivity, contourWidthProp, widthPref, new Runnable() {
|
plugin.selectPropertyValue(mapActivity, contourWidthProp, widthPref, new Runnable() {
|
||||||
|
|
|
@ -10,6 +10,7 @@ import net.osmand.plus.OsmandPlugin;
|
||||||
import net.osmand.plus.OsmandSettings;
|
import net.osmand.plus.OsmandSettings;
|
||||||
import net.osmand.plus.R;
|
import net.osmand.plus.R;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
|
import net.osmand.plus.chooseplan.ChoosePlanDialogFragment;
|
||||||
import net.osmand.plus.download.DownloadActivityType;
|
import net.osmand.plus.download.DownloadActivityType;
|
||||||
import net.osmand.plus.download.DownloadIndexesThread;
|
import net.osmand.plus.download.DownloadIndexesThread;
|
||||||
import net.osmand.plus.download.DownloadResources;
|
import net.osmand.plus.download.DownloadResources;
|
||||||
|
@ -19,6 +20,8 @@ import net.osmand.plus.download.IndexItem;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static net.osmand.plus.srtmplugin.ContourLinesMenu.closeDashboard;
|
||||||
|
|
||||||
public class HillshadeMenu {
|
public class HillshadeMenu {
|
||||||
private static final String TAG = "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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue