Fix free plugins availability

(cherry picked from commit 4e55ebfcd3)
This commit is contained in:
Vitaliy 2020-02-28 13:15:10 +02:00
parent fc65678ce4
commit f7a6be3a18
2 changed files with 4 additions and 1 deletions

View file

@ -294,7 +294,7 @@ public abstract class OsmandPlugin {
}
protected boolean pluginAvailable(OsmandApplication app) {
return checkPluginPackage(app, this);
return checkPluginPackage(app, this) || !isPaid();
}
public static boolean checkPluginPackage(@NonNull OsmandApplication app, @NonNull OsmandPlugin plugin) {

View file

@ -335,6 +335,9 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
}
protected void onPostExecute(OsmBugResult obj) {
if (activity == null || activity.isFinishing() || activity.isActivityDestroyed()) {
return;
}
if (obj != null && obj.warning == null) {
if (local == osmbugsUtil) {
Toast.makeText(activity, R.string.osm_changes_added_to_local_edits, Toast.LENGTH_LONG).show();