diff --git a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java index 112c533175..b207bd853c 100644 --- a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java +++ b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java @@ -171,7 +171,8 @@ public class ConnectedApp implements Comparable { if (layer != null) { TextInfoWidget control = createWidgetControl(mapActivity, widget.getId()); widgetControls.put(widget.getId(), control); - int menuIconId = AndroidUtils.getDrawableId(mapActivity.getMyApplication(), widget.getMenuIconName()); + int iconId = AndroidUtils.getDrawableId(mapActivity.getMyApplication(), widget.getMenuIconName()); + int menuIconId = iconId != 0 ? iconId : ContextMenuItem.INVALID_ID; MapWidgetRegistry.MapWidgetRegInfo widgetInfo = layer.registerSideWidget(control, menuIconId, widget.getMenuTitle(), "aidl_widget_" + widget.getId(), false, widget.getOrder()); if (!mapActivity.getMapLayers().getMapWidgetRegistry().isVisible(widgetInfo.key)) { diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 51d652e7db..2c98608e76 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -40,6 +40,7 @@ import net.osmand.plus.AppInitializer.AppInitializeListener; import net.osmand.plus.AppInitializer.InitEvents; import net.osmand.plus.ApplicationMode; import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuItem; import net.osmand.plus.FavouritesDbHelper; import net.osmand.plus.GPXDatabase.GpxDataItem; import net.osmand.plus.GpxSelectionHelper; @@ -318,7 +319,8 @@ public class OsmandAidlApi { ApplicationMode.regWidgetVisibility(widget.getId(), (ApplicationMode[]) null); TextInfoWidget control = connectedApp.createWidgetControl(mapActivity, widgetId); connectedApp.getWidgetControls().put(widgetId, control); - int menuIconId = AndroidUtils.getDrawableId(app, widget.getMenuIconName()); + int iconId = AndroidUtils.getDrawableId(app, widget.getMenuIconName()); + int menuIconId = iconId != 0 ? iconId : ContextMenuItem.INVALID_ID; MapWidgetRegInfo widgetInfo = layer.registerSideWidget(control, menuIconId, widget.getMenuTitle(), "aidl_widget_" + widgetId, false, widget.getOrder()); diff --git a/OsmAnd/src/net/osmand/plus/osmedit/SettingsOsmEditingActivity.java b/OsmAnd/src/net/osmand/plus/osmedit/SettingsOsmEditingActivity.java index b313bd124d..7b876200ac 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/SettingsOsmEditingActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/SettingsOsmEditingActivity.java @@ -112,9 +112,8 @@ public class SettingsOsmEditingActivity extends SettingsBaseActivity { @Override protected void onPostExecute(OsmBugsUtil.OsmBugResult osmBugResult) { - if (osmBugResult.warning != null) { - Toast.makeText(context, osmBugResult.warning, Toast.LENGTH_LONG).show(); - } + String text = osmBugResult.warning != null ? osmBugResult.warning : context.getString(R.string.osm_authorization_success); + Toast.makeText(context, text, Toast.LENGTH_LONG).show(); } } -} +} \ No newline at end of file