diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java index 5ec24ac042..6fcddc5b54 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPoiDialogFragment.java @@ -254,7 +254,6 @@ public class EditPoiDialogFragment extends DialogFragment { @Override public void onClick(View v) { save(); - } }); Button cancelButton = (Button) view.findViewById(R.id.cancelButton); @@ -570,7 +569,6 @@ public class EditPoiDialogFragment extends DialogFragment { } } - // TODO: 8/28/15 Move to helper public static class ShowDeleteDialogAsyncTask extends AsyncTask { private final OpenstreetmapUtil openstreetmapUtil; private final AppCompatActivity activity; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/DeletePoiDialogFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/DeletePoiDialogFragment.java index f4dee8ebdf..66bfa44ae2 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/dialogs/DeletePoiDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/dialogs/DeletePoiDialogFragment.java @@ -22,12 +22,17 @@ import net.osmand.plus.osmedit.OsmPoint; public class DeletePoiDialogFragment extends DialogFragment { private static final String KEY_AMENITY_NODE = "amenity_node"; + Activity activity; + + @Override + public void onAttach(Activity activity) { + super.onAttach(activity); + this.activity = activity; + } @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { - final Activity activity = getActivity(); - OsmEditingPlugin plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class); final OpenstreetmapUtil mOpenstreetmapUtil; mOpenstreetmapUtil = new OpenstreetmapLocalUtil(plugin, activity);