diff --git a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java index a44910100a..112c533175 100644 --- a/OsmAnd/src/net/osmand/aidl/ConnectedApp.java +++ b/OsmAnd/src/net/osmand/aidl/ConnectedApp.java @@ -225,6 +225,7 @@ public class ConnectedApp implements Comparable { Intent intent = new Intent(); intent.setAction(AIDL_ADD_MAP_WIDGET); intent.putExtra(AIDL_OBJECT_ID, widget.getId()); + intent.putExtra(AIDL_PACKAGE_NAME, pack); app.sendBroadcast(intent); } app.getAidlApi().reloadMap(); @@ -239,6 +240,7 @@ public class ConnectedApp implements Comparable { Intent intent = new Intent(); intent.setAction(AIDL_REMOVE_MAP_WIDGET); intent.putExtra(AIDL_OBJECT_ID, widgetId); + intent.putExtra(AIDL_PACKAGE_NAME, pack); app.sendBroadcast(intent); return true; } @@ -278,6 +280,7 @@ public class ConnectedApp implements Comparable { Intent intent = new Intent(); intent.setAction(AIDL_REMOVE_MAP_LAYER); intent.putExtra(AIDL_OBJECT_ID, layerId); + intent.putExtra(AIDL_PACKAGE_NAME, pack); app.sendBroadcast(intent); return true; } diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 637b2ed42c..3e5d21aceb 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -325,6 +325,7 @@ public class OsmandAidlApi { AidlMapWidgetWrapper widget = connectedApp.getWidgets().get(widgetId); MapInfoLayer layer = mapActivity.getMapLayers().getMapInfoLayer(); if (widget != null && layer != null) { + ApplicationMode.regWidgetVisibility(widget.getId(), (ApplicationMode[]) null); TextInfoWidget control = connectedApp.createWidgetControl(mapActivity, widgetId); connectedApp.getWidgetControls().put(widgetId, control); int menuIconId = AndroidUtils.getDrawableId(app, widget.getMenuIconName());