diff --git a/OsmAnd-api/.gitignore b/OsmAnd-api/.gitignore
new file mode 100644
index 0000000000..5497b8f2a1
--- /dev/null
+++ b/OsmAnd-api/.gitignore
@@ -0,0 +1,10 @@
+# Android Studio
+*/.idea
+*/*.iml
+
+# Gradle
+*/.gradle
+*/local.properties
+
+# Output files
+*/build
\ No newline at end of file
diff --git a/OsmAnd-api/AndroidManifest.xml b/OsmAnd-api/AndroidManifest.xml
new file mode 100644
index 0000000000..cfede22a2a
--- /dev/null
+++ b/OsmAnd-api/AndroidManifest.xml
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/OsmAnd-api/build.gradle b/OsmAnd-api/build.gradle
new file mode 100644
index 0000000000..cc5a9f9af4
--- /dev/null
+++ b/OsmAnd-api/build.gradle
@@ -0,0 +1,41 @@
+apply plugin: 'com.android.library'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = 'com.github.osmandapp.osmand'
+version = '2.0.0'
+
+android {
+ compileSdkVersion 27
+ buildToolsVersion "27.0.3"
+
+ defaultConfig {
+ minSdkVersion 14
+ targetSdkVersion 26
+ versionCode 2
+ versionName "2.0"
+ }
+ lintOptions {
+ abortOnError false
+ }
+ sourceSets {
+ main {
+ manifest.srcFile "AndroidManifest.xml"
+ aidl.srcDirs = ["src"]
+ java.srcDirs = ["src"]
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation 'com.android.support:support-annotations:27.1.1'
+}
+
+task sourcesJar(type: Jar) {
+ classifier = 'sources'
+ from android.sourceSets.main.java.srcDirs
+}
+
+artifacts {
+ archives sourcesJar
+}
\ No newline at end of file
diff --git a/OsmAnd-api/res/values/strings.xml b/OsmAnd-api/res/values/strings.xml
new file mode 100644
index 0000000000..e4dbe2e964
--- /dev/null
+++ b/OsmAnd-api/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ OsmAnd-api
+
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/AidlParams.java b/OsmAnd-api/src/net/osmand/aidlapi/AidlParams.java
new file mode 100644
index 0000000000..6024c5fcae
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/AidlParams.java
@@ -0,0 +1,35 @@
+package net.osmand.aidlapi;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public abstract class AidlParams implements Parcelable {
+
+ @Override
+ public final void writeToParcel(Parcel dest, int flags) {
+ Bundle bundle = new Bundle();
+ writeToBundle(bundle);
+ dest.writeBundle(bundle);
+ }
+
+ public final void readFromParcel(Parcel in) {
+ Bundle bundle = in.readBundle(getClass().getClassLoader());
+ if (bundle != null) {
+ readFromBundle(bundle);
+ }
+ }
+
+ protected void writeToBundle(Bundle bundle) {
+
+ }
+
+ protected void readFromBundle(Bundle bundle) {
+
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl b/OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlCallback.aidl
similarity index 86%
rename from OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlCallback.aidl
index f15fe8f44b..1d7f954815 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlCallback.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlCallback.aidl
@@ -1,9 +1,9 @@
-package net.osmand.aidl;
+package net.osmand.aidlapi;
-import net.osmand.aidl.search.SearchResult;
-import net.osmand.aidl.gpx.AGpxBitmap;
-import net.osmand.aidl.navigation.ADirectionInfo;
-import net.osmand.aidl.navigation.OnVoiceNavigationParams;
+import net.osmand.aidlapi.search.SearchResult;
+import net.osmand.aidlapi.gpx.AGpxBitmap;
+import net.osmand.aidlapi.navigation.ADirectionInfo;
+import net.osmand.aidlapi.navigation.OnVoiceNavigationParams;
interface IOsmAndAidlCallback {
@@ -46,7 +46,7 @@ interface IOsmAndAidlCallback {
* @param layerId - id of layer point and button associated with
*/
void onContextMenuButtonClicked(in int buttonId, String pointId, String layerId);
-
+
/**
* Callback for {@link IOsmAndAidlInterface} registerForVoiceRouterMessages() method.
*/
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl b/OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlInterface.aidl
similarity index 88%
rename from OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlInterface.aidl
index 541194e18d..702904584d 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/IOsmAndAidlInterface.aidl
@@ -1,97 +1,96 @@
-package net.osmand.aidl;
+package net.osmand.aidlapi;
-import net.osmand.aidl.map.ALatLon;
-import net.osmand.aidl.map.SetMapLocationParams;
+import net.osmand.aidlapi.map.ALatLon;
+import net.osmand.aidlapi.map.SetMapLocationParams;
-import net.osmand.aidl.favorite.group.AFavoriteGroup;
-import net.osmand.aidl.favorite.group.AddFavoriteGroupParams;
-import net.osmand.aidl.favorite.group.RemoveFavoriteGroupParams;
-import net.osmand.aidl.favorite.group.UpdateFavoriteGroupParams;
+import net.osmand.aidlapi.favorite.group.AFavoriteGroup;
+import net.osmand.aidlapi.favorite.group.AddFavoriteGroupParams;
+import net.osmand.aidlapi.favorite.group.RemoveFavoriteGroupParams;
+import net.osmand.aidlapi.favorite.group.UpdateFavoriteGroupParams;
-import net.osmand.aidl.favorite.AFavorite;
-import net.osmand.aidl.favorite.AddFavoriteParams;
-import net.osmand.aidl.favorite.RemoveFavoriteParams;
-import net.osmand.aidl.favorite.UpdateFavoriteParams;
+import net.osmand.aidlapi.favorite.AFavorite;
+import net.osmand.aidlapi.favorite.AddFavoriteParams;
+import net.osmand.aidlapi.favorite.RemoveFavoriteParams;
+import net.osmand.aidlapi.favorite.UpdateFavoriteParams;
-import net.osmand.aidl.mapmarker.AMapMarker;
-import net.osmand.aidl.mapmarker.AddMapMarkerParams;
-import net.osmand.aidl.mapmarker.RemoveMapMarkerParams;
-import net.osmand.aidl.mapmarker.UpdateMapMarkerParams;
+import net.osmand.aidlapi.mapmarker.AMapMarker;
+import net.osmand.aidlapi.mapmarker.AddMapMarkerParams;
+import net.osmand.aidlapi.mapmarker.RemoveMapMarkerParams;
+import net.osmand.aidlapi.mapmarker.UpdateMapMarkerParams;
-import net.osmand.aidl.calculateroute.CalculateRouteParams;
+import net.osmand.aidlapi.calculateroute.CalculateRouteParams;
-import net.osmand.aidl.gpx.ImportGpxParams;
-import net.osmand.aidl.gpx.ShowGpxParams;
-import net.osmand.aidl.gpx.StartGpxRecordingParams;
-import net.osmand.aidl.gpx.StopGpxRecordingParams;
-import net.osmand.aidl.gpx.HideGpxParams;
-import net.osmand.aidl.gpx.ASelectedGpxFile;
+import net.osmand.aidlapi.gpx.ImportGpxParams;
+import net.osmand.aidlapi.gpx.ShowGpxParams;
+import net.osmand.aidlapi.gpx.StartGpxRecordingParams;
+import net.osmand.aidlapi.gpx.StopGpxRecordingParams;
+import net.osmand.aidlapi.gpx.HideGpxParams;
+import net.osmand.aidlapi.gpx.ASelectedGpxFile;
-import net.osmand.aidl.mapwidget.AMapWidget;
-import net.osmand.aidl.mapwidget.AddMapWidgetParams;
-import net.osmand.aidl.mapwidget.RemoveMapWidgetParams;
-import net.osmand.aidl.mapwidget.UpdateMapWidgetParams;
+import net.osmand.aidlapi.mapwidget.AMapWidget;
+import net.osmand.aidlapi.mapwidget.AddMapWidgetParams;
+import net.osmand.aidlapi.mapwidget.RemoveMapWidgetParams;
+import net.osmand.aidlapi.mapwidget.UpdateMapWidgetParams;
-import net.osmand.aidl.maplayer.point.AMapPoint;
-import net.osmand.aidl.maplayer.point.AddMapPointParams;
-import net.osmand.aidl.maplayer.point.RemoveMapPointParams;
-import net.osmand.aidl.maplayer.point.UpdateMapPointParams;
-import net.osmand.aidl.maplayer.AMapLayer;
-import net.osmand.aidl.maplayer.AddMapLayerParams;
-import net.osmand.aidl.maplayer.RemoveMapLayerParams;
-import net.osmand.aidl.maplayer.UpdateMapLayerParams;
+import net.osmand.aidlapi.maplayer.point.AMapPoint;
+import net.osmand.aidlapi.maplayer.point.AddMapPointParams;
+import net.osmand.aidlapi.maplayer.point.RemoveMapPointParams;
+import net.osmand.aidlapi.maplayer.point.UpdateMapPointParams;
+import net.osmand.aidlapi.maplayer.AMapLayer;
+import net.osmand.aidlapi.maplayer.AddMapLayerParams;
+import net.osmand.aidlapi.maplayer.RemoveMapLayerParams;
+import net.osmand.aidlapi.maplayer.UpdateMapLayerParams;
-import net.osmand.aidl.navigation.NavigateParams;
-import net.osmand.aidl.navigation.NavigateGpxParams;
+import net.osmand.aidlapi.navigation.NavigateParams;
+import net.osmand.aidlapi.navigation.NavigateGpxParams;
-import net.osmand.aidl.note.TakePhotoNoteParams;
-import net.osmand.aidl.note.StartVideoRecordingParams;
-import net.osmand.aidl.note.StartAudioRecordingParams;
-import net.osmand.aidl.note.StopRecordingParams;
+import net.osmand.aidlapi.note.TakePhotoNoteParams;
+import net.osmand.aidlapi.note.StartVideoRecordingParams;
+import net.osmand.aidlapi.note.StartAudioRecordingParams;
+import net.osmand.aidlapi.note.StopRecordingParams;
-import net.osmand.aidl.gpx.RemoveGpxParams;
+import net.osmand.aidlapi.gpx.RemoveGpxParams;
-import net.osmand.aidl.maplayer.point.ShowMapPointParams;
+import net.osmand.aidlapi.maplayer.point.ShowMapPointParams;
-import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams;
-import net.osmand.aidl.navdrawer.NavDrawerFooterParams;
-import net.osmand.aidl.navdrawer.NavDrawerHeaderParams;
+import net.osmand.aidlapi.navdrawer.SetNavDrawerItemsParams;
+import net.osmand.aidlapi.navdrawer.NavDrawerFooterParams;
+import net.osmand.aidlapi.navdrawer.NavDrawerHeaderParams;
-import net.osmand.aidl.navigation.PauseNavigationParams;
-import net.osmand.aidl.navigation.ResumeNavigationParams;
-import net.osmand.aidl.navigation.StopNavigationParams;
-import net.osmand.aidl.navigation.MuteNavigationParams;
-import net.osmand.aidl.navigation.UnmuteNavigationParams;
+import net.osmand.aidlapi.navigation.PauseNavigationParams;
+import net.osmand.aidlapi.navigation.ResumeNavigationParams;
+import net.osmand.aidlapi.navigation.StopNavigationParams;
+import net.osmand.aidlapi.navigation.MuteNavigationParams;
+import net.osmand.aidlapi.navigation.UnmuteNavigationParams;
-import net.osmand.aidl.IOsmAndAidlCallback;
+import net.osmand.aidlapi.IOsmAndAidlCallback;
-import net.osmand.aidl.search.SearchResult;
-import net.osmand.aidl.search.SearchParams;
-import net.osmand.aidl.navigation.NavigateSearchParams;
+import net.osmand.aidlapi.search.SearchResult;
+import net.osmand.aidlapi.search.SearchParams;
+import net.osmand.aidlapi.navigation.NavigateSearchParams;
-import net.osmand.aidl.customization.SetWidgetsParams;
-import net.osmand.aidl.customization.OsmandSettingsParams;
-import net.osmand.aidl.customization.OsmandSettingsInfoParams;
-import net.osmand.aidl.customization.CustomizationInfoParams;
+import net.osmand.aidlapi.customization.SetWidgetsParams;
+import net.osmand.aidlapi.customization.OsmandSettingsParams;
+import net.osmand.aidlapi.customization.OsmandSettingsInfoParams;
+import net.osmand.aidlapi.customization.CustomizationInfoParams;
-import net.osmand.aidl.gpx.AGpxFile;
-import net.osmand.aidl.gpx.AGpxFileDetails;
-import net.osmand.aidl.gpx.CreateGpxBitmapParams;
-import net.osmand.aidl.gpx.GpxColorParams;
+import net.osmand.aidlapi.gpx.AGpxFile;
+import net.osmand.aidlapi.gpx.AGpxFileDetails;
+import net.osmand.aidlapi.gpx.CreateGpxBitmapParams;
-import net.osmand.aidl.tiles.ASqliteDbFile;
+import net.osmand.aidlapi.tiles.ASqliteDbFile;
-import net.osmand.aidl.plugins.PluginParams;
-import net.osmand.aidl.copyfile.CopyFileParams;
+import net.osmand.aidlapi.plugins.PluginParams;
+import net.osmand.aidlapi.copyfile.CopyFileParams;
-import net.osmand.aidl.navigation.ANavigationUpdateParams;
-import net.osmand.aidl.navigation.ANavigationVoiceRouterMessageParams;
+import net.osmand.aidlapi.navigation.ANavigationUpdateParams;
+import net.osmand.aidlapi.navigation.ANavigationVoiceRouterMessageParams;
-import net.osmand.aidl.contextmenu.ContextMenuButtonsParams;
-import net.osmand.aidl.contextmenu.UpdateContextMenuButtonsParams;
-import net.osmand.aidl.contextmenu.RemoveContextMenuButtonsParams;
+import net.osmand.aidlapi.contextmenu.ContextMenuButtonsParams;
+import net.osmand.aidlapi.contextmenu.UpdateContextMenuButtonsParams;
+import net.osmand.aidlapi.contextmenu.RemoveContextMenuButtonsParams;
-import net.osmand.aidl.mapmarker.RemoveMapMarkersParams;
+import net.osmand.aidlapi.mapmarker.RemoveMapMarkersParams;
// NOTE: Add new methods at the end of file!!!
@@ -305,6 +304,13 @@ interface IOsmAndAidlInterface {
*/
boolean addFavoriteGroup(in AddFavoriteGroupParams params);
+ /**
+ * Remove favorite group with given name.
+ *
+ * @param name (String) - name of favorite group.
+ */
+ boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params);
+
/**
* Update favorite group with given params.
*
@@ -315,13 +321,6 @@ interface IOsmAndAidlInterface {
* @param colorNew (String) - group color (new).
* @param visibleNew (boolean) - group visibility (new).
*/
- boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params);
-
- /**
- * Remove favorite group with given name.
- *
- * @param name (String) - name of favorite group.
- */
boolean updateFavoriteGroup(in UpdateFavoriteGroupParams params);
/**
@@ -338,6 +337,16 @@ interface IOsmAndAidlInterface {
*/
boolean addFavorite(in AddFavoriteParams params);
+ /**
+ * Remove favorite at given location with given params.
+ *
+ * @param lat (double) - latitude.
+ * @param lon (double) - longitude.
+ * @param name (String) - name of favorite item.
+ * @param category (String) - category of favorite item.
+ */
+ boolean removeFavorite(in RemoveFavoriteParams params);
+
/**
* Update favorite at given location with given params.
*
@@ -356,16 +365,6 @@ interface IOsmAndAidlInterface {
* "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown".
* @param visibleNew (boolean) - should new category be visible after creation.
*/
- boolean removeFavorite(in RemoveFavoriteParams params);
-
- /**
- * Remove favorite at given location with given params.
- *
- * @param lat (double) - latitude.
- * @param lon (double) - longitude.
- * @param name (String) - name of favorite item.
- * @param category (String) - category of favorite item.
- */
boolean updateFavorite(in UpdateFavoriteParams params);
/**
@@ -817,10 +816,10 @@ interface IOsmAndAidlInterface {
*
*/
boolean setCustomization(in CustomizationInfoParams params);
-
+
/**
* Method to register for Voice Router voice messages during navigation. Notifies user about voice messages.
- *
+ *
* @params subscribeToUpdates (boolean) - boolean flag to subscribe or unsubscribe from messages
* @params callbackId (long) - id of callback, needed to unsubscribe from messages
* @params callback (IOsmAndAidlCallback) - callback to notify user on voice message
@@ -832,18 +831,4 @@ interface IOsmAndAidlInterface {
* Empty class of params
*/
boolean removeAllActiveMapMarkers(in RemoveMapMarkersParams params);
-
- /**
- * Method to get color name for gpx.
- *
- * @param fileName (String) - name of gpx file.
- *
- * @param gpxColor (String) - color name of gpx. Can be one of: "red", "orange", "lightblue",
- * "blue", "purple", "translucent_red", "translucent_orange",
- * "translucent_lightblue", "translucent_blue", "translucent_purple"
- * Which used in {@link #importGpx(in ImportGpxParams params) importGpx}
- * Or color hex if gpx has custom color.
- *
- */
- boolean getGpxColor(inout GpxColorParams params);
-}
+}
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/OsmAndCustomizationConstants.java b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java
similarity index 98%
rename from OsmAnd/src/net/osmand/plus/OsmAndCustomizationConstants.java
rename to OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java
index 2fba261800..a863364318 100644
--- a/OsmAnd/src/net/osmand/plus/OsmAndCustomizationConstants.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/OsmAndCustomizationConstants.java
@@ -1,9 +1,8 @@
-package net.osmand.plus;
+package net.osmand.aidlapi;
public interface OsmAndCustomizationConstants {
// Navigation Drawer:
-
String DRAWER_ITEM_ID_SCHEME = "drawer.action.";
String DRAWER_DASHBOARD_ID = DRAWER_ITEM_ID_SCHEME + "dashboard";
String DRAWER_MAP_MARKERS_ID = DRAWER_ITEM_ID_SCHEME + "map_markers";
@@ -23,7 +22,6 @@ public interface OsmAndCustomizationConstants {
String DRAWER_DIVIDER_ID = DRAWER_ITEM_ID_SCHEME + "divider";
// Configure Map:
-
String CONFIGURE_MAP_ITEM_ID_SCHEME = "map.configure.";
String SHOW_ITEMS_ID_SCHEME = CONFIGURE_MAP_ITEM_ID_SCHEME + "show.";
String RENDERING_ITEMS_ID_SCHEME = CONFIGURE_MAP_ITEM_ID_SCHEME + "rendering.";
@@ -42,6 +40,7 @@ public interface OsmAndCustomizationConstants {
String RECORDING_LAYER = SHOW_ITEMS_ID_SCHEME + "recording_layer";
String MAPILLARY = SHOW_ITEMS_ID_SCHEME + "mapillary";
String OSM_NOTES = SHOW_ITEMS_ID_SCHEME + "osm_notes";
+ String OSM_EDITS = SHOW_ITEMS_ID_SCHEME + "osm_edits";
String OVERLAY_MAP = SHOW_ITEMS_ID_SCHEME + "overlay_map";
String UNDERLAY_MAP = SHOW_ITEMS_ID_SCHEME + "underlay_map";
String CONTOUR_LINES = SHOW_ITEMS_ID_SCHEME + "contour_lines";
@@ -60,7 +59,6 @@ public interface OsmAndCustomizationConstants {
String ROUTES_ID = RENDERING_ITEMS_ID_SCHEME + "routes";
// Map Controls:
-
String HUD_BTN_ID_SCHEME = "map.view.";
String LAYERS_HUD_ID = HUD_BTN_ID_SCHEME + "layers";
String COMPASS_HUD_ID = HUD_BTN_ID_SCHEME + "compass";
@@ -99,5 +97,4 @@ public interface OsmAndCustomizationConstants {
String PLUGIN_RASTER_MAPS = "osmand.rastermaps";
String PLUGIN_SKI_MAPS = "skimaps.plugin";
String PLUGIN_SRTM = "osmand.srtm";
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/OsmandAidlConstants.java b/OsmAnd-api/src/net/osmand/aidlapi/OsmandAidlConstants.java
new file mode 100644
index 0000000000..13eedb53c9
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/OsmandAidlConstants.java
@@ -0,0 +1,36 @@
+package net.osmand.aidlapi;
+
+public interface OsmandAidlConstants {
+
+ int OK_RESPONSE = 0;
+
+ int MIN_UPDATE_TIME_MS = 1000;
+ long COPY_FILE_PART_SIZE_LIMIT = 256 * 1024;
+ long COPY_FILE_MAX_LOCK_TIME_MS = 10000;
+
+ int CANNOT_ACCESS_API_ERROR = -5;
+ int UNKNOWN_API_ERROR = -2;
+
+ int MIN_UPDATE_TIME_MS_ERROR = -1;
+
+ int COPY_FILE_PARAMS_ERROR = -1001;
+ int COPY_FILE_PART_SIZE_LIMIT_ERROR = -1002;
+ int COPY_FILE_WRITE_LOCK_ERROR = -1003;
+ int COPY_FILE_IO_ERROR = -1004;
+ int COPY_FILE_UNSUPPORTED_FILE_TYPE_ERROR = -1005;
+
+ int TURN_TYPE_C = 1; //"C"; // continue (go straight)
+ int TURN_TYPE_TL = 2; // turn left
+ int TURN_TYPE_TSLL = 3; // turn slightly left
+ int TURN_TYPE_TSHL = 4; // turn sharply left
+ int TURN_TYPE_TR = 5; // turn right
+ int TURN_TYPE_TSLR = 6; // turn slightly right
+ int TURN_TYPE_TSHR = 7; // turn sharply right
+ int TURN_TYPE_KL = 8; // keep left
+ int TURN_TYPE_KR = 9; // keep right
+ int TURN_TYPE_TU = 10; // U-turn
+ int TURN_TYPE_TRU = 11; // Right U-turn
+ int TURN_TYPE_OFFR = 12; // Off route
+ int TURN_TYPE_RNDB = 13; // Roundabout
+ int TURN_TYPE_RNLB = 14; // Roundabout left
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.aidl
new file mode 100644
index 0000000000..4c695b9e9d
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.calculateroute;
+
+parcelable CalculateRouteParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.java b/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.java
new file mode 100644
index 0000000000..8a6d9ed4f3
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/calculateroute/CalculateRouteParams.java
@@ -0,0 +1,101 @@
+package net.osmand.aidlapi.calculateroute;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+import net.osmand.aidlapi.map.ALatLon;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CalculateRouteParams extends AidlParams {
+
+ private ALatLon startPoint;
+ private String startPointName;
+ private ALatLon endPoint;
+ private String endPointName;
+ private ArrayList intermediatePoints = new ArrayList<>();
+ private ArrayList intermediateNames = new ArrayList<>();
+
+ public CalculateRouteParams(ALatLon startPoint, String startPointName,
+ ALatLon endPoint, String endPointName,
+ List intermediatePoints, List intermediateNames) {
+
+ if (endPoint == null) {
+ throw new IllegalArgumentException("endPoint cannot be null");
+ }
+
+ this.startPoint = startPoint;
+ this.startPointName = startPointName;
+ this.endPoint = endPoint;
+ this.endPointName = endPointName;
+ if (intermediatePoints != null) {
+ this.intermediatePoints.addAll(intermediatePoints);
+ }
+ if (intermediateNames != null) {
+ this.intermediateNames.addAll(intermediateNames);
+ }
+ }
+
+ public CalculateRouteParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CalculateRouteParams createFromParcel(Parcel in) {
+ return new CalculateRouteParams(in);
+ }
+
+ @Override
+ public CalculateRouteParams[] newArray(int size) {
+ return new CalculateRouteParams[size];
+ }
+ };
+
+ public ALatLon getStartPoint() {
+ return startPoint;
+ }
+
+ public String getStartPointName() {
+ return startPointName;
+ }
+
+ public ALatLon getEndPoint() {
+ return endPoint;
+ }
+
+ public String getEndPointName() {
+ return endPointName;
+ }
+
+ public List getIntermediatePoints() {
+ return intermediatePoints;
+ }
+
+ public List getIntermediateNames() {
+ return intermediateNames;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("startPoint", startPoint);
+ bundle.putString("startPointName", startPointName);
+ bundle.putParcelable("endPoint", endPoint);
+ bundle.putString("endPointName", endPointName);
+ bundle.putParcelableArrayList("intermediatePoints", intermediatePoints);
+ bundle.putStringArrayList("intermediateNames", intermediateNames);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(ALatLon.class.getClassLoader());
+ startPoint = bundle.getParcelable("startPoint");
+ startPointName = bundle.getString("startPointName");
+ endPoint = bundle.getParcelable("endPoint");
+ endPointName = bundle.getString("endPointName");
+ intermediatePoints = bundle.getParcelableArrayList("intermediatePoints");
+ intermediateNames = bundle.getStringArrayList("intermediateNames");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.aidl b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.aidl
new file mode 100644
index 0000000000..0492a45d8d
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.contextmenu;
+
+parcelable AContextMenuButton;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.java
similarity index 60%
rename from OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java
rename to OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.java
index b235116999..38643e174f 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/AContextMenuButton.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.contextmenu;
+package net.osmand.aidlapi.contextmenu;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class AContextMenuButton implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class AContextMenuButton extends AidlParams {
private int buttonId;
@@ -61,7 +63,7 @@ public class AContextMenuButton implements Parcelable {
return rightIconName;
}
- public boolean isNeedColorizeIcon() {
+ public boolean isTintIcon() {
return needColorizeIcon;
}
@@ -69,33 +71,25 @@ public class AContextMenuButton implements Parcelable {
return enabled;
}
- public static Creator getCREATOR() {
- return CREATOR;
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putInt("buttonId", buttonId);
+ bundle.putString("leftTextCaption", leftTextCaption);
+ bundle.putString("rightTextCaption", rightTextCaption);
+ bundle.putString("leftIconName", leftIconName);
+ bundle.putString("rightIconName", rightIconName);
+ bundle.putBoolean("needColorizeIcon", needColorizeIcon);
+ bundle.putBoolean("enabled", enabled);
}
@Override
- public void writeToParcel(Parcel dest, int f) {
- dest.writeInt(buttonId);
- dest.writeString(leftTextCaption);
- dest.writeString(rightTextCaption);
- dest.writeString(leftIconName);
- dest.writeString(rightIconName);
- dest.writeInt(needColorizeIcon ? 1 : 0);
- dest.writeInt(enabled ? 1 : 0);
- }
-
- private void readFromParcel(Parcel in) {
- buttonId = in.readInt();
- leftTextCaption = in.readString();
- rightTextCaption = in.readString();
- leftIconName = in.readString();
- rightIconName = in.readString();
- needColorizeIcon = in.readInt() != 0;
- enabled = in.readInt() != 0;
- }
-
- @Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ buttonId = bundle.getInt("buttonId");
+ leftTextCaption = bundle.getString("leftTextCaption");
+ rightTextCaption = bundle.getString("rightTextCaption");
+ leftIconName = bundle.getString("leftIconName");
+ rightIconName = bundle.getString("rightIconName");
+ needColorizeIcon = bundle.getBoolean("needColorizeIcon");
+ enabled = bundle.getBoolean("enabled");
}
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.aidl
new file mode 100644
index 0000000000..bfde3cfda7
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.contextmenu;
+
+parcelable ContextMenuButtonsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.java
similarity index 59%
rename from OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.java
index 0bdfb25feb..0d26f40f38 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/ContextMenuButtonsParams.java
@@ -1,12 +1,14 @@
-package net.osmand.aidl.contextmenu;
+package net.osmand.aidlapi.contextmenu;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
+
+import net.osmand.aidlapi.AidlParams;
import java.util.ArrayList;
import java.util.List;
-public class ContextMenuButtonsParams implements Parcelable {
+public class ContextMenuButtonsParams extends AidlParams {
private AContextMenuButton leftButton;
private AContextMenuButton rightButton;
@@ -17,7 +19,7 @@ public class ContextMenuButtonsParams implements Parcelable {
private long callbackId = -1L;
- private List pointsIds = new ArrayList<>();
+ private ArrayList pointsIds = new ArrayList<>();
public ContextMenuButtonsParams(AContextMenuButton leftButton, AContextMenuButton rightButton, String id, String appPackage, String layerId, long callbackId, List pointsIds) {
this.leftButton = leftButton;
@@ -26,7 +28,9 @@ public class ContextMenuButtonsParams implements Parcelable {
this.appPackage = appPackage;
this.layerId = layerId;
this.callbackId = callbackId;
- this.pointsIds = pointsIds;
+ if (pointsIds != null) {
+ this.pointsIds.addAll(pointsIds);
+ }
}
public ContextMenuButtonsParams(Parcel in) {
@@ -78,28 +82,25 @@ public class ContextMenuButtonsParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeParcelable(leftButton, flags);
- dest.writeParcelable(rightButton, flags);
- dest.writeString(id);
- dest.writeString(appPackage);
- dest.writeString(layerId);
- dest.writeLong(callbackId);
- dest.writeStringList(pointsIds);
- }
-
- private void readFromParcel(Parcel in) {
- leftButton = in.readParcelable(AContextMenuButton.class.getClassLoader());
- rightButton = in.readParcelable(AContextMenuButton.class.getClassLoader());
- id = in.readString();
- appPackage = in.readString();
- layerId = in.readString();
- callbackId = in.readLong();
- in.readStringList(pointsIds);
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("leftButton", leftButton);
+ bundle.putParcelable("rightButton", rightButton);
+ bundle.putString("id", id);
+ bundle.putString("appPackage", appPackage);
+ bundle.putString("layerId", layerId);
+ bundle.putLong("callbackId", callbackId);
+ bundle.putStringArrayList("pointsIds", pointsIds);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AContextMenuButton.class.getClassLoader());
+ leftButton = bundle.getParcelable("leftButton");
+ rightButton = bundle.getParcelable("rightButton");
+ id = bundle.getString("id");
+ appPackage = bundle.getString("appPackage");
+ layerId = bundle.getString("layerId");
+ callbackId = bundle.getLong("callbackId");
+ pointsIds = bundle.getStringArrayList("pointsIds");
}
}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.aidl
similarity index 51%
rename from OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.aidl
index 557a8e5113..0f13a9d455 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.contextmenu;
+package net.osmand.aidlapi.contextmenu;
parcelable RemoveContextMenuButtonsParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.java
new file mode 100644
index 0000000000..c0182211a5
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/RemoveContextMenuButtonsParams.java
@@ -0,0 +1,53 @@
+package net.osmand.aidlapi.contextmenu;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveContextMenuButtonsParams extends AidlParams {
+
+ private String paramsId;
+ private long callbackId = -1L;
+
+ public RemoveContextMenuButtonsParams(String paramsId, long callbackId) {
+ this.paramsId = paramsId;
+ this.callbackId = callbackId;
+ }
+
+ public RemoveContextMenuButtonsParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveContextMenuButtonsParams createFromParcel(Parcel in) {
+ return new RemoveContextMenuButtonsParams(in);
+ }
+
+ @Override
+ public RemoveContextMenuButtonsParams[] newArray(int size) {
+ return new RemoveContextMenuButtonsParams[size];
+ }
+ };
+
+ public String getParamsId() {
+ return paramsId;
+ }
+
+ public long getCallbackId() {
+ return callbackId;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("paramsId", paramsId);
+ bundle.putLong("callbackId", callbackId);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ paramsId = bundle.getString("paramsId");
+ callbackId = bundle.getLong("callbackId");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.aidl
similarity index 51%
rename from OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.aidl
index f5482b3452..100d909c13 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.contextmenu;
+package net.osmand.aidlapi.contextmenu;
parcelable UpdateContextMenuButtonsParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.java
new file mode 100644
index 0000000000..8bbef5eff0
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/contextmenu/UpdateContextMenuButtonsParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.contextmenu;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateContextMenuButtonsParams extends AidlParams {
+
+ private ContextMenuButtonsParams buttonsParams;
+
+ public UpdateContextMenuButtonsParams(ContextMenuButtonsParams widget) {
+ this.buttonsParams = widget;
+ }
+
+ public UpdateContextMenuButtonsParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateContextMenuButtonsParams createFromParcel(Parcel in) {
+ return new UpdateContextMenuButtonsParams(in);
+ }
+
+ @Override
+ public UpdateContextMenuButtonsParams[] newArray(int size) {
+ return new UpdateContextMenuButtonsParams[size];
+ }
+ };
+
+ public ContextMenuButtonsParams getContextMenuButtonsParams() {
+ return buttonsParams;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("buttonsParams", buttonsParams);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(ContextMenuButtonsParams.class.getClassLoader());
+ buttonsParams = bundle.getParcelable("buttonsParams");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.aidl
new file mode 100644
index 0000000000..72f2e95d61
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.copyfile;
+
+parcelable CopyFileParams;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java
similarity index 66%
rename from OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java
index e795d5b7b7..2b18172717 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/copyfile/CopyFileParams.java
@@ -1,10 +1,13 @@
-package net.osmand.aidl.copyfile;
+package net.osmand.aidlapi.copyfile;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
-public class CopyFileParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class CopyFileParams extends AidlParams {
+
private String fileName;
private byte[] filePartData;
private long startTime;
@@ -17,6 +20,22 @@ public class CopyFileParams implements Parcelable {
this.done = done;
}
+ protected CopyFileParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CopyFileParams createFromParcel(Parcel in) {
+ return new CopyFileParams(in);
+ }
+
+ @Override
+ public CopyFileParams[] newArray(int size) {
+ return new CopyFileParams[size];
+ }
+ };
+
public String getFileName() {
return fileName;
}
@@ -33,29 +52,20 @@ public class CopyFileParams implements Parcelable {
return startTime;
}
- protected CopyFileParams(Parcel in) {
- fileName = in.readString();
- filePartData = in.createByteArray();
- startTime = in.readLong();
- done = in.readByte() == 0;
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ bundle.putByteArray("filePartData", filePartData);
+ bundle.putLong("startTime", startTime);
+ bundle.putBoolean("done", done);
}
- public static final Creator CREATOR = new Creator() {
- @Override
- public CopyFileParams createFromParcel(Parcel in) {
- return new CopyFileParams(in);
- }
-
- @Override
- public CopyFileParams[] newArray(int size) {
- return new CopyFileParams[size];
- }
- };
-
-
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ fileName = bundle.getString("fileName");
+ filePartData = bundle.getByteArray("filePartData");
+ startTime = bundle.getLong("startTime");
+ done = bundle.getBoolean("done");
}
@Override
@@ -67,12 +77,4 @@ public class CopyFileParams implements Parcelable {
", done=" + done +
" }";
}
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(fileName);
- dest.writeByteArray(filePartData);
- dest.writeLong(startTime);
- dest.writeByte((byte) (done ? 0 : 1));
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.aidl
new file mode 100644
index 0000000000..b055e6d135
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.customization;
+
+parcelable CustomizationInfoParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.java
similarity index 57%
rename from OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.java
index 0e83f7f41c..ea5ef81771 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/CustomizationInfoParams.java
@@ -1,18 +1,18 @@
-package net.osmand.aidl.customization;
+package net.osmand.aidlapi.customization;
-import android.annotation.SuppressLint;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-import net.osmand.aidl.navdrawer.NavDrawerFooterParams;
-import net.osmand.aidl.navdrawer.NavDrawerHeaderParams;
-import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams;
-import net.osmand.aidl.plugins.PluginParams;
+import net.osmand.aidlapi.AidlParams;
+import net.osmand.aidlapi.navdrawer.NavDrawerFooterParams;
+import net.osmand.aidlapi.navdrawer.NavDrawerHeaderParams;
+import net.osmand.aidlapi.navdrawer.SetNavDrawerItemsParams;
+import net.osmand.aidlapi.plugins.PluginParams;
import java.util.ArrayList;
import java.util.List;
-public class CustomizationInfoParams implements Parcelable {
+public class CustomizationInfoParams extends AidlParams {
private OsmandSettingsParams settingsParams;
@@ -25,10 +25,10 @@ public class CustomizationInfoParams implements Parcelable {
private ArrayList pluginsParams = new ArrayList<>();
- private List featuresEnabledIds = new ArrayList<>();
- private List featuresDisabledIds = new ArrayList<>();
- private List featuresEnabledPatterns = new ArrayList<>();
- private List featuresDisabledPatterns = new ArrayList<>();
+ private ArrayList featuresEnabledIds = new ArrayList<>();
+ private ArrayList featuresDisabledIds = new ArrayList<>();
+ private ArrayList featuresEnabledPatterns = new ArrayList<>();
+ private ArrayList featuresDisabledPatterns = new ArrayList<>();
public CustomizationInfoParams(OsmandSettingsParams settingsParams,
NavDrawerHeaderParams navDrawerHeaderParams,
@@ -130,43 +130,44 @@ public class CustomizationInfoParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(settingsParams, flags);
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("settingsParams", settingsParams);
- out.writeParcelable(navDrawerHeaderParams, flags);
- out.writeParcelable(navDrawerFooterParams, flags);
- out.writeParcelable(navDrawerItemsParams, flags);
+ bundle.putParcelable("navDrawerHeaderParams", navDrawerHeaderParams);
+ bundle.putParcelable("navDrawerFooterParams", navDrawerFooterParams);
+ bundle.putParcelable("navDrawerItemsParams", navDrawerItemsParams);
- out.writeTypedList(visibilityWidgetsParams);
- out.writeTypedList(availabilityWidgetsParams);
- out.writeTypedList(pluginsParams);
+ bundle.putParcelableArrayList("visibilityWidgetsParams", visibilityWidgetsParams);
+ bundle.putParcelableArrayList("availabilityWidgetsParams", availabilityWidgetsParams);
+ bundle.putParcelableArrayList("pluginsParams", pluginsParams);
- out.writeStringList(featuresEnabledIds);
- out.writeStringList(featuresDisabledIds);
- out.writeStringList(featuresEnabledPatterns);
- out.writeStringList(featuresDisabledPatterns);
- }
-
- @SuppressLint("ParcelClassLoader")
- private void readFromParcel(Parcel in) {
- settingsParams = in.readParcelable(OsmandSettingsParams.class.getClassLoader());
-
- navDrawerHeaderParams = in.readParcelable(NavDrawerHeaderParams.class.getClassLoader());
- navDrawerFooterParams = in.readParcelable(NavDrawerFooterParams.class.getClassLoader());
- navDrawerItemsParams = in.readParcelable(SetNavDrawerItemsParams.class.getClassLoader());
-
- in.readTypedList(visibilityWidgetsParams, SetWidgetsParams.CREATOR);
- in.readTypedList(availabilityWidgetsParams, SetWidgetsParams.CREATOR);
- in.readTypedList(pluginsParams, PluginParams.CREATOR);
-
- in.readStringList(featuresEnabledIds);
- in.readStringList(featuresDisabledIds);
- in.readStringList(featuresEnabledPatterns);
- in.readStringList(featuresDisabledPatterns);
+ bundle.putStringArrayList("featuresEnabledIds", featuresEnabledIds);
+ bundle.putStringArrayList("featuresDisabledIds", featuresDisabledIds);
+ bundle.putStringArrayList("featuresEnabledPatterns", featuresEnabledPatterns);
+ bundle.putStringArrayList("featuresDisabledPatterns", featuresDisabledPatterns);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(OsmandSettingsParams.class.getClassLoader());
+ settingsParams = bundle.getParcelable("settingsParams");
+
+ bundle.setClassLoader(NavDrawerHeaderParams.class.getClassLoader());
+ navDrawerHeaderParams = bundle.getParcelable("navDrawerHeaderParams");
+ bundle.setClassLoader(NavDrawerFooterParams.class.getClassLoader());
+ navDrawerFooterParams = bundle.getParcelable("navDrawerFooterParams");
+ bundle.setClassLoader(SetNavDrawerItemsParams.class.getClassLoader());
+ navDrawerItemsParams = bundle.getParcelable("navDrawerItemsParams");
+
+ bundle.setClassLoader(SetWidgetsParams.class.getClassLoader());
+ visibilityWidgetsParams = bundle.getParcelableArrayList("visibilityWidgetsParams");
+ availabilityWidgetsParams = bundle.getParcelableArrayList("availabilityWidgetsParams");
+ bundle.setClassLoader(PluginParams.class.getClassLoader());
+ pluginsParams = bundle.getParcelableArrayList("pluginsParams");
+
+ featuresEnabledIds = bundle.getStringArrayList("featuresEnabledIds");
+ featuresDisabledIds = bundle.getStringArrayList("featuresDisabledIds");
+ featuresEnabledPatterns = bundle.getStringArrayList("featuresEnabledPatterns");
+ featuresDisabledPatterns = bundle.getStringArrayList("featuresDisabledPatterns");
}
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.aidl
new file mode 100644
index 0000000000..261a2c96ea
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.customization;
+
+parcelable OsmandSettingsInfoParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java
similarity index 64%
rename from OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java
index ba4285af1d..c7cf7e16c5 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsInfoParams.java
@@ -1,11 +1,12 @@
-package net.osmand.aidl.customization;
+package net.osmand.aidlapi.customization;
-import android.annotation.SuppressLint;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
-public class OsmandSettingsInfoParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class OsmandSettingsInfoParams extends AidlParams {
private String sharedPreferencesName;
@@ -34,17 +35,12 @@ public class OsmandSettingsInfoParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(sharedPreferencesName);
- }
-
- @SuppressLint("ParcelClassLoader")
- private void readFromParcel(Parcel in) {
- sharedPreferencesName = in.readString();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("sharedPreferencesName", sharedPreferencesName);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ sharedPreferencesName = bundle.getString("sharedPreferencesName");
}
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.aidl
new file mode 100644
index 0000000000..859fc34ada
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.customization;
+
+parcelable OsmandSettingsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java
similarity index 60%
rename from OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java
index bff8c68018..dead6bbd2f 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/OsmandSettingsParams.java
@@ -1,20 +1,20 @@
-package net.osmand.aidl.customization;
+package net.osmand.aidlapi.customization;
-import android.annotation.SuppressLint;
import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-public class OsmandSettingsParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class OsmandSettingsParams extends AidlParams {
private String sharedPreferencesName;
- private Bundle bundle;
+ private Bundle bundleSettings;
public OsmandSettingsParams(@NonNull String sharedPreferencesName, @Nullable Bundle bundle) {
this.sharedPreferencesName = sharedPreferencesName;
- this.bundle = bundle;
+ this.bundleSettings = bundle;
}
public OsmandSettingsParams(Parcel in) {
@@ -38,23 +38,18 @@ public class OsmandSettingsParams implements Parcelable {
}
public Bundle getBundle() {
- return bundle;
+ return bundleSettings;
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(sharedPreferencesName);
- out.writeBundle(bundle);
- }
-
- @SuppressLint("ParcelClassLoader")
- private void readFromParcel(Parcel in) {
- sharedPreferencesName = in.readString();
- bundle = in.readBundle();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("sharedPreferencesName", sharedPreferencesName);
+ bundle.putBundle("bundleSettings", bundleSettings);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ sharedPreferencesName = bundle.getString("sharedPreferencesName");
+ bundleSettings = bundle.getBundle("bundleSettings");
}
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.aidl
new file mode 100644
index 0000000000..6b6c47cfe2
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.customization;
+
+parcelable SetWidgetsParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java
new file mode 100644
index 0000000000..ed9755710a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/customization/SetWidgetsParams.java
@@ -0,0 +1,59 @@
+package net.osmand.aidlapi.customization;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.support.annotation.Nullable;
+
+import net.osmand.aidlapi.AidlParams;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SetWidgetsParams extends AidlParams {
+
+ private String widgetKey;
+ private ArrayList appModesKeys = new ArrayList<>();
+
+ public SetWidgetsParams(String widgetKey, @Nullable List appModesKeys) {
+ this.widgetKey = widgetKey;
+ if (appModesKeys != null) {
+ this.appModesKeys.addAll(appModesKeys);
+ }
+ }
+
+ public SetWidgetsParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public SetWidgetsParams createFromParcel(Parcel in) {
+ return new SetWidgetsParams(in);
+ }
+
+ @Override
+ public SetWidgetsParams[] newArray(int size) {
+ return new SetWidgetsParams[size];
+ }
+ };
+
+ public String getWidgetKey() {
+ return widgetKey;
+ }
+
+ public List getAppModesKeys() {
+ return appModesKeys;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("widgetKey", widgetKey);
+ bundle.putStringArrayList("appModesKeys", appModesKeys);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ widgetKey = bundle.getString("widgetKey");
+ appModesKeys = bundle.getStringArrayList("appModesKeys");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.aidl
new file mode 100644
index 0000000000..9a3605a28e
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite;
+
+parcelable AFavorite;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.java
new file mode 100644
index 0000000000..1e645d2fae
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.java
@@ -0,0 +1,94 @@
+package net.osmand.aidlapi.favorite;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AFavorite extends AidlParams {
+
+ private double lat;
+ private double lon;
+ private String name;
+ private String description;
+ private String category;
+ private String color;
+ private boolean visible;
+
+ public AFavorite(double lat, double lon, String name, String description,
+ String category, String color, boolean visible) {
+ this.lat = lat;
+ this.lon = lon;
+ this.name = name;
+ this.description = description;
+ this.category = category;
+ this.color = color;
+ this.visible = visible;
+ }
+
+ public AFavorite(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AFavorite createFromParcel(Parcel in) {
+ return new AFavorite(in);
+ }
+
+ @Override
+ public AFavorite[] newArray(int size) {
+ return new AFavorite[size];
+ }
+ };
+
+ public double getLat() {
+ return lat;
+ }
+
+ public double getLon() {
+ return lon;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("lat", lat);
+ bundle.putDouble("lon", lon);
+ bundle.putString("name", name);
+ bundle.putString("description", description);
+ bundle.putString("category", category);
+ bundle.putString("color", color);
+ bundle.putBoolean("visible", visible);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ lat = bundle.getDouble("lat");
+ lon = bundle.getDouble("lon");
+ name = bundle.getString("name");
+ description = bundle.getString("description");
+ category = bundle.getString("category");
+ color = bundle.getString("color");
+ visible = bundle.getBoolean("visible");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.aidl
new file mode 100644
index 0000000000..07c0b0da86
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite;
+
+parcelable AddFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.java
new file mode 100644
index 0000000000..40545fe43d
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/AddFavoriteParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.favorite;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddFavoriteParams extends AidlParams {
+
+ private AFavorite favorite;
+
+ public AddFavoriteParams(AFavorite favorite) {
+ this.favorite = favorite;
+ }
+
+ public AddFavoriteParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddFavoriteParams createFromParcel(Parcel in) {
+ return new AddFavoriteParams(in);
+ }
+
+ @Override
+ public AddFavoriteParams[] newArray(int size) {
+ return new AddFavoriteParams[size];
+ }
+ };
+
+ public AFavorite getFavorite() {
+ return favorite;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favorite", favorite);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavorite.class.getClassLoader());
+ favorite = bundle.getParcelable("favorite");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.aidl
new file mode 100644
index 0000000000..a6896b1645
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite;
+
+parcelable RemoveFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.java
new file mode 100644
index 0000000000..9144d2ba38
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/RemoveFavoriteParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.favorite;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveFavoriteParams extends AidlParams {
+
+ private AFavorite favorite;
+
+ public RemoveFavoriteParams(AFavorite favorite) {
+ this.favorite = favorite;
+ }
+
+ public RemoveFavoriteParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveFavoriteParams createFromParcel(Parcel in) {
+ return new RemoveFavoriteParams(in);
+ }
+
+ @Override
+ public RemoveFavoriteParams[] newArray(int size) {
+ return new RemoveFavoriteParams[size];
+ }
+ };
+
+ public AFavorite getFavorite() {
+ return favorite;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favorite", favorite);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavorite.class.getClassLoader());
+ favorite = bundle.getParcelable("favorite");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.aidl
new file mode 100644
index 0000000000..8b2438dc65
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite;
+
+parcelable UpdateFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.java
new file mode 100644
index 0000000000..0d2d226a4b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/UpdateFavoriteParams.java
@@ -0,0 +1,54 @@
+package net.osmand.aidlapi.favorite;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateFavoriteParams extends AidlParams {
+
+ private AFavorite favoritePrev;
+ private AFavorite favoriteNew;
+
+ public UpdateFavoriteParams(AFavorite favoritePrev, AFavorite favoriteNew) {
+ this.favoritePrev = favoritePrev;
+ this.favoriteNew = favoriteNew;
+ }
+
+ public UpdateFavoriteParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateFavoriteParams createFromParcel(Parcel in) {
+ return new UpdateFavoriteParams(in);
+ }
+
+ @Override
+ public UpdateFavoriteParams[] newArray(int size) {
+ return new UpdateFavoriteParams[size];
+ }
+ };
+
+ public AFavorite getFavoritePrev() {
+ return favoritePrev;
+ }
+
+ public AFavorite getFavoriteNew() {
+ return favoriteNew;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favoritePrev", favoritePrev);
+ bundle.putParcelable("favoriteNew", favoriteNew);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavorite.class.getClassLoader());
+ favoritePrev = bundle.getParcelable("favoritePrev");
+ favoriteNew = bundle.getParcelable("favoriteNew");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.aidl
new file mode 100644
index 0000000000..6c687297f1
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite.group;
+
+parcelable AFavoriteGroup;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.java
new file mode 100644
index 0000000000..3f04ab5ebc
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AFavoriteGroup.java
@@ -0,0 +1,61 @@
+package net.osmand.aidlapi.favorite.group;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AFavoriteGroup extends AidlParams {
+
+ private String name;
+ private String color;
+ private boolean visible;
+
+ public AFavoriteGroup(String name, String color, boolean visible) {
+ this.name = name;
+ this.color = color;
+ this.visible = visible;
+ }
+
+ public AFavoriteGroup(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AFavoriteGroup createFromParcel(Parcel in) {
+ return new AFavoriteGroup(in);
+ }
+
+ @Override
+ public AFavoriteGroup[] newArray(int size) {
+ return new AFavoriteGroup[size];
+ }
+ };
+
+ public String getName() {
+ return name;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("name", name);
+ bundle.putString("color", color);
+ bundle.putBoolean("visible", visible);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ name = bundle.getString("name");
+ color = bundle.getString("color");
+ visible = bundle.getBoolean("visible");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.aidl
new file mode 100644
index 0000000000..4d10ed6cb0
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite.group;
+
+parcelable AddFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.java
new file mode 100644
index 0000000000..232c0862a1
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/AddFavoriteGroupParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.favorite.group;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddFavoriteGroupParams extends AidlParams {
+
+ private AFavoriteGroup favoriteGroup;
+
+ public AddFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
+ this.favoriteGroup = favoriteGroup;
+ }
+
+ public AddFavoriteGroupParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddFavoriteGroupParams createFromParcel(Parcel in) {
+ return new AddFavoriteGroupParams(in);
+ }
+
+ @Override
+ public AddFavoriteGroupParams[] newArray(int size) {
+ return new AddFavoriteGroupParams[size];
+ }
+ };
+
+ public AFavoriteGroup getFavoriteGroup() {
+ return favoriteGroup;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favoriteGroup", favoriteGroup);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavoriteGroup.class.getClassLoader());
+ favoriteGroup = bundle.getParcelable("favoriteGroup");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.aidl
new file mode 100644
index 0000000000..855f344776
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite.group;
+
+parcelable RemoveFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.java
new file mode 100644
index 0000000000..3f2716823c
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/RemoveFavoriteGroupParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.favorite.group;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveFavoriteGroupParams extends AidlParams {
+
+ private AFavoriteGroup favoriteGroup;
+
+ public RemoveFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
+ this.favoriteGroup = favoriteGroup;
+ }
+
+ public RemoveFavoriteGroupParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveFavoriteGroupParams createFromParcel(Parcel in) {
+ return new RemoveFavoriteGroupParams(in);
+ }
+
+ @Override
+ public RemoveFavoriteGroupParams[] newArray(int size) {
+ return new RemoveFavoriteGroupParams[size];
+ }
+ };
+
+ public AFavoriteGroup getFavoriteGroup() {
+ return favoriteGroup;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favoriteGroup", favoriteGroup);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavoriteGroup.class.getClassLoader());
+ favoriteGroup = bundle.getParcelable("favoriteGroup");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.aidl
new file mode 100644
index 0000000000..b7b46bf6ca
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.favorite.group;
+
+parcelable UpdateFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.java b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.java
new file mode 100644
index 0000000000..cab176560b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/favorite/group/UpdateFavoriteGroupParams.java
@@ -0,0 +1,54 @@
+package net.osmand.aidlapi.favorite.group;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateFavoriteGroupParams extends AidlParams {
+
+ private AFavoriteGroup favoriteGroupPrev;
+ private AFavoriteGroup favoriteGroupNew;
+
+ public UpdateFavoriteGroupParams(AFavoriteGroup favoriteGroup, AFavoriteGroup favoriteGroupNew) {
+ this.favoriteGroupPrev = favoriteGroup;
+ this.favoriteGroupNew = favoriteGroupNew;
+ }
+
+ public UpdateFavoriteGroupParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateFavoriteGroupParams createFromParcel(Parcel in) {
+ return new UpdateFavoriteGroupParams(in);
+ }
+
+ @Override
+ public UpdateFavoriteGroupParams[] newArray(int size) {
+ return new UpdateFavoriteGroupParams[size];
+ }
+ };
+
+ public AFavoriteGroup getFavoriteGroupPrev() {
+ return favoriteGroupPrev;
+ }
+
+ public AFavoriteGroup getFavoriteGroupNew() {
+ return favoriteGroupNew;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("favoriteGroupPrev", favoriteGroupPrev);
+ bundle.putParcelable("favoriteGroupNew", favoriteGroupNew);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AFavoriteGroup.class.getClassLoader());
+ favoriteGroupPrev = bundle.getParcelable("favoriteGroupPrev");
+ favoriteGroupNew = bundle.getParcelable("favoriteGroupNew");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.aidl
new file mode 100644
index 0000000000..abbc03669c
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable AGpxBitmap;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java
new file mode 100644
index 0000000000..6ba3f8ea4b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java
@@ -0,0 +1,48 @@
+package net.osmand.aidlapi.gpx;
+
+import android.graphics.Bitmap;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.support.annotation.NonNull;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AGpxBitmap extends AidlParams {
+
+ private Bitmap bitmap;
+
+ public AGpxBitmap(@NonNull Bitmap bitmap) {
+ this.bitmap = bitmap;
+ }
+
+ public AGpxBitmap(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public Bitmap getBitmap() {
+ return bitmap;
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AGpxBitmap createFromParcel(Parcel in) {
+ return new AGpxBitmap(in);
+ }
+
+ @Override
+ public AGpxBitmap[] newArray(int size) {
+ return new AGpxBitmap[size];
+ }
+ };
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("bitmap", bitmap);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(Bitmap.class.getClassLoader());
+ bitmap = bundle.getParcelable("bitmap");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.aidl
new file mode 100644
index 0000000000..4027c70c66
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable AGpxFile;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java
new file mode 100644
index 0000000000..e293875f10
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java
@@ -0,0 +1,88 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AGpxFile extends AidlParams {
+
+ private String fileName;
+ private long modifiedTime;
+ private long fileSize;
+ private boolean active;
+ private String color;
+ private AGpxFileDetails details;
+
+ public AGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active, String color, @Nullable AGpxFileDetails details) {
+ this.fileName = fileName;
+ this.modifiedTime = modifiedTime;
+ this.fileSize = fileSize;
+ this.active = active;
+ this.color = color;
+ this.details = details;
+ }
+
+ public AGpxFile(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AGpxFile createFromParcel(Parcel in) {
+ return new AGpxFile(in);
+ }
+
+ @Override
+ public AGpxFile[] newArray(int size) {
+ return new AGpxFile[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public long getModifiedTime() {
+ return modifiedTime;
+ }
+
+ public long getFileSize() {
+ return fileSize;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ public String getColor() {
+ return color;
+ }
+
+ public AGpxFileDetails getDetails() {
+ return details;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ bundle.putLong("modifiedTime", modifiedTime);
+ bundle.putLong("fileSize", fileSize);
+ bundle.putBoolean("active", active);
+ bundle.putParcelable("details", details);
+ bundle.putString("color", color);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AGpxFileDetails.class.getClassLoader());
+ fileName = bundle.getString("fileName");
+ modifiedTime = bundle.getLong("modifiedTime");
+ fileSize = bundle.getLong("fileSize");
+ active = bundle.getBoolean("active");
+ details = bundle.getParcelable("details");
+ color = bundle.getString("color");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.aidl
new file mode 100644
index 0000000000..278dae038d
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable AGpxFileDetails;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.java
new file mode 100644
index 0000000000..1c2cbe2130
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.java
@@ -0,0 +1,197 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+public class AGpxFileDetails extends AidlParams {
+
+ private float totalDistance = 0;
+ private int totalTracks = 0;
+ private long startTime = Long.MAX_VALUE;
+ private long endTime = Long.MIN_VALUE;
+ private long timeSpan = 0;
+ private long timeMoving = 0;
+ private float totalDistanceMoving = 0;
+
+ private double diffElevationUp = 0;
+ private double diffElevationDown = 0;
+ private double avgElevation = 0;
+ private double minElevation = 99999;
+ private double maxElevation = -100;
+
+ private float minSpeed = Float.MAX_VALUE;
+ private float maxSpeed = 0;
+ private float avgSpeed;
+
+ private int points;
+ private int wptPoints = 0;
+
+ private ArrayList wptCategoryNames = new ArrayList<>();
+
+ public AGpxFileDetails(float totalDistance, int totalTracks,
+ long startTime, long endTime,
+ long timeSpan, long timeMoving, float totalDistanceMoving,
+ double diffElevationUp, double diffElevationDown,
+ double avgElevation, double minElevation, double maxElevation,
+ float minSpeed, float maxSpeed, float avgSpeed,
+ int points, int wptPoints, Set wptCategoryNames) {
+ this.totalDistance = totalDistance;
+ this.totalTracks = totalTracks;
+ this.startTime = startTime;
+ this.endTime = endTime;
+ this.timeSpan = timeSpan;
+ this.timeMoving = timeMoving;
+ this.totalDistanceMoving = totalDistanceMoving;
+ this.diffElevationUp = diffElevationUp;
+ this.diffElevationDown = diffElevationDown;
+ this.avgElevation = avgElevation;
+ this.minElevation = minElevation;
+ this.maxElevation = maxElevation;
+ this.minSpeed = minSpeed;
+ this.maxSpeed = maxSpeed;
+ this.avgSpeed = avgSpeed;
+ this.points = points;
+ this.wptPoints = wptPoints;
+ if (wptCategoryNames != null) {
+ this.wptCategoryNames.addAll(wptCategoryNames);
+ }
+ }
+
+ public AGpxFileDetails(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AGpxFileDetails createFromParcel(Parcel in) {
+ return new AGpxFileDetails(in);
+ }
+
+ @Override
+ public AGpxFileDetails[] newArray(int size) {
+ return new AGpxFileDetails[size];
+ }
+ };
+
+ public float getTotalDistance() {
+ return totalDistance;
+ }
+
+ public int getTotalTracks() {
+ return totalTracks;
+ }
+
+ public long getStartTime() {
+ return startTime;
+ }
+
+ public long getEndTime() {
+ return endTime;
+ }
+
+ public long getTimeSpan() {
+ return timeSpan;
+ }
+
+ public long getTimeMoving() {
+ return timeMoving;
+ }
+
+ public float getTotalDistanceMoving() {
+ return totalDistanceMoving;
+ }
+
+ public double getDiffElevationUp() {
+ return diffElevationUp;
+ }
+
+ public double getDiffElevationDown() {
+ return diffElevationDown;
+ }
+
+ public double getAvgElevation() {
+ return avgElevation;
+ }
+
+ public double getMinElevation() {
+ return minElevation;
+ }
+
+ public double getMaxElevation() {
+ return maxElevation;
+ }
+
+ public float getMinSpeed() {
+ return minSpeed;
+ }
+
+ public float getMaxSpeed() {
+ return maxSpeed;
+ }
+
+ public float getAvgSpeed() {
+ return avgSpeed;
+ }
+
+ public int getPoints() {
+ return points;
+ }
+
+ public int getWptPoints() {
+ return wptPoints;
+ }
+
+ public List getWptCategoryNames() {
+ return wptCategoryNames;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putFloat("totalDistance", totalDistance);
+ bundle.putInt("totalTracks", totalTracks);
+ bundle.putLong("startTime", startTime);
+ bundle.putLong("endTime", endTime);
+ bundle.putLong("timeSpan", timeSpan);
+ bundle.putLong("timeMoving", timeMoving);
+ bundle.putFloat("totalDistanceMoving", totalDistanceMoving);
+ bundle.putDouble("diffElevationUp", diffElevationUp);
+ bundle.putDouble("diffElevationDown", diffElevationDown);
+ bundle.putDouble("avgElevation", avgElevation);
+ bundle.putDouble("minElevation", minElevation);
+ bundle.putDouble("maxElevation", maxElevation);
+ bundle.putFloat("minSpeed", minSpeed);
+ bundle.putFloat("maxSpeed", maxSpeed);
+ bundle.putFloat("avgSpeed", avgSpeed);
+ bundle.putInt("points", points);
+ bundle.putInt("wptPoints", wptPoints);
+ bundle.putStringArrayList("wptCategoryNames", wptCategoryNames);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ totalDistance = bundle.getFloat("totalDistance");
+ totalTracks = bundle.getInt("totalTracks");
+ startTime = bundle.getLong("startTime");
+ endTime = bundle.getLong("endTime");
+ timeSpan = bundle.getLong("timeSpan");
+ timeMoving = bundle.getLong("timeMoving");
+ totalDistanceMoving = bundle.getFloat("totalDistanceMoving");
+ diffElevationUp = bundle.getDouble("diffElevationUp");
+ diffElevationDown = bundle.getDouble("diffElevationDown");
+ avgElevation = bundle.getDouble("avgElevation");
+ minElevation = bundle.getDouble("minElevation");
+ maxElevation = bundle.getDouble("maxElevation");
+ minSpeed = bundle.getFloat("minSpeed");
+ maxSpeed = bundle.getFloat("maxSpeed");
+ avgSpeed = bundle.getFloat("avgSpeed");
+ points = bundle.getInt("points");
+ wptPoints = bundle.getInt("wptPoints");
+ wptCategoryNames = bundle.getStringArrayList("wptCategoryNames");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.aidl
new file mode 100644
index 0000000000..57568e7249
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable ASelectedGpxFile;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java
new file mode 100644
index 0000000000..fc7e60cedb
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java
@@ -0,0 +1,76 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class ASelectedGpxFile extends AidlParams {
+
+ private String fileName;
+ private long modifiedTime;
+ private long fileSize;
+ private AGpxFileDetails details;
+
+ public ASelectedGpxFile(@NonNull String fileName) {
+ this.fileName = fileName;
+ }
+
+ public ASelectedGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, @Nullable AGpxFileDetails details) {
+ this.fileName = fileName;
+ this.modifiedTime = modifiedTime;
+ this.fileSize = fileSize;
+ this.details = details;
+ }
+
+ public ASelectedGpxFile(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ASelectedGpxFile createFromParcel(Parcel in) {
+ return new ASelectedGpxFile(in);
+ }
+
+ @Override
+ public ASelectedGpxFile[] newArray(int size) {
+ return new ASelectedGpxFile[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public long getModifiedTime() {
+ return modifiedTime;
+ }
+
+ public long getFileSize() {
+ return fileSize;
+ }
+
+ public AGpxFileDetails getDetails() {
+ return details;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ bundle.putLong("modifiedTime", modifiedTime);
+ bundle.putLong("fileSize", fileSize);
+ bundle.putParcelable("details", details);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AGpxFileDetails.class.getClassLoader());
+ fileName = bundle.getString("fileName");
+ modifiedTime = bundle.getLong("modifiedTime");
+ fileSize = bundle.getLong("fileSize");
+ details = bundle.getParcelable("details");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.aidl
similarity index 51%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.aidl
index b02d5c6e70..afbc7a812f 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
parcelable CreateGpxBitmapParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.java
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.java
index b6af1d354c..8287e8915f 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/CreateGpxBitmapParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/CreateGpxBitmapParams.java
@@ -1,12 +1,14 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
import android.net.Uri;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
+
+import net.osmand.aidlapi.AidlParams;
import java.io.File;
-public class CreateGpxBitmapParams implements Parcelable {
+public class CreateGpxBitmapParams extends AidlParams {
private File gpxFile;
private Uri gpxUri;
@@ -35,16 +37,17 @@ public class CreateGpxBitmapParams implements Parcelable {
readFromParcel(in);
}
- public static final Creator CREATOR = new
- Creator() {
- public CreateGpxBitmapParams createFromParcel(Parcel in) {
- return new CreateGpxBitmapParams(in);
- }
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public CreateGpxBitmapParams createFromParcel(Parcel in) {
+ return new CreateGpxBitmapParams(in);
+ }
- public CreateGpxBitmapParams[] newArray(int size) {
- return new CreateGpxBitmapParams[size];
- }
- };
+ @Override
+ public CreateGpxBitmapParams[] newArray(int size) {
+ return new CreateGpxBitmapParams[size];
+ }
+ };
public File getGpxFile() {
return gpxFile;
@@ -70,32 +73,28 @@ public class CreateGpxBitmapParams implements Parcelable {
return color;
}
- public void writeToParcel(Parcel out, int flags) {
- if (gpxFile != null) {
- out.writeString(gpxFile.getAbsolutePath());
- } else {
- out.writeString(null);
- }
- out.writeParcelable(gpxUri, flags);
- out.writeFloat(density);
- out.writeInt(widthPixels);
- out.writeInt(heightPixels);
- out.writeInt(color);
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("gpxAbsolutePath", gpxFile != null ? gpxFile.getAbsolutePath() : null);
+ bundle.putParcelable("gpxUri", gpxUri);
+ bundle.putFloat("density", density);
+ bundle.putInt("widthPixels", widthPixels);
+ bundle.putInt("heightPixels", heightPixels);
+ bundle.putInt("color", color);
}
- private void readFromParcel(Parcel in) {
- String gpxAbsolutePath = in.readString();
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(Uri.class.getClassLoader());
+
+ String gpxAbsolutePath = bundle.getString("gpxAbsolutePath");
if (gpxAbsolutePath != null) {
gpxFile = new File(gpxAbsolutePath);
}
- gpxUri = in.readParcelable(Uri.class.getClassLoader());
- density = in.readFloat();
- widthPixels = in.readInt();
- heightPixels = in.readInt();
- color = in.readInt();
- }
-
- public int describeContents() {
- return 0;
+ gpxUri = bundle.getParcelable("gpxUri");
+ density = bundle.getFloat("density");
+ widthPixels = bundle.getInt("widthPixels");
+ heightPixels = bundle.getInt("heightPixels");
+ color = bundle.getInt("color");
}
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.aidl
new file mode 100644
index 0000000000..ea355895bb
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable HideGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.java
new file mode 100644
index 0000000000..9f1f3d1897
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.java
@@ -0,0 +1,45 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class HideGpxParams extends AidlParams {
+
+ private String fileName;
+
+ public HideGpxParams(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public HideGpxParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public HideGpxParams createFromParcel(Parcel in) {
+ return new HideGpxParams(in);
+ }
+
+ @Override
+ public HideGpxParams[] newArray(int size) {
+ return new HideGpxParams[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ fileName = bundle.getString("fileName");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.aidl
new file mode 100644
index 0000000000..3b0f455708
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable ImportGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.java
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.java
index 6d2ed2cb88..603b95e468 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ImportGpxParams.java
@@ -1,12 +1,14 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
import android.net.Uri;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
+
+import net.osmand.aidlapi.AidlParams;
import java.io.File;
-public class ImportGpxParams implements Parcelable {
+public class ImportGpxParams extends AidlParams {
private File gpxFile;
private Uri gpxUri;
@@ -40,16 +42,17 @@ public class ImportGpxParams implements Parcelable {
readFromParcel(in);
}
- public static final Creator CREATOR = new
- Creator() {
- public ImportGpxParams createFromParcel(Parcel in) {
- return new ImportGpxParams(in);
- }
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ImportGpxParams createFromParcel(Parcel in) {
+ return new ImportGpxParams(in);
+ }
- public ImportGpxParams[] newArray(int size) {
- return new ImportGpxParams[size];
- }
- };
+ @Override
+ public ImportGpxParams[] newArray(int size) {
+ return new ImportGpxParams[size];
+ }
+ };
public File getGpxFile() {
return gpxFile;
@@ -75,32 +78,28 @@ public class ImportGpxParams implements Parcelable {
return show;
}
- public void writeToParcel(Parcel out, int flags) {
- if (gpxFile != null) {
- out.writeString(gpxFile.getAbsolutePath());
- } else {
- out.writeString(null);
- }
- out.writeParcelable(gpxUri, flags);
- out.writeString(sourceRawData);
- out.writeString(destinationPath);
- out.writeString(color);
- out.writeByte((byte) (show ? 1 : 0));
- }
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(Uri.class.getClassLoader());
- private void readFromParcel(Parcel in) {
- String gpxAbsolutePath = in.readString();
+ String gpxAbsolutePath = bundle.getString("gpxAbsolutePath");
if (gpxAbsolutePath != null) {
gpxFile = new File(gpxAbsolutePath);
}
- gpxUri = in.readParcelable(Uri.class.getClassLoader());
- sourceRawData = in.readString();
- destinationPath = in.readString();
- color = in.readString();
- show = in.readByte() == 1;
+ gpxUri = bundle.getParcelable("gpxUri");
+ sourceRawData = bundle.getString("sourceRawData");
+ destinationPath = bundle.getString("destinationPath");
+ color = bundle.getString("color");
+ show = bundle.getBoolean("show");
}
- public int describeContents() {
- return 0;
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("gpxAbsolutePath", gpxFile != null ? gpxFile.getAbsolutePath() : null);
+ bundle.putParcelable("gpxUri", gpxUri);
+ bundle.putString("sourceRawData", sourceRawData);
+ bundle.putString("destinationPath", destinationPath);
+ bundle.putString("color", color);
+ bundle.putBoolean("show", show);
}
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.aidl
new file mode 100644
index 0000000000..d061759842
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable RemoveGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.java
new file mode 100644
index 0000000000..bb45e67cfe
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.java
@@ -0,0 +1,45 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveGpxParams extends AidlParams {
+
+ private String fileName;
+
+ public RemoveGpxParams(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public RemoveGpxParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveGpxParams createFromParcel(Parcel in) {
+ return new RemoveGpxParams(in);
+ }
+
+ @Override
+ public RemoveGpxParams[] newArray(int size) {
+ return new RemoveGpxParams[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ fileName = bundle.getString("fileName");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.aidl
new file mode 100644
index 0000000000..946c43a744
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.gpx;
+
+parcelable ShowGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.java
new file mode 100644
index 0000000000..3162895999
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.java
@@ -0,0 +1,45 @@
+package net.osmand.aidlapi.gpx;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class ShowGpxParams extends AidlParams {
+
+ private String fileName;
+
+ public ShowGpxParams(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public ShowGpxParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ShowGpxParams createFromParcel(Parcel in) {
+ return new ShowGpxParams(in);
+ }
+
+ @Override
+ public ShowGpxParams[] newArray(int size) {
+ return new ShowGpxParams[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ fileName = bundle.getString("fileName");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.aidl
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.aidl
index 14f4871540..2d5462de95 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
parcelable StartGpxRecordingParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.java
similarity index 62%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.java
index 139eac8ea3..e66e9e368d 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StartGpxRecordingParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StartGpxRecordingParams.java
@@ -1,9 +1,10 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StartGpxRecordingParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StartGpxRecordingParams extends AidlParams {
public StartGpxRecordingParams() {
@@ -24,17 +25,4 @@ public class StartGpxRecordingParams implements Parcelable {
return new StartGpxRecordingParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
-
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.aidl
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.aidl
index db08f1811a..8f92254f02 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
parcelable StopGpxRecordingParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.java
similarity index 62%
rename from OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.java
index ada47db418..7248d3ffdc 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/StopGpxRecordingParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/gpx/StopGpxRecordingParams.java
@@ -1,9 +1,10 @@
-package net.osmand.aidl.gpx;
+package net.osmand.aidlapi.gpx;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StopGpxRecordingParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StopGpxRecordingParams extends AidlParams {
public StopGpxRecordingParams() {
@@ -24,17 +25,4 @@ public class StopGpxRecordingParams implements Parcelable {
return new StopGpxRecordingParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
-
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.aidl b/OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.aidl
new file mode 100644
index 0000000000..c41d173bb5
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.map;
+
+parcelable ALatLon;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java b/OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.java
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java
rename to OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.java
index 377344fd6a..0ba9ee8cbd 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.map;
+package net.osmand.aidlapi.map;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class ALatLon implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class ALatLon extends AidlParams {
private double longitude;
private double latitude;
@@ -17,25 +19,26 @@ public class ALatLon implements Parcelable {
readFromParcel(in);
}
- public static final Parcelable.Creator CREATOR = new
- Parcelable.Creator() {
- public ALatLon createFromParcel(Parcel in) {
- return new ALatLon(in);
- }
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ALatLon createFromParcel(Parcel in) {
+ return new ALatLon(in);
+ }
- public ALatLon[] newArray(int size) {
- return new ALatLon[size];
- }
- };
+ @Override
+ public ALatLon[] newArray(int size) {
+ return new ALatLon[size];
+ }
+ };
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
int temp;
- temp = (int)Math.floor(latitude * 10000);
+ temp = (int) Math.floor(latitude * 10000);
result = prime * result + temp;
- temp = (int)Math.floor(longitude * 10000);
+ temp = (int) Math.floor(longitude * 10000);
result = prime * result + temp;
return result;
}
@@ -56,7 +59,7 @@ public class ALatLon implements Parcelable {
@Override
public String toString() {
- return "Lat " + ((float)latitude) + " Lon " + ((float)longitude);
+ return "Lat " + ((float) latitude) + " Lon " + ((float) longitude);
}
public double getLatitude() {
@@ -67,17 +70,15 @@ public class ALatLon implements Parcelable {
return longitude;
}
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
}
- public void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
}
-
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.aidl
similarity index 50%
rename from OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.aidl
index 9edde4f616..715d68eb5c 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.map;
+package net.osmand.aidlapi.map;
parcelable SetMapLocationParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.java
new file mode 100644
index 0000000000..9da5ee83f0
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/map/SetMapLocationParams.java
@@ -0,0 +1,69 @@
+package net.osmand.aidlapi.map;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class SetMapLocationParams extends AidlParams {
+
+ private double latitude;
+ private double longitude;
+ private int zoom;
+ private boolean animated;
+
+ public SetMapLocationParams(double latitude, double longitude, int zoom, boolean animated) {
+ this.latitude = latitude;
+ this.longitude = longitude;
+ this.zoom = zoom;
+ this.animated = animated;
+ }
+
+ public SetMapLocationParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public SetMapLocationParams createFromParcel(Parcel in) {
+ return new SetMapLocationParams(in);
+ }
+
+ @Override
+ public SetMapLocationParams[] newArray(int size) {
+ return new SetMapLocationParams[size];
+ }
+ };
+
+ public double getLatitude() {
+ return latitude;
+ }
+
+ public double getLongitude() {
+ return longitude;
+ }
+
+ public int getZoom() {
+ return zoom;
+ }
+
+ public boolean isAnimated() {
+ return animated;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
+ bundle.putInt("zoom", zoom);
+ bundle.putBoolean("animated", animated);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
+ zoom = bundle.getInt("zoom");
+ animated = bundle.getBoolean("animated");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.aidl
new file mode 100644
index 0000000000..01e745862a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer;
+
+parcelable AMapLayer;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.java
similarity index 58%
rename from OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java
rename to OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.java
index f1c982fa3c..72d6a925c6 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AMapLayer.java
@@ -1,16 +1,18 @@
-package net.osmand.aidl.maplayer;
+package net.osmand.aidlapi.maplayer;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-import net.osmand.aidl.maplayer.point.AMapPoint;
+import net.osmand.aidlapi.AidlParams;
+import net.osmand.aidlapi.maplayer.point.AMapPoint;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-public class AMapLayer implements Parcelable {
+public class AMapLayer extends AidlParams {
+
private String id;
private String name;
private float zOrder = 5.5f;
@@ -39,16 +41,17 @@ public class AMapLayer implements Parcelable {
readFromParcel(in);
}
- public static final Parcelable.Creator CREATOR = new
- Parcelable.Creator() {
- public AMapLayer createFromParcel(Parcel in) {
- return new AMapLayer(in);
- }
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AMapLayer createFromParcel(Parcel in) {
+ return new AMapLayer(in);
+ }
- public AMapLayer[] newArray(int size) {
- return new AMapLayer[size];
- }
- };
+ @Override
+ public AMapLayer[] newArray(int size) {
+ return new AMapLayer[size];
+ }
+ };
public String getId() {
return id;
@@ -138,39 +141,40 @@ public class AMapLayer implements Parcelable {
return bigPointMaxZoom;
}
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(id);
- out.writeString(name);
- out.writeFloat(zOrder);
- out.writeTypedList(new ArrayList<>(points.values()));
- out.writeByte((byte) (imagePoints ? 1 : 0));
- out.writeInt(circlePointMinZoom);
- out.writeInt(circlePointMaxZoom);
- out.writeInt(smallPointMinZoom);
- out.writeInt(smallPointMaxZoom);
- out.writeInt(bigPointMinZoom);
- out.writeInt(bigPointMaxZoom);
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("id", id);
+ bundle.putString("name", name);
+ bundle.putFloat("zOrder", zOrder);
+ bundle.putParcelableArrayList("points", new ArrayList<>(points.values()));
+ bundle.putBoolean("imagePoints", imagePoints);
+ bundle.putInt("circlePointMinZoom", circlePointMinZoom);
+ bundle.putInt("circlePointMaxZoom", circlePointMaxZoom);
+ bundle.putInt("smallPointMinZoom", smallPointMinZoom);
+ bundle.putInt("smallPointMaxZoom", smallPointMaxZoom);
+ bundle.putInt("bigPointMinZoom", bigPointMinZoom);
+ bundle.putInt("bigPointMaxZoom", bigPointMaxZoom);
}
- private void readFromParcel(Parcel in) {
- id = in.readString();
- name = in.readString();
- zOrder = in.readFloat();
- List pointList = new ArrayList<>();
- in.readTypedList(pointList, AMapPoint.CREATOR);
- for (AMapPoint p : pointList) {
- this.points.put(p.getId(), p);
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ id = bundle.getString("id");
+ name = bundle.getString("name");
+ zOrder = bundle.getFloat("zOrder");
+ imagePoints = bundle.getBoolean("imagePoints");
+ circlePointMinZoom = bundle.getInt("circlePointMinZoom");
+ circlePointMaxZoom = bundle.getInt("circlePointMaxZoom");
+ smallPointMinZoom = bundle.getInt("smallPointMinZoom");
+ smallPointMaxZoom = bundle.getInt("smallPointMaxZoom");
+ bigPointMinZoom = bundle.getInt("bigPointMinZoom");
+ bigPointMaxZoom = bundle.getInt("bigPointMaxZoom");
+
+ bundle.setClassLoader(AMapPoint.class.getClassLoader());
+ List pointList = bundle.getParcelableArrayList("points");
+ if (pointList != null) {
+ for (AMapPoint p : pointList) {
+ this.points.put(p.getId(), p);
+ }
}
- imagePoints = in.readByte() == 1;
- circlePointMinZoom = in.readInt();
- circlePointMaxZoom = in.readInt();
- smallPointMinZoom = in.readInt();
- smallPointMaxZoom = in.readInt();
- bigPointMinZoom = in.readInt();
- bigPointMaxZoom = in.readInt();
}
-
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.aidl
new file mode 100644
index 0000000000..fe3a15d72a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer;
+
+parcelable AddMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.java
new file mode 100644
index 0000000000..7cd52748e1
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/AddMapLayerParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.maplayer;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddMapLayerParams extends AidlParams {
+
+ private AMapLayer layer;
+
+ public AddMapLayerParams(AMapLayer layer) {
+ this.layer = layer;
+ }
+
+ public AddMapLayerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddMapLayerParams createFromParcel(Parcel in) {
+ return new AddMapLayerParams(in);
+ }
+
+ @Override
+ public AddMapLayerParams[] newArray(int size) {
+ return new AddMapLayerParams[size];
+ }
+ };
+
+ public AMapLayer getLayer() {
+ return layer;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("layer", layer);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapLayer.class.getClassLoader());
+ layer = bundle.getParcelable("layer");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.aidl
new file mode 100644
index 0000000000..0c88fdf48b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer;
+
+parcelable RemoveMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.java
new file mode 100644
index 0000000000..b778a49fcc
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/RemoveMapLayerParams.java
@@ -0,0 +1,45 @@
+package net.osmand.aidlapi.maplayer;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveMapLayerParams extends AidlParams {
+
+ private String id;
+
+ public RemoveMapLayerParams(String id) {
+ this.id = id;
+ }
+
+ public RemoveMapLayerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveMapLayerParams createFromParcel(Parcel in) {
+ return new RemoveMapLayerParams(in);
+ }
+
+ @Override
+ public RemoveMapLayerParams[] newArray(int size) {
+ return new RemoveMapLayerParams[size];
+ }
+ };
+
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("id", id);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ id = bundle.getString("id");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.aidl
new file mode 100644
index 0000000000..632739ec29
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer;
+
+parcelable UpdateMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.java
new file mode 100644
index 0000000000..d32c2aed83
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/UpdateMapLayerParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.maplayer;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateMapLayerParams extends AidlParams {
+
+ private AMapLayer layer;
+
+ public UpdateMapLayerParams(AMapLayer layer) {
+ this.layer = layer;
+ }
+
+ public UpdateMapLayerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateMapLayerParams createFromParcel(Parcel in) {
+ return new UpdateMapLayerParams(in);
+ }
+
+ @Override
+ public UpdateMapLayerParams[] newArray(int size) {
+ return new UpdateMapLayerParams[size];
+ }
+ };
+
+ public AMapLayer getLayer() {
+ return layer;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("layer", layer);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapLayer.class.getClassLoader());
+ layer = bundle.getParcelable("layer");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.aidl
new file mode 100644
index 0000000000..a00221d142
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer.point;
+
+parcelable AMapPoint;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.java
similarity index 52%
rename from OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java
rename to OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.java
index a47e8ccfe9..8b63c6ec55 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AMapPoint.java
@@ -1,16 +1,18 @@
-package net.osmand.aidl.maplayer.point;
+package net.osmand.aidlapi.maplayer.point;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-import net.osmand.aidl.map.ALatLon;
+import net.osmand.aidlapi.AidlParams;
+import net.osmand.aidlapi.map.ALatLon;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-public class AMapPoint implements Parcelable {
+public class AMapPoint extends AidlParams {
+
public static final String POINT_IMAGE_URI_PARAM = "point_image_uri_param";
public static final String POINT_SPEED_PARAM = "point_speed_param";
public static final String POINT_TYPE_ICON_NAME_PARAM = "point_type_icon_name_param";
@@ -24,10 +26,10 @@ public class AMapPoint implements Parcelable {
private String layerId;
private int color;
private ALatLon location;
- private List details = new ArrayList<>();
- private Map params = new HashMap<>();
+ private ArrayList details = new ArrayList<>();
+ private HashMap params = new HashMap<>();
- public AMapPoint(String id, String shortName, String fullName, String typeName, String layerId,
+ public AMapPoint(String id, String shortName, String fullName, String typeName, String layerId,
int color, ALatLon location, List details, Map params) {
this.id = id;
this.shortName = shortName;
@@ -48,16 +50,17 @@ public class AMapPoint implements Parcelable {
readFromParcel(in);
}
- public static final Creator CREATOR = new
- Creator() {
- public AMapPoint createFromParcel(Parcel in) {
- return new AMapPoint(in);
- }
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AMapPoint createFromParcel(Parcel in) {
+ return new AMapPoint(in);
+ }
- public AMapPoint[] newArray(int size) {
- return new AMapPoint[size];
- }
- };
+ @Override
+ public AMapPoint[] newArray(int size) {
+ return new AMapPoint[size];
+ }
+ };
public String getId() {
return id;
@@ -95,31 +98,31 @@ public class AMapPoint implements Parcelable {
return params;
}
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(id);
- out.writeString(shortName);
- out.writeString(fullName);
- out.writeString(typeName);
- out.writeInt(color);
- out.writeParcelable(location, flags);
- out.writeStringList(details);
- out.writeMap(params);
- out.writeString(layerId);
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("id", id);
+ bundle.putString("shortName", shortName);
+ bundle.putString("fullName", fullName);
+ bundle.putString("typeName", typeName);
+ bundle.putInt("color", color);
+ bundle.putParcelable("location", location);
+ bundle.putStringArrayList("details", details);
+ bundle.putSerializable("params", params);
+ bundle.putString("layerId", layerId);
}
- private void readFromParcel(Parcel in) {
- id = in.readString();
- shortName = in.readString();
- fullName = in.readString();
- typeName = in.readString();
- color = in.readInt();
- location = in.readParcelable(ALatLon.class.getClassLoader());
- in.readStringList(details);
- in.readMap(params, HashMap.class.getClassLoader());
- layerId = in.readString();
- }
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(ALatLon.class.getClassLoader());
- public int describeContents() {
- return 0;
+ id = bundle.getString("id");
+ shortName = bundle.getString("shortName");
+ fullName = bundle.getString("fullName");
+ typeName = bundle.getString("typeName");
+ color = bundle.getInt("color");
+ location = bundle.getParcelable("location");
+ details = bundle.getStringArrayList("details");
+ params = (HashMap) bundle.getSerializable("params");
+ layerId = bundle.getString("layerId");
}
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.aidl
new file mode 100644
index 0000000000..9d4d5d1ae0
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer.point;
+
+parcelable AddMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.java
new file mode 100644
index 0000000000..5e4c8177df
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/AddMapPointParams.java
@@ -0,0 +1,55 @@
+package net.osmand.aidlapi.maplayer.point;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddMapPointParams extends AidlParams {
+
+ private String layerId;
+ private AMapPoint point;
+
+ public AddMapPointParams(String layerId, AMapPoint point) {
+ this.layerId = layerId;
+ this.point = point;
+ }
+
+ public AddMapPointParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddMapPointParams createFromParcel(Parcel in) {
+ return new AddMapPointParams(in);
+ }
+
+ @Override
+ public AddMapPointParams[] newArray(int size) {
+ return new AddMapPointParams[size];
+ }
+ };
+
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public AMapPoint getPoint() {
+ return point;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("layerId", layerId);
+ bundle.putParcelable("point", point);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapPoint.class.getClassLoader());
+
+ layerId = bundle.getString("layerId");
+ point = bundle.getParcelable("point");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.aidl
new file mode 100644
index 0000000000..7e346391ec
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer.point;
+
+parcelable RemoveMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.java
new file mode 100644
index 0000000000..620c13bc10
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/RemoveMapPointParams.java
@@ -0,0 +1,55 @@
+package net.osmand.aidlapi.maplayer.point;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveMapPointParams extends AidlParams {
+
+ private String layerId;
+ private String pointId;
+
+ public RemoveMapPointParams(String layerId, String pointId) {
+ this.layerId = layerId;
+ this.pointId = pointId;
+ }
+
+ public RemoveMapPointParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveMapPointParams createFromParcel(Parcel in) {
+ return new RemoveMapPointParams(in);
+ }
+
+ @Override
+ public RemoveMapPointParams[] newArray(int size) {
+ return new RemoveMapPointParams[size];
+ }
+ };
+
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public String getPointId() {
+ return pointId;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("layerId", layerId);
+ bundle.putString("pointId", pointId);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ super.readFromBundle(bundle);
+
+ layerId = bundle.getString("layerId");
+ pointId = bundle.getString("pointId");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.aidl
new file mode 100644
index 0000000000..a4f1591dc9
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer.point;
+
+parcelable ShowMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.java
new file mode 100644
index 0000000000..08be287088
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/ShowMapPointParams.java
@@ -0,0 +1,54 @@
+package net.osmand.aidlapi.maplayer.point;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class ShowMapPointParams extends AidlParams {
+
+ private String layerId;
+ private AMapPoint point;
+
+ public ShowMapPointParams(String layerId, AMapPoint point) {
+ this.layerId = layerId;
+ this.point = point;
+ }
+
+ public ShowMapPointParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ShowMapPointParams createFromParcel(Parcel in) {
+ return new ShowMapPointParams(in);
+ }
+
+ @Override
+ public ShowMapPointParams[] newArray(int size) {
+ return new ShowMapPointParams[size];
+ }
+ };
+
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public AMapPoint getPoint() {
+ return point;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("layerId", layerId);
+ bundle.putParcelable("point", point);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapPoint.class.getClassLoader());
+ layerId = bundle.getString("layerId");
+ point = bundle.getParcelable("point");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.aidl
new file mode 100644
index 0000000000..e4f80785da
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.maplayer.point;
+
+parcelable UpdateMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.java b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.java
new file mode 100644
index 0000000000..77f85e180f
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/maplayer/point/UpdateMapPointParams.java
@@ -0,0 +1,62 @@
+package net.osmand.aidlapi.maplayer.point;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateMapPointParams extends AidlParams {
+
+ private String layerId;
+ private AMapPoint point;
+ private boolean updateOpenedMenuAndMap;
+
+ public UpdateMapPointParams(String layerId, AMapPoint point, boolean updateOpenedMenuAndMap) {
+ this.layerId = layerId;
+ this.point = point;
+ this.updateOpenedMenuAndMap = updateOpenedMenuAndMap;
+ }
+
+ public UpdateMapPointParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateMapPointParams createFromParcel(Parcel in) {
+ return new UpdateMapPointParams(in);
+ }
+
+ @Override
+ public UpdateMapPointParams[] newArray(int size) {
+ return new UpdateMapPointParams[size];
+ }
+ };
+
+ public String getLayerId() {
+ return layerId;
+ }
+
+ public AMapPoint getPoint() {
+ return point;
+ }
+
+ public boolean isUpdateOpenedMenuAndMap() {
+ return updateOpenedMenuAndMap;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("layerId", layerId);
+ bundle.putParcelable("point", point);
+ bundle.putBoolean("updateOpenedMenuAndMap", updateOpenedMenuAndMap);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapPoint.class.getClassLoader());
+ layerId = bundle.getString("layerId");
+ point = bundle.getParcelable("point");
+ updateOpenedMenuAndMap = bundle.getBoolean("updateOpenedMenuAndMap");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.aidl
new file mode 100644
index 0000000000..26de4179b1
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapmarker;
+
+parcelable AMapMarker;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.java b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.java
new file mode 100644
index 0000000000..5424d95145
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.java
@@ -0,0 +1,61 @@
+package net.osmand.aidlapi.mapmarker;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+import net.osmand.aidlapi.map.ALatLon;
+
+public class AMapMarker extends AidlParams {
+
+ private ALatLon latLon;
+ private String name;
+
+ public AMapMarker(ALatLon latLon, String name) {
+ if (latLon == null) {
+ throw new IllegalArgumentException("latLon cannot be null");
+ }
+ if (name == null) {
+ name = "";
+ }
+ this.latLon = latLon;
+ this.name = name;
+ }
+
+ public AMapMarker(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AMapMarker createFromParcel(Parcel in) {
+ return new AMapMarker(in);
+ }
+
+ @Override
+ public AMapMarker[] newArray(int size) {
+ return new AMapMarker[size];
+ }
+ };
+
+ public ALatLon getLatLon() {
+ return latLon;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("latLon", latLon);
+ bundle.putString("name", name);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(ALatLon.class.getClassLoader());
+ latLon = bundle.getParcelable("latLon");
+ name = bundle.getString("name");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.aidl
new file mode 100644
index 0000000000..7dd95ebf94
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapmarker;
+
+parcelable AddMapMarkerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.java
new file mode 100644
index 0000000000..25bd529929
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AddMapMarkerParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.mapmarker;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddMapMarkerParams extends AidlParams {
+
+ private AMapMarker marker;
+
+ public AddMapMarkerParams(AMapMarker marker) {
+ this.marker = marker;
+ }
+
+ public AddMapMarkerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddMapMarkerParams createFromParcel(Parcel in) {
+ return new AddMapMarkerParams(in);
+ }
+
+ @Override
+ public AddMapMarkerParams[] newArray(int size) {
+ return new AddMapMarkerParams[size];
+ }
+ };
+
+ public AMapMarker getMarker() {
+ return marker;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("marker", marker);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapMarker.class.getClassLoader());
+ marker = bundle.getParcelable("marker");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.aidl
new file mode 100644
index 0000000000..174bffb9b4
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapmarker;
+
+parcelable RemoveMapMarkerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.java
new file mode 100644
index 0000000000..6c8db4fdb2
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkerParams.java
@@ -0,0 +1,59 @@
+package net.osmand.aidlapi.mapmarker;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveMapMarkerParams extends AidlParams {
+
+ private AMapMarker marker;
+ private boolean ignoreCoordinates;
+
+ public RemoveMapMarkerParams(AMapMarker marker) {
+ this.marker = marker;
+ this.ignoreCoordinates = false;
+ }
+
+ public RemoveMapMarkerParams(AMapMarker marker, boolean ignoreCoordinates) {
+ this.marker = marker;
+ this.ignoreCoordinates = ignoreCoordinates;
+ }
+
+ public RemoveMapMarkerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveMapMarkerParams createFromParcel(Parcel in) {
+ return new RemoveMapMarkerParams(in);
+ }
+
+ @Override
+ public RemoveMapMarkerParams[] newArray(int size) {
+ return new RemoveMapMarkerParams[size];
+ }
+ };
+
+ public AMapMarker getMarker() {
+ return marker;
+ }
+
+ public boolean getIgnoreCoordinates() {
+ return ignoreCoordinates;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("marker", marker);
+ bundle.putBoolean("ignoreCoordinates", ignoreCoordinates);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapMarker.class.getClassLoader());
+ marker = bundle.getParcelable("marker");
+ ignoreCoordinates = bundle.getBoolean("ignoreCoordinates");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.aidl
new file mode 100644
index 0000000000..abcaadd543
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapmarker;
+
+parcelable RemoveMapMarkersParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.java
new file mode 100644
index 0000000000..d47d9f202c
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/RemoveMapMarkersParams.java
@@ -0,0 +1,28 @@
+package net.osmand.aidlapi.mapmarker;
+
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveMapMarkersParams extends AidlParams {
+
+ public RemoveMapMarkersParams() {
+
+ }
+
+ public RemoveMapMarkersParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveMapMarkersParams createFromParcel(Parcel in) {
+ return new RemoveMapMarkersParams(in);
+ }
+
+ @Override
+ public RemoveMapMarkersParams[] newArray(int size) {
+ return new RemoveMapMarkersParams[size];
+ }
+ };
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.aidl
new file mode 100644
index 0000000000..99f3f97674
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapmarker;
+
+parcelable UpdateMapMarkerParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.java
new file mode 100644
index 0000000000..6324b33365
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapmarker/UpdateMapMarkerParams.java
@@ -0,0 +1,68 @@
+package net.osmand.aidlapi.mapmarker;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateMapMarkerParams extends AidlParams {
+
+ private AMapMarker markerPrev;
+ private AMapMarker markerNew;
+ private boolean ignoreCoordinates;
+
+ public UpdateMapMarkerParams(AMapMarker markerPrev, AMapMarker markerNew) {
+ this.markerPrev = markerPrev;
+ this.markerNew = markerNew;
+ this.ignoreCoordinates = false;
+ }
+
+ public UpdateMapMarkerParams(AMapMarker markerPrev, AMapMarker markerNew, boolean ignoreCoordinates) {
+ this.markerPrev = markerPrev;
+ this.markerNew = markerNew;
+ this.ignoreCoordinates = ignoreCoordinates;
+ }
+
+ public UpdateMapMarkerParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateMapMarkerParams createFromParcel(Parcel in) {
+ return new UpdateMapMarkerParams(in);
+ }
+
+ @Override
+ public UpdateMapMarkerParams[] newArray(int size) {
+ return new UpdateMapMarkerParams[size];
+ }
+ };
+
+ public AMapMarker getMarkerPrev() {
+ return markerPrev;
+ }
+
+ public AMapMarker getMarkerNew() {
+ return markerNew;
+ }
+
+ public boolean getIgnoreCoordinates() {
+ return ignoreCoordinates;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("markerPrev", markerPrev);
+ bundle.putParcelable("markerNew", markerNew);
+ bundle.putBoolean("ignoreCoordinates", ignoreCoordinates);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapMarker.class.getClassLoader());
+ markerPrev = bundle.getParcelable("markerPrev");
+ markerNew = bundle.getParcelable("markerNew");
+ ignoreCoordinates = bundle.getBoolean("ignoreCoordinates");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.aidl
new file mode 100644
index 0000000000..30d13e158a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapwidget;
+
+parcelable AMapWidget;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.java b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.java
new file mode 100644
index 0000000000..8ff1debe9b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AMapWidget.java
@@ -0,0 +1,112 @@
+package net.osmand.aidlapi.mapwidget;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AMapWidget extends AidlParams {
+ private String id;
+ private String menuIconName;
+ private String menuTitle;
+ private String lightIconName;
+ private String darkIconName;
+ private String text;
+ private String description;
+ private int order;
+ private Intent intentOnClick;
+
+ public AMapWidget(String id, String menuIconName, String menuTitle,
+ String lightIconName, String darkIconName, String text, String description,
+ int order, Intent intentOnClick) {
+ this.id = id;
+ this.menuIconName = menuIconName;
+ this.menuTitle = menuTitle;
+ this.lightIconName = lightIconName;
+ this.darkIconName = darkIconName;
+ this.text = text;
+ this.description = description;
+ this.order = order;
+ this.intentOnClick = intentOnClick;
+ }
+
+ public AMapWidget(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AMapWidget createFromParcel(Parcel in) {
+ return new AMapWidget(in);
+ }
+
+ @Override
+ public AMapWidget[] newArray(int size) {
+ return new AMapWidget[size];
+ }
+ };
+
+ public String getId() {
+ return id;
+ }
+
+ public String getMenuIconName() {
+ return menuIconName;
+ }
+
+ public String getMenuTitle() {
+ return menuTitle;
+ }
+
+ public String getLightIconName() {
+ return lightIconName;
+ }
+
+ public String getDarkIconName() {
+ return darkIconName;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public int getOrder() {
+ return order;
+ }
+
+ public Intent getIntentOnClick() {
+ return intentOnClick;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("id", id);
+ bundle.putString("menuIconName", menuIconName);
+ bundle.putString("menuTitle", menuTitle);
+ bundle.putString("lightIconName", lightIconName);
+ bundle.putString("darkIconName", darkIconName);
+ bundle.putString("text", text);
+ bundle.putString("description", description);
+ bundle.putInt("order", order);
+ bundle.putParcelable("intentOnClick", intentOnClick);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(Intent.class.getClassLoader());
+ id = bundle.getString("id");
+ menuIconName = bundle.getString("menuIconName");
+ menuTitle = bundle.getString("menuTitle");
+ lightIconName = bundle.getString("lightIconName");
+ darkIconName = bundle.getString("darkIconName");
+ text = bundle.getString("text");
+ description = bundle.getString("description");
+ order = bundle.getInt("order");
+ intentOnClick = bundle.getParcelable("intentOnClick");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.aidl
new file mode 100644
index 0000000000..6759bef32e
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapwidget;
+
+parcelable AddMapWidgetParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.java
new file mode 100644
index 0000000000..fc039c05e4
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/AddMapWidgetParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.mapwidget;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class AddMapWidgetParams extends AidlParams {
+
+ private AMapWidget widget;
+
+ public AddMapWidgetParams(AMapWidget widget) {
+ this.widget = widget;
+ }
+
+ public AddMapWidgetParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public AddMapWidgetParams createFromParcel(Parcel in) {
+ return new AddMapWidgetParams(in);
+ }
+
+ @Override
+ public AddMapWidgetParams[] newArray(int size) {
+ return new AddMapWidgetParams[size];
+ }
+ };
+
+ public AMapWidget getWidget() {
+ return widget;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("widget", widget);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapWidget.class.getClassLoader());
+ widget = bundle.getParcelable("widget");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.aidl
new file mode 100644
index 0000000000..8801dad3f5
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapwidget;
+
+parcelable RemoveMapWidgetParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.java
new file mode 100644
index 0000000000..adbc6fc48d
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/RemoveMapWidgetParams.java
@@ -0,0 +1,45 @@
+package net.osmand.aidlapi.mapwidget;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class RemoveMapWidgetParams extends AidlParams {
+
+ private String id;
+
+ public RemoveMapWidgetParams(String id) {
+ this.id = id;
+ }
+
+ public RemoveMapWidgetParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public RemoveMapWidgetParams createFromParcel(Parcel in) {
+ return new RemoveMapWidgetParams(in);
+ }
+
+ @Override
+ public RemoveMapWidgetParams[] newArray(int size) {
+ return new RemoveMapWidgetParams[size];
+ }
+ };
+
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("id", id);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ id = bundle.getString("id");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.aidl
new file mode 100644
index 0000000000..bce32c0668
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.mapwidget;
+
+parcelable UpdateMapWidgetParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.java b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.java
new file mode 100644
index 0000000000..7e6166b54a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/mapwidget/UpdateMapWidgetParams.java
@@ -0,0 +1,46 @@
+package net.osmand.aidlapi.mapwidget;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class UpdateMapWidgetParams extends AidlParams {
+
+ private AMapWidget widget;
+
+ public UpdateMapWidgetParams(AMapWidget widget) {
+ this.widget = widget;
+ }
+
+ public UpdateMapWidgetParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public UpdateMapWidgetParams createFromParcel(Parcel in) {
+ return new UpdateMapWidgetParams(in);
+ }
+
+ @Override
+ public UpdateMapWidgetParams[] newArray(int size) {
+ return new UpdateMapWidgetParams[size];
+ }
+ };
+
+ public AMapWidget getWidget() {
+ return widget;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putParcelable("widget", widget);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ bundle.setClassLoader(AMapWidget.class.getClassLoader());
+ widget = bundle.getParcelable("widget");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.aidl
new file mode 100644
index 0000000000..47948ad135
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navdrawer;
+
+parcelable NavDrawerFooterParams;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java
similarity index 63%
rename from OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java
index 9bfd70193f..667016c5e0 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerFooterParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerFooterParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navdrawer;
+package net.osmand.aidlapi.navdrawer;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-public class NavDrawerFooterParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class NavDrawerFooterParams extends AidlParams {
@NonNull
private String packageName;
@@ -30,28 +32,14 @@ public class NavDrawerFooterParams implements Parcelable {
}
public NavDrawerFooterParams(@NonNull String packageName, @Nullable String intent,
- @Nullable String appName) {
+ @Nullable String appName) {
this.packageName = packageName;
this.intent = intent;
this.appName = appName;
}
protected NavDrawerFooterParams(Parcel in) {
- packageName = in.readString();
- intent = in.readString();
- appName = in.readString();
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(packageName);
- dest.writeString(intent);
- dest.writeString(appName);
- }
-
- @Override
- public int describeContents() {
- return 0;
+ readFromParcel(in);
}
public static final Creator CREATOR = new Creator() {
@@ -65,4 +53,18 @@ public class NavDrawerFooterParams implements Parcelable {
return new NavDrawerFooterParams[size];
}
};
-}
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ packageName = bundle.getString("packageName", "");
+ intent = bundle.getString("intent");
+ appName = bundle.getString("appName");
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("packageName", packageName);
+ bundle.putString("intent", intent);
+ bundle.putString("appName", appName);
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.aidl
new file mode 100644
index 0000000000..2a39fdd31f
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navdrawer;
+
+parcelable NavDrawerHeaderParams;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java
similarity index 62%
rename from OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java
index c88950fd10..3ea2d45eaf 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerHeaderParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerHeaderParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navdrawer;
+package net.osmand.aidlapi.navdrawer;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-public class NavDrawerHeaderParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class NavDrawerHeaderParams extends AidlParams {
@NonNull
private String imageUri;
@@ -30,28 +32,14 @@ public class NavDrawerHeaderParams implements Parcelable {
}
public NavDrawerHeaderParams(@NonNull String imageUri, @NonNull String packageName,
- @Nullable String intent) {
+ @Nullable String intent) {
this.imageUri = imageUri;
this.packageName = packageName;
this.intent = intent;
}
public NavDrawerHeaderParams(Parcel in) {
- imageUri = in.readString();
- packageName = in.readString();
- intent = in.readString();
- }
-
- @Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(imageUri);
- dest.writeString(packageName);
- dest.writeString(intent);
- }
-
- @Override
- public int describeContents() {
- return 0;
+ readFromParcel(in);
}
public static final Creator CREATOR = new Creator() {
@@ -65,4 +53,18 @@ public class NavDrawerHeaderParams implements Parcelable {
return new NavDrawerHeaderParams[size];
}
};
-}
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ imageUri = bundle.getString("imageUri", "");
+ packageName = bundle.getString("packageName", "");
+ intent = bundle.getString("intent");
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("imageUri", imageUri);
+ bundle.putString("packageName", packageName);
+ bundle.putString("intent", intent);
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.aidl
new file mode 100644
index 0000000000..a4c9a72089
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navdrawer;
+
+parcelable NavDrawerItem;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java
similarity index 66%
rename from OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java
index aedc585b65..e865a540f8 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/NavDrawerItem.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/NavDrawerItem.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navdrawer;
+package net.osmand.aidlapi.navdrawer;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
-public class NavDrawerItem implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class NavDrawerItem extends AidlParams {
private String name;
private String uri;
@@ -24,12 +26,21 @@ public class NavDrawerItem implements Parcelable {
}
protected NavDrawerItem(Parcel in) {
- name = in.readString();
- uri = in.readString();
- iconName = in.readString();
- flags = in.readInt();
+ readFromParcel(in);
}
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public NavDrawerItem createFromParcel(Parcel in) {
+ return new NavDrawerItem(in);
+ }
+
+ @Override
+ public NavDrawerItem[] newArray(int size) {
+ return new NavDrawerItem[size];
+ }
+ };
+
public String getName() {
return name;
}
@@ -47,27 +58,18 @@ public class NavDrawerItem implements Parcelable {
}
@Override
- public void writeToParcel(Parcel dest, int f) {
- dest.writeString(name);
- dest.writeString(uri);
- dest.writeString(iconName);
- dest.writeInt(flags);
+ protected void readFromBundle(Bundle bundle) {
+ name = bundle.getString("name");
+ uri = bundle.getString("uri");
+ iconName = bundle.getString("iconName");
+ flags = bundle.getInt("flags");
}
@Override
- public int describeContents() {
- return 0;
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("name", name);
+ bundle.putString("uri", uri);
+ bundle.putString("iconName", iconName);
+ bundle.putInt("flags", flags);
}
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public NavDrawerItem createFromParcel(Parcel in) {
- return new NavDrawerItem(in);
- }
-
- @Override
- public NavDrawerItem[] newArray(int size) {
- return new NavDrawerItem[size];
- }
- };
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.aidl
new file mode 100644
index 0000000000..f92a0fb10b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navdrawer;
+
+parcelable SetNavDrawerItemsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java
similarity index 57%
rename from OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java
index 783a76eb7b..9609b558ae 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navdrawer/SetNavDrawerItemsParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navdrawer/SetNavDrawerItemsParams.java
@@ -1,26 +1,26 @@
-package net.osmand.aidl.navdrawer;
+package net.osmand.aidlapi.navdrawer;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
import android.support.annotation.NonNull;
+import net.osmand.aidlapi.AidlParams;
+
import java.util.ArrayList;
import java.util.List;
-public class SetNavDrawerItemsParams implements Parcelable {
+public class SetNavDrawerItemsParams extends AidlParams {
private String appPackage;
- private List items;
+ private ArrayList items = new ArrayList<>();
public SetNavDrawerItemsParams(@NonNull String appPackage, @NonNull List items) {
this.appPackage = appPackage;
- this.items = items;
+ this.items.addAll(items);
}
protected SetNavDrawerItemsParams(Parcel in) {
- appPackage = in.readString();
- items = new ArrayList<>();
- in.readTypedList(items, NavDrawerItem.CREATOR);
+ readFromParcel(in);
}
public String getAppPackage() {
@@ -32,14 +32,16 @@ public class SetNavDrawerItemsParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(appPackage);
- dest.writeTypedList(new ArrayList<>(items));
+ protected void readFromBundle(Bundle bundle) {
+ appPackage = bundle.getString("appPackage");
+ bundle.setClassLoader(NavDrawerItem.class.getClassLoader());
+ items = bundle.getParcelableArrayList("items");
}
@Override
- public int describeContents() {
- return 0;
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("appPackage", appPackage);
+ bundle.putParcelableArrayList("items", items);
}
public static final Creator CREATOR = new Creator() {
@@ -53,4 +55,4 @@ public class SetNavDrawerItemsParams implements Parcelable {
return new SetNavDrawerItemsParams[size];
}
};
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.aidl
new file mode 100644
index 0000000000..19d7a7e5f1
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable ADirectionInfo;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.java
similarity index 67%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.java
index a5e7074f0e..91c59dfb29 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ADirectionInfo.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ADirectionInfo.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class ADirectionInfo implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class ADirectionInfo extends AidlParams {
private int distanceTo; //distance to next turn
private int turnType; //turn type
@@ -16,9 +18,7 @@ public class ADirectionInfo implements Parcelable {
}
protected ADirectionInfo(Parcel in) {
- distanceTo = in.readInt();
- turnType = in.readInt();
- isLeftSide = in.readByte() != 0;
+ readFromParcel(in);
}
public static final Creator CREATOR = new Creator() {
@@ -58,16 +58,16 @@ public class ADirectionInfo implements Parcelable {
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ distanceTo = bundle.getInt("distanceTo");
+ turnType = bundle.getInt("turnType");
+ isLeftSide = bundle.getBoolean("isLeftSide");
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeInt(distanceTo);
- dest.writeInt(turnType);
- dest.writeByte((byte) (isLeftSide ? 1 : 0));
+ public void writeToBundle(Bundle bundle) {
+ bundle.putInt("distanceTo", distanceTo);
+ bundle.putInt("turnType", turnType);
+ bundle.putBoolean("isLeftSide", isLeftSide);
}
-
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.aidl
new file mode 100644
index 0000000000..ccdbc4b4ab
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.aidl
@@ -0,0 +1,4 @@
+
+package net.osmand.aidlapi.navigation;
+
+parcelable ANavigationUpdateParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.java
similarity index 64%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.java
index 38c8f5ffe4..aad9958e9d 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationUpdateParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationUpdateParams.java
@@ -1,16 +1,35 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class ANavigationUpdateParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class ANavigationUpdateParams extends AidlParams {
private boolean subscribeToUpdates = true;
private long callbackId = -1L;
public ANavigationUpdateParams() {
+
}
+ protected ANavigationUpdateParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ANavigationUpdateParams createFromParcel(Parcel in) {
+ return new ANavigationUpdateParams(in);
+ }
+
+ @Override
+ public ANavigationUpdateParams[] newArray(int size) {
+ return new ANavigationUpdateParams[size];
+ }
+ };
+
public long getCallbackId() {
return callbackId;
}
@@ -27,31 +46,15 @@ public class ANavigationUpdateParams implements Parcelable {
return subscribeToUpdates;
}
- protected ANavigationUpdateParams(Parcel in) {
- callbackId = in.readLong();
- subscribeToUpdates = in.readByte() != 0;
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ callbackId = bundle.getLong("callbackId");
+ subscribeToUpdates = bundle.getBoolean("subscribeToUpdates");
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeLong(callbackId);
- dest.writeByte((byte) (subscribeToUpdates ? 1 : 0));
+ public void writeToBundle(Bundle bundle) {
+ bundle.putLong("callbackId", callbackId);
+ bundle.putBoolean("subscribeToUpdates", subscribeToUpdates);
}
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public ANavigationUpdateParams createFromParcel(Parcel in) {
- return new ANavigationUpdateParams(in);
- }
-
- @Override
- public ANavigationUpdateParams[] newArray(int size) {
- return new ANavigationUpdateParams[size];
- }
- };
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.aidl
similarity index 55%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.aidl
index 6dfbe239ae..84fd5c2c3a 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ANavigationVoiceRouterMessageParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
parcelable ANavigationVoiceRouterMessageParams;
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.java
new file mode 100644
index 0000000000..4c4ce890d5
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.java
@@ -0,0 +1,60 @@
+package net.osmand.aidlapi.navigation;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class ANavigationVoiceRouterMessageParams extends AidlParams {
+
+ private long callbackId = -1L;
+ private boolean subscribeToUpdates = true;
+
+ public ANavigationVoiceRouterMessageParams() {
+
+ }
+
+ protected ANavigationVoiceRouterMessageParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ANavigationVoiceRouterMessageParams createFromParcel(Parcel in) {
+ return new ANavigationVoiceRouterMessageParams(in);
+ }
+
+ @Override
+ public ANavigationVoiceRouterMessageParams[] newArray(int size) {
+ return new ANavigationVoiceRouterMessageParams[size];
+ }
+ };
+
+ public long getCallbackId() {
+ return callbackId;
+ }
+
+ public void setCallbackId(long callbackId) {
+ this.callbackId = callbackId;
+ }
+
+ public void setSubscribeToUpdates(boolean subscribeToUpdates) {
+ this.subscribeToUpdates = subscribeToUpdates;
+ }
+
+ public boolean isSubscribeToUpdates() {
+ return subscribeToUpdates;
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ callbackId = bundle.getLong("callbackId");
+ subscribeToUpdates = bundle.getBoolean("subscribeToUpdates");
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putLong("callbackId", callbackId);
+ bundle.putBoolean("subscribeToUpdates", subscribeToUpdates);
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.aidl
new file mode 100644
index 0000000000..99834c101e
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable MuteNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.java
similarity index 60%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.java
index 8965c415fa..e23d243eec 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/MuteNavigationParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/MuteNavigationParams.java
@@ -1,9 +1,10 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.os.Parcel;
-import android.os.Parcelable;
-public class MuteNavigationParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class MuteNavigationParams extends AidlParams {
public MuteNavigationParams() {
}
@@ -23,16 +24,4 @@ public class MuteNavigationParams implements Parcelable {
return new MuteNavigationParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.aidl
new file mode 100644
index 0000000000..8bfcac4266
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable NavigateGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.java
similarity index 64%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.java
index 6e8fb8efe7..8b4901b35e 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateGpxParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateGpxParams.java
@@ -1,10 +1,12 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.net.Uri;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class NavigateGpxParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class NavigateGpxParams extends AidlParams {
private String data;
private Uri uri;
@@ -49,21 +51,16 @@ public class NavigateGpxParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(data);
- out.writeParcelable(uri, flags);
- out.writeByte((byte) (force ? 1 : 0));
- }
-
- private void readFromParcel(Parcel in) {
- data = in.readString();
- uri = in.readParcelable(Uri.class.getClassLoader());
- force = in.readByte() != 0;
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("data", data);
+ bundle.putParcelable("uri", uri);
+ bundle.putBoolean("force", force);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ data = bundle.getString("data");
+ uri = bundle.getParcelable("uri");
+ force = bundle.getBoolean("force");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.aidl
new file mode 100644
index 0000000000..3780bda111
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable NavigateParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.java
similarity index 60%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.java
index 8b0bdeb1eb..6dff82b7e4 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateParams.java
@@ -1,17 +1,21 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class NavigateParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+public class NavigateParams extends AidlParams {
+
+ private String profile;
+ private String destName;
private String startName;
+
private double startLat;
private double startLon;
- private String destName;
private double destLat;
private double destLon;
- private String profile;
+
private boolean force;
public NavigateParams(String startName, double startLat, double startLon, String destName, double destLat, double destLon, String profile, boolean force) {
@@ -74,31 +78,26 @@ public class NavigateParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(startName);
- out.writeDouble(startLat);
- out.writeDouble(startLon);
- out.writeString(destName);
- out.writeDouble(destLat);
- out.writeDouble(destLon);
- out.writeString(profile);
- out.writeByte((byte) (force ? 1 : 0));
- }
-
- private void readFromParcel(Parcel in) {
- startName = in.readString();
- startLat = in.readDouble();
- startLon = in.readDouble();
- destName = in.readString();
- destLat = in.readDouble();
- destLon = in.readDouble();
- profile = in.readString();
- force = in.readByte() != 0;
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("startName", startName);
+ bundle.putDouble("startLat", startLat);
+ bundle.putDouble("startLon", startLon);
+ bundle.putString("destName", destName);
+ bundle.putDouble("destLat", destLat);
+ bundle.putDouble("destLon", destLon);
+ bundle.putString("profile", profile);
+ bundle.putBoolean("force", force);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ startName = bundle.getString("startName");
+ startLat = bundle.getDouble("startLat");
+ startLon = bundle.getDouble("startLon");
+ destName = bundle.getString("destName");
+ destLat = bundle.getDouble("destLat");
+ destLon = bundle.getDouble("destLon");
+ profile = bundle.getString("profile");
+ force = bundle.getBoolean("force");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.aidl
new file mode 100644
index 0000000000..8c4acb192f
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable NavigateSearchParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.java
similarity index 56%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.java
index b092bcd4eb..d548dab2f3 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/NavigateSearchParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/NavigateSearchParams.java
@@ -1,22 +1,26 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class NavigateSearchParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+public class NavigateSearchParams extends AidlParams {
+
+ private String profile;
private String startName;
+ private String searchQuery;
+
private double startLat;
private double startLon;
- private String searchQuery;
private double searchLat;
private double searchLon;
- private String profile;
+
private boolean force;
public NavigateSearchParams(String startName, double startLat, double startLon,
- String searchQuery, double searchLat, double searchLon,
- String profile, boolean force) {
+ String searchQuery, double searchLat, double searchLon,
+ String profile, boolean force) {
this.startName = startName;
this.startLat = startLat;
this.startLon = startLon;
@@ -76,31 +80,26 @@ public class NavigateSearchParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(startName);
- out.writeDouble(startLat);
- out.writeDouble(startLon);
- out.writeString(searchQuery);
- out.writeString(profile);
- out.writeByte((byte) (force ? 1 : 0));
- out.writeDouble(searchLat);
- out.writeDouble(searchLon);
- }
-
- private void readFromParcel(Parcel in) {
- startName = in.readString();
- startLat = in.readDouble();
- startLon = in.readDouble();
- searchQuery = in.readString();
- profile = in.readString();
- force = in.readByte() != 0;
- searchLat = in.readDouble();
- searchLon = in.readDouble();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("startName", startName);
+ bundle.putDouble("startLat", startLat);
+ bundle.putDouble("startLon", startLon);
+ bundle.putString("searchQuery", searchQuery);
+ bundle.putString("profile", profile);
+ bundle.putBoolean("force", force);
+ bundle.putDouble("searchLat", searchLat);
+ bundle.putDouble("searchLon", searchLon);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ startName = bundle.getString("startName");
+ startLat = bundle.getDouble("startLat");
+ startLon = bundle.getDouble("startLon");
+ searchQuery = bundle.getString("searchQuery");
+ profile = bundle.getString("profile");
+ force = bundle.getBoolean("force");
+ searchLat = bundle.getDouble("searchLat");
+ searchLon = bundle.getDouble("searchLon");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.aidl
new file mode 100644
index 0000000000..107f69c53b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable OnVoiceNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.java
new file mode 100644
index 0000000000..3c745684dd
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/OnVoiceNavigationParams.java
@@ -0,0 +1,70 @@
+package net.osmand.aidlapi.navigation;
+
+import android.os.Bundle;
+import android.os.Parcel;
+
+import net.osmand.aidlapi.AidlParams;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class OnVoiceNavigationParams extends AidlParams {
+
+ private ArrayList cmds = new ArrayList<>();
+ private ArrayList played = new ArrayList<>();
+
+ public OnVoiceNavigationParams() {
+
+ }
+
+ public OnVoiceNavigationParams(List cmds, List played) {
+ if (cmds != null) {
+ this.cmds.addAll(cmds);
+ }
+ if (played != null) {
+ this.played.addAll(played);
+ }
+ }
+
+ public OnVoiceNavigationParams(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public OnVoiceNavigationParams createFromParcel(Parcel in) {
+ return new OnVoiceNavigationParams(in);
+ }
+
+ @Override
+ public OnVoiceNavigationParams[] newArray(int size) {
+ return new OnVoiceNavigationParams[size];
+ }
+ };
+
+ public List getCommands() {
+ return cmds;
+ }
+
+ public List getPlayed() {
+ return played;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putStringArrayList("cmds", cmds);
+ bundle.putStringArrayList("played", played);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ cmds = bundle.getStringArrayList("cmds");
+ if (cmds == null) {
+ cmds = new ArrayList<>();
+ }
+ played = bundle.getStringArrayList("played");
+ if (played == null) {
+ played = new ArrayList<>();
+ }
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.aidl
new file mode 100644
index 0000000000..6fa3386080
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable PauseNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.java
index 5a28538039..f5a6cea1f8 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/PauseNavigationParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/PauseNavigationParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.os.Parcel;
-import android.os.Parcelable;
-public class PauseNavigationParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class PauseNavigationParams extends AidlParams {
public PauseNavigationParams() {
+
}
public PauseNavigationParams(Parcel in) {
@@ -23,16 +25,4 @@ public class PauseNavigationParams implements Parcelable {
return new PauseNavigationParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.aidl
new file mode 100644
index 0000000000..3029d59d6a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable ResumeNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.java
index d1032dc914..65d121ce20 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/ResumeNavigationParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/ResumeNavigationParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.os.Parcel;
-import android.os.Parcelable;
-public class ResumeNavigationParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class ResumeNavigationParams extends AidlParams {
public ResumeNavigationParams() {
+
}
public ResumeNavigationParams(Parcel in) {
@@ -23,16 +25,4 @@ public class ResumeNavigationParams implements Parcelable {
return new ResumeNavigationParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.aidl
new file mode 100644
index 0000000000..a7f05536c5
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable StopNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.java
index e87d6ed2da..7be6fe5a4b 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/StopNavigationParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/StopNavigationParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StopNavigationParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StopNavigationParams extends AidlParams {
public StopNavigationParams() {
+
}
public StopNavigationParams(Parcel in) {
@@ -23,16 +25,4 @@ public class StopNavigationParams implements Parcelable {
return new StopNavigationParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.aidl
new file mode 100644
index 0000000000..e58995ca47
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.navigation;
+
+parcelable UnmuteNavigationParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java b/OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.java
index 36819db065..c6ff661e58 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/navigation/UnmuteNavigationParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/navigation/UnmuteNavigationParams.java
@@ -1,11 +1,13 @@
-package net.osmand.aidl.navigation;
+package net.osmand.aidlapi.navigation;
import android.os.Parcel;
-import android.os.Parcelable;
-public class UnmuteNavigationParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class UnmuteNavigationParams extends AidlParams {
public UnmuteNavigationParams() {
+
}
public UnmuteNavigationParams(Parcel in) {
@@ -23,16 +25,4 @@ public class UnmuteNavigationParams implements Parcelable {
return new UnmuteNavigationParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- }
-
- private void readFromParcel(Parcel in) {
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.aidl
similarity index 53%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.aidl
index bb16dea140..5b3bf05b16 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
parcelable StartAudioRecordingParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java b/OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.java
similarity index 65%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.java
index c2800feb9c..21350d42ac 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/StartAudioRecordingParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StartAudioRecordingParams.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StartAudioRecordingParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StartAudioRecordingParams extends AidlParams {
private double latitude;
private double longitude;
@@ -38,19 +40,14 @@ public class StartAudioRecordingParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- }
-
- private void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.aidl
similarity index 53%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.aidl
index 082b68e09c..aa5902909d 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.aidl
@@ -1,3 +1,3 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
parcelable StartVideoRecordingParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java b/OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.java
similarity index 65%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.java
index aee86ea9de..f66528f9c0 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/StartVideoRecordingParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StartVideoRecordingParams.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StartVideoRecordingParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StartVideoRecordingParams extends AidlParams {
private double latitude;
private double longitude;
@@ -38,19 +40,14 @@ public class StartVideoRecordingParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- }
-
- private void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.aidl
new file mode 100644
index 0000000000..08d6328da2
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.note;
+
+parcelable StopRecordingParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java b/OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.java
index b56a42504b..d5ab25940f 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/StopRecordingParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/StopRecordingParams.java
@@ -1,9 +1,10 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
import android.os.Parcel;
-import android.os.Parcelable;
-public class StopRecordingParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class StopRecordingParams extends AidlParams {
public StopRecordingParams() {
@@ -24,19 +25,4 @@ public class StopRecordingParams implements Parcelable {
return new StopRecordingParams[size];
}
};
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
-
- }
-
- private void readFromParcel(Parcel in) {
-
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.aidl
new file mode 100644
index 0000000000..a961f2754a
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.note;
+
+parcelable TakePhotoNoteParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java b/OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.java
similarity index 63%
rename from OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.java
index 254516e080..ea255dddb1 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/note/TakePhotoNoteParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/note/TakePhotoNoteParams.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.note;
+package net.osmand.aidlapi.note;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class TakePhotoNoteParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class TakePhotoNoteParams extends AidlParams {
private double latitude;
private double longitude;
@@ -38,19 +40,14 @@ public class TakePhotoNoteParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- }
-
- private void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
}
-
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.aidl
similarity index 57%
rename from OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl
rename to OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.aidl
index beff693f5a..3005c31269 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.aidl
+++ b/OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.aidl
@@ -1,5 +1,5 @@
// PluginParams.aidl
-package net.osmand.aidl.plugins;
+package net.osmand.aidlapi.plugins;
parcelable PluginParams;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java b/OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.java
similarity index 61%
rename from OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.java
index 028bd8676a..7c61e6a0d8 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/plugins/PluginParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/plugins/PluginParams.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.plugins;
+package net.osmand.aidlapi.plugins;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class PluginParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class PluginParams extends AidlParams {
private String pluginId;
private int newState; //0- off, 1 - on
@@ -22,19 +24,19 @@ public class PluginParams implements Parcelable {
}
protected PluginParams(Parcel in) {
- pluginId = in.readString();
- newState = in.readInt();
+ readFromParcel(in);
}
@Override
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(pluginId);
- dest.writeInt(newState);
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("pluginId", pluginId);
+ bundle.putInt("newState", newState);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ pluginId = bundle.getString("pluginId");
+ newState = bundle.getInt("newState");
}
public static final Creator CREATOR = new Creator() {
@@ -48,4 +50,4 @@ public class PluginParams implements Parcelable {
return new PluginParams[size];
}
};
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.aidl b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.aidl
new file mode 100644
index 0000000000..3fd420433b
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.search;
+
+parcelable SearchParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.java
similarity index 64%
rename from OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java
rename to OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.java
index 303cecb25c..5bbecfb488 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchParams.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchParams.java
@@ -1,9 +1,11 @@
-package net.osmand.aidl.search;
+package net.osmand.aidlapi.search;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
-public class SearchParams implements Parcelable {
+import net.osmand.aidlapi.AidlParams;
+
+public class SearchParams extends AidlParams {
public static final int SEARCH_TYPE_POI = 1;
public static final int SEARCH_TYPE_ADDRESS = 2;
@@ -66,26 +68,22 @@ public class SearchParams implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(searchQuery);
- out.writeInt(searchType);
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- out.writeInt(radiusLevel);
- out.writeInt(totalLimit);
- }
-
- private void readFromParcel(Parcel in) {
- searchQuery = in.readString();
- searchType = in.readInt();
- latitude = in.readDouble();
- longitude = in.readDouble();
- radiusLevel = in.readInt();
- totalLimit = in.readInt();
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("searchQuery", searchQuery);
+ bundle.putInt("searchType", searchType);
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
+ bundle.putInt("radiusLevel", radiusLevel);
+ bundle.putInt("totalLimit", totalLimit);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ searchQuery = bundle.getString("searchQuery");
+ searchType = bundle.getInt("searchType");
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
+ radiusLevel = bundle.getInt("radiusLevel");
+ totalLimit = bundle.getInt("totalLimit");
}
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.aidl b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.aidl
new file mode 100644
index 0000000000..54b7487a72
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.search;
+
+parcelable SearchResult;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.java
similarity index 55%
rename from OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java
rename to OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.java
index ef28063355..863b90b073 100644
--- a/OsmAnd-telegram/src/net/osmand/aidl/search/SearchResult.java
+++ b/OsmAnd-api/src/net/osmand/aidlapi/search/SearchResult.java
@@ -1,12 +1,14 @@
-package net.osmand.aidl.search;
+package net.osmand.aidlapi.search;
+import android.os.Bundle;
import android.os.Parcel;
-import android.os.Parcelable;
+
+import net.osmand.aidlapi.AidlParams;
import java.util.ArrayList;
import java.util.List;
-public class SearchResult implements Parcelable {
+public class SearchResult extends AidlParams {
private double latitude;
private double longitude;
@@ -15,18 +17,18 @@ public class SearchResult implements Parcelable {
private String localTypeName;
private String alternateName;
- private List otherNames = new ArrayList<>();
+ private ArrayList otherNames = new ArrayList<>();
public SearchResult(double latitude, double longitude, String localName, String localTypeName,
- String alternateName, List otherNames) {
+ String alternateName, List otherNames) {
this.latitude = latitude;
this.longitude = longitude;
this.localName = localName;
this.localTypeName = localTypeName;
this.alternateName = alternateName;
if (otherNames != null) {
- this.otherNames = otherNames;
+ this.otherNames.addAll(otherNames);
}
}
@@ -71,26 +73,22 @@ public class SearchResult implements Parcelable {
}
@Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- out.writeString(localName);
- out.writeString(localTypeName);
- out.writeString(alternateName);
- out.writeStringList(otherNames);
- }
-
- private void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
- localName = in.readString();
- localTypeName = in.readString();
- alternateName = in.readString();
- in.readStringList(otherNames);
+ public void writeToBundle(Bundle bundle) {
+ bundle.putDouble("latitude", latitude);
+ bundle.putDouble("longitude", longitude);
+ bundle.putString("localName", localName);
+ bundle.putString("localTypeName", localTypeName);
+ bundle.putString("alternateName", alternateName);
+ bundle.putStringArrayList("otherNames", otherNames);
}
@Override
- public int describeContents() {
- return 0;
+ protected void readFromBundle(Bundle bundle) {
+ latitude = bundle.getDouble("latitude");
+ longitude = bundle.getDouble("longitude");
+ localName = bundle.getString("localName");
+ localTypeName = bundle.getString("localTypeName");
+ alternateName = bundle.getString("alternateName");
+ otherNames = bundle.getStringArrayList("otherName");
}
-}
+}
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.aidl b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.aidl
new file mode 100644
index 0000000000..59135d4167
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.aidl
@@ -0,0 +1,3 @@
+package net.osmand.aidlapi.tiles;
+
+parcelable ASqliteDbFile;
\ No newline at end of file
diff --git a/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java
new file mode 100644
index 0000000000..1ea8c70e60
--- /dev/null
+++ b/OsmAnd-api/src/net/osmand/aidlapi/tiles/ASqliteDbFile.java
@@ -0,0 +1,70 @@
+package net.osmand.aidlapi.tiles;
+
+import android.os.Bundle;
+import android.os.Parcel;
+import android.support.annotation.NonNull;
+
+import net.osmand.aidlapi.AidlParams;
+
+public class ASqliteDbFile extends AidlParams {
+
+ private String fileName;
+ private long modifiedTime;
+ private long fileSize;
+ private boolean active;
+
+ public ASqliteDbFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active) {
+ this.fileName = fileName;
+ this.modifiedTime = modifiedTime;
+ this.fileSize = fileSize;
+ this.active = active;
+ }
+
+ public ASqliteDbFile(Parcel in) {
+ readFromParcel(in);
+ }
+
+ public static final Creator CREATOR = new Creator() {
+ @Override
+ public ASqliteDbFile createFromParcel(Parcel in) {
+ return new ASqliteDbFile(in);
+ }
+
+ @Override
+ public ASqliteDbFile[] newArray(int size) {
+ return new ASqliteDbFile[size];
+ }
+ };
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public long getModifiedTime() {
+ return modifiedTime;
+ }
+
+ public long getFileSize() {
+ return fileSize;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+
+ @Override
+ public void writeToBundle(Bundle bundle) {
+ bundle.putString("fileName", fileName);
+ bundle.putLong("modifiedTime", modifiedTime);
+ bundle.putLong("fileSize", fileSize);
+ bundle.putBoolean("active", active);
+ }
+
+ @Override
+ protected void readFromBundle(Bundle bundle) {
+ fileName = bundle.getString("fileName");
+ modifiedTime = bundle.getLong("modifiedTime");
+ fileSize = bundle.getLong("fileSize");
+ active = bundle.getBoolean("active");
+ }
+}
\ No newline at end of file
diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java
index 08e32be36b..d70d83cf3a 100644
--- a/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java
+++ b/OsmAnd-java/src/main/java/net/osmand/binary/RouteDataObject.java
@@ -469,8 +469,6 @@ public class RouteDataObject {
}
return pointNameTypes[ind];
}
-
-
public int[] getPointTypes(int ind) {
if (pointTypes == null || ind >= pointTypes.length) {
@@ -489,17 +487,17 @@ public class RouteDataObject {
RouteTypeRule r = region.quickGetEncodingRule(types[i]);
if (r != null && r.conditional()) {
int vl = r.conditionalValue(conditionalTime);
- if(vl != 0) {
+ if (vl != 0) {
RouteTypeRule rtr = region.quickGetEncodingRule(vl);
String nonCondTag = rtr.getTag();
int ks;
- for(ks = 0; ks < types.length; ks++) {
+ for (ks = 0; ks < types.length; ks++) {
RouteTypeRule toReplace = region.quickGetEncodingRule(types[ks]);
- if(toReplace != null && toReplace.getTag().equals(nonCondTag)) {
+ if (toReplace != null && toReplace.getTag().equals(nonCondTag)) {
break;
}
}
- if(ks == types.length) {
+ if (ks == types.length) {
int[] ntypes = new int[types.length + 1];
System.arraycopy(types, 0, ntypes, 0, types.length);
types = ntypes;
@@ -508,6 +506,41 @@ public class RouteDataObject {
}
}
}
+
+ if (pointTypes != null) {
+ for (int i = 0; i < pointTypes.length; i++) {
+ if (pointTypes[i] != null) {
+ int[] pTypes = pointTypes[i];
+ int pSz = pTypes.length;
+ if (pSz > 0) {
+ for (int j = 0; j < pSz; j++) {
+ RouteTypeRule r = region.quickGetEncodingRule(pTypes[j]);
+ if (r != null && r.conditional()) {
+ int vl = r.conditionalValue(conditionalTime);
+ if (vl != 0) {
+ RouteTypeRule rtr = region.quickGetEncodingRule(vl);
+ String nonCondTag = rtr.getTag();
+ int ks;
+ for (ks = 0; ks < pointTypes[i].length; ks++) {
+ RouteTypeRule toReplace = region.quickGetEncodingRule(pointTypes[i][j]);
+ if (toReplace != null && toReplace.getTag().contentEquals(nonCondTag)) {
+ break;
+ }
+ }
+ if (ks == pTypes.length) {
+ int[] ntypes = new int[pTypes.length + 1];
+ System.arraycopy(pTypes, 0, ntypes, 0, pTypes.length);
+ pTypes = ntypes;
+ }
+ pTypes[ks] = vl;
+ }
+ }
+ }
+ }
+ pointTypes[i] = pTypes;
+ }
+ }
+ }
}
public float getMaximumSpeed(boolean direction) {
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
index 1e0238159c..ca7e67ab43 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java
@@ -710,7 +710,7 @@ public class OsmandRegions {
return getSmallestBinaryMapDataObjectAt(mapDataObjects);
}
- public BinaryMapDataObject getSmallestBinaryMapDataObjectAt(List mapDataObjects) throws IOException {
+ public BinaryMapDataObject getSmallestBinaryMapDataObjectAt(List mapDataObjects) {
BinaryMapDataObject res = null;
double smallestArea = -1;
for (BinaryMapDataObject o : mapDataObjects) {
diff --git a/OsmAnd-java/src/main/java/net/osmand/map/TileSourceManager.java b/OsmAnd-java/src/main/java/net/osmand/map/TileSourceManager.java
index 409b188b93..08727db2b5 100644
--- a/OsmAnd-java/src/main/java/net/osmand/map/TileSourceManager.java
+++ b/OsmAnd-java/src/main/java/net/osmand/map/TileSourceManager.java
@@ -486,7 +486,7 @@ public class TileSourceManager {
return templates;
}
- private static TileSourceTemplate createTileSourceTemplate(Map attrs) {
+ public static TileSourceTemplate createTileSourceTemplate(Map attrs) {
TileSourceTemplate template = null;
String rule = attrs.get("rule");
if(rule == null){
diff --git a/OsmAnd-java/src/main/java/net/osmand/render/RenderingRuleStorageProperties.java b/OsmAnd-java/src/main/java/net/osmand/render/RenderingRuleStorageProperties.java
index e4d65a7386..7b785c4e5e 100644
--- a/OsmAnd-java/src/main/java/net/osmand/render/RenderingRuleStorageProperties.java
+++ b/OsmAnd-java/src/main/java/net/osmand/render/RenderingRuleStorageProperties.java
@@ -10,6 +10,7 @@ public class RenderingRuleStorageProperties {
public static final String UI_CATEGORY_HIDDEN = "ui_hidden";
public static final String A_ENGINE_V1 = "engine_v1";
public static final String A_APP_MODE= "appMode";
+ public static final String A_BASE_APP_MODE = "baseAppMode";
public static final String A_DEFAULT_COLOR = "defaultColor";
public static final String A_SHADOW_RENDERING = "shadowRendering";
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java
index 2a3a7403a1..de8aeac47c 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/GeneralRouter.java
@@ -38,6 +38,7 @@ public class GeneralRouter implements VehicleRouter {
public static final String MAX_SPEED = "max_speed";
public static final String VEHICLE_HEIGHT = "height";
public static final String VEHICLE_WEIGHT = "weight";
+ public static final String VEHICLE_WIDTH = "width";
private final RouteAttributeContext[] objectAttributes;
public final Map attributes;
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
index a729fc3345..a26220193c 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RouteResultPreparation.java
@@ -1026,7 +1026,7 @@ public class RouteResultPreparation {
return MAX_SPEAK_PRIORITY;
}
if (highway.endsWith("_link") || highway.endsWith("unclassified") || highway.endsWith("road")
- || highway.endsWith("living_street") || highway.endsWith("residential") ) {
+ || highway.endsWith("living_street") || highway.endsWith("residential") || highway.endsWith("tertiary") ) {
return 1;
}
return 0;
diff --git a/OsmAnd-java/src/main/java/net/osmand/router/RoutingContext.java b/OsmAnd-java/src/main/java/net/osmand/router/RoutingContext.java
index 3ede1df697..5f548408e6 100644
--- a/OsmAnd-java/src/main/java/net/osmand/router/RoutingContext.java
+++ b/OsmAnd-java/src/main/java/net/osmand/router/RoutingContext.java
@@ -6,10 +6,13 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.Map.Entry;
import org.apache.commons.logging.Log;
@@ -33,6 +36,7 @@ import net.osmand.router.BinaryRoutePlanner.FinalRouteSegment;
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
import net.osmand.router.BinaryRoutePlanner.RouteSegmentVisitor;
import net.osmand.router.RoutePlannerFrontEnd.RouteCalculationMode;
+import net.osmand.util.Algorithms;
public class RoutingContext {
@@ -107,8 +111,7 @@ public class RoutingContext {
// old planner
public FinalRouteSegment finalRouteSegment;
-
-
+
RoutingContext(RoutingContext cp) {
this.config = cp.config;
this.map.putAll(cp.map);
@@ -272,17 +275,12 @@ public class RoutingContext {
public RouteSegment loadRouteSegment(int x31, int y31, int memoryLimit) {
long tileId = getRoutingTile(x31, y31, memoryLimit, OPTION_SMART_LOAD);
TLongObjectHashMap excludeDuplications = new TLongObjectHashMap();
- TLongSet excludeIds = new TLongHashSet();
RouteSegment original = null;
List subregions = indexedSubregions.get(tileId);
if (subregions != null) {
- for (RoutingSubregionTile rs : subregions) {
- // TODO
- original = rs.loadRouteSegment(x31, y31, this, excludeDuplications, excludeIds,
- original);
- if(rs.excludedIds != null) {
- excludeIds.addAll(rs.excludedIds);
- }
+ for (int j = 0; j < subregions.size(); j++) {
+ original = subregions.get(j).loadRouteSegment(x31, y31, this, excludeDuplications,
+ original, subregions, j);
}
}
return original;
@@ -654,7 +652,7 @@ public class RoutingContext {
}
private RouteSegment loadRouteSegment(int x31, int y31, RoutingContext ctx,
- TLongObjectHashMap excludeDuplications, TLongSet excludeIds, RouteSegment original) {
+ TLongObjectHashMap excludeDuplications, RouteSegment original, List subregions, int subregionIndex) {
access++;
if (routes != null) {
long l = (((long) x31) << 31) + (long) y31;
@@ -662,8 +660,8 @@ public class RoutingContext {
while (segment != null) {
RouteDataObject ro = segment.road;
RouteDataObject toCmp = excludeDuplications.get(calcRouteId(ro, segment.getSegmentStart()));
- if ((toCmp == null || toCmp.getPointsLength() < ro.getPointsLength())
- && !excludeIds.contains(ro.id)) {
+ if (!isExcluded(ro.id, subregions, subregionIndex)
+ && (toCmp == null || toCmp.getPointsLength() < ro.getPointsLength())) {
excludeDuplications.put(calcRouteId(ro, segment.getSegmentStart()), ro);
RouteSegment s = new RouteSegment(ro, segment.getSegmentStart());
s.next = original;
@@ -676,6 +674,15 @@ public class RoutingContext {
}
return original;
}
+
+ private static boolean isExcluded(long id, List subregions, int subregionIndex) {
+ for (int i = 0; i < subregionIndex; i++ ) {
+ if (subregions.get(i).excludedIds != null && subregions.get(i).excludedIds.contains(id)) {
+ return true;
+ }
+ }
+ return false;
+ }
public boolean isLoaded() {
return isLoaded > 0;
diff --git a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
index 2d10ecd2e7..8857ec035e 100644
--- a/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
+++ b/OsmAnd-java/src/main/java/net/osmand/search/SearchUICore.java
@@ -872,9 +872,11 @@ public class SearchUICore {
if (st1 != st2) {
return Algorithms.compare(st1, st2);
}
+ String localeName1 = o1.localeName == null ? "" : o1.localeName;
+ String localeName2 = o2.localeName == null ? "" : o2.localeName;
if (o1.parentSearchResult != null && o2.parentSearchResult != null) {
if (o1.parentSearchResult == o2.parentSearchResult) {
- int cmp = collator.compare(o1.localeName, o2.localeName);
+ int cmp = collator.compare(localeName1, localeName2);
if (cmp != 0) {
return cmp;
}
@@ -883,7 +885,7 @@ public class SearchUICore {
double s2 = o2.getSearchDistance(loc, 1);
return Double.compare(s1, s2);
}
- int cmp = collator.compare(o1.localeName, o2.localeName);
+ int cmp = collator.compare(localeName1, localeName2);
if (cmp != 0) {
return cmp;
}
@@ -893,12 +895,12 @@ public class SearchUICore {
Amenity a2 = (Amenity) o2.object;
String type1 = a1.getType().getKeyName();
String type2 = a2.getType().getKeyName();
- String subType1 = a1.getSubType();
- String subType2 = a2.getSubType();
cmp = collator.compare(type1, type2);
if (cmp != 0) {
return cmp;
}
+ String subType1 = a1.getSubType() == null ? "" : a1.getSubType();
+ String subType2 = a2.getSubType() == null ? "" : a2.getSubType();
cmp = collator.compare(subType1, subType2);
if (cmp != 0) {
return cmp;
diff --git a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java
index f4475cb464..d680e89407 100644
--- a/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java
+++ b/OsmAnd-java/src/main/java/net/osmand/util/OpeningHoursParser.java
@@ -374,9 +374,16 @@ public class OpeningHoursParser {
String openingTime = "";
ArrayList rules = getRules(sequenceIndex);
cal.add(Calendar.DAY_OF_MONTH, 1);
+ Calendar openingTimeCal = null;
for (OpeningHoursRule r : rules) {
if (r.containsDay(cal) && r.containsMonth(cal)) {
- openingTime = r.getTime(cal, false, WITHOUT_TIME_LIMIT, true);
+ if (r.containsDay(cal) && r.containsMonth(cal)) {
+ String time = r.getTime(cal, false, WITHOUT_TIME_LIMIT, true);
+ if (Algorithms.isEmpty(time) || openingTimeCal == null || cal.before(openingTimeCal)) {
+ openingTime = time;
+ }
+ openingTimeCal = (Calendar) cal.clone();
+ }
}
}
return openingTime;
@@ -1622,7 +1629,8 @@ public class OpeningHoursParser {
TOKEN_HOLIDAY(7),
TOKEN_DAY_WEEK(7),
TOKEN_HOUR_MINUTES (8),
- TOKEN_OFF_ON(9);
+ TOKEN_OFF_ON(9),
+ TOKEN_COMMENT(10);
public final int ord;
@@ -1666,22 +1674,8 @@ public class OpeningHoursParser {
}
public static void parseRuleV2(String r, int sequenceIndex, List rules) {
- String comment = null;
- int q1Index = r.indexOf('"');
- if (q1Index >= 0) {
- int q2Index = r.indexOf('"', q1Index + 1);
- if (q2Index >= 0) {
- comment = r.substring(q1Index + 1, q2Index);
- String a = r.substring(0, q1Index);
- String b = "";
- if (r.length() > q2Index + 1) {
- b = r.substring(q2Index + 1);
- }
- r = a + b;
- }
- }
- r = r.toLowerCase().trim();
-
+ r = r.trim();
+
final String[] daysStr = new String[]{"mo", "tu", "we", "th", "fr", "sa", "su"};
final String[] monthsStr = new String[]{"jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"};
final String[] holidayStr = new String[]{"ph", "sh", "easter"};
@@ -1690,10 +1684,9 @@ public class OpeningHoursParser {
String endOfDay = "24:00";
r = r.replace('(', ' '); // avoid "(mo-su 17:00-20:00"
r = r.replace(')', ' ');
- String localRuleString = r.replaceAll("sunset", sunset).replaceAll("sunrise", sunrise)
+ String localRuleString = r.replaceAll("(?i)sunset", sunset).replaceAll("(?i)sunrise", sunrise)
.replaceAll("\\+", "-" + endOfDay);
BasicOpeningHourRule basic = new BasicOpeningHourRule(sequenceIndex);
- basic.setComment(comment);
boolean[] days = basic.getDays();
boolean[] months = basic.getMonths();
//boolean[][] dayMonths = basic.getDayMonths();
@@ -1707,6 +1700,8 @@ public class OpeningHoursParser {
}
List tokens = new ArrayList<>();
int startWord = 0;
+ StringBuilder commentStr = new StringBuilder();
+ boolean comment = false;
for (int i = 0; i <= localRuleString.length(); i++) {
char ch = i == localRuleString.length() ? ' ' : localRuleString.charAt(i);
boolean delimiter = false;
@@ -1719,11 +1714,25 @@ public class OpeningHoursParser {
del = new Token(TokenType.TOKEN_DASH, "-");
} else if (ch == ',') {
del = new Token(TokenType.TOKEN_COMMA, ",");
+ } else if (ch == '"') {
+ if (comment) {
+ if (commentStr.length() > 0) {
+ tokens.add(new Token(TokenType.TOKEN_COMMENT, commentStr.toString()));
+ }
+ startWord = i + 1;
+ commentStr.setLength(0);
+ comment = false;
+ } else {
+ comment = true;
+ continue;
+ }
}
- if (delimiter || del != null) {
+ if (comment) {
+ commentStr.append(ch);
+ } else if (delimiter || del != null) {
String wrd = localRuleString.substring(startWord, i).trim();
- if(wrd.length() > 0) {
- tokens.add(new Token(TokenType.TOKEN_UNKNOWN, wrd));
+ if (wrd.length() > 0) {
+ tokens.add(new Token(TokenType.TOKEN_UNKNOWN, wrd.toLowerCase()));
}
startWord = i + 1;
if (del != null) {
@@ -1921,6 +1930,11 @@ public class OpeningHoursParser {
if (l[0] != null && l[0].mainNumber == 0) {
basic.off = true;
}
+ } else if (currentParse == TokenType.TOKEN_COMMENT) {
+ Token[] l = listOfPairs.get(0);
+ if (l[0] != null && !Algorithms.isEmpty(l[0].text)) {
+ basic.comment = l[0].text;
+ }
} else if (currentParse == TokenType.TOKEN_YEAR) {
Token[] l = listOfPairs.get(0);
if (l[0] != null && l[0].mainNumber > 1000) {
diff --git a/OsmAnd-java/src/test/java/net/osmand/util/OpeningHoursParserTest.java b/OsmAnd-java/src/test/java/net/osmand/util/OpeningHoursParserTest.java
index 2791874152..a0c223f489 100644
--- a/OsmAnd-java/src/test/java/net/osmand/util/OpeningHoursParserTest.java
+++ b/OsmAnd-java/src/test/java/net/osmand/util/OpeningHoursParserTest.java
@@ -117,7 +117,11 @@ public class OpeningHoursParserTest {
try {
Locale.setDefault(Locale.forLanguageTag("en-US"));
- OpeningHours hours = parseOpenedHours("2019 Apr 1 - 2020 Apr 1");
+ OpeningHours hours = parseOpenedHours("Mo-Fr 08:00-12:30, Mo-We 12:30-16:30 \"Sur rendez-vous\", Fr 12:30-15:30 \"Sur rendez-vous\"");
+ System.out.println(hours);
+ testInfo("13.10.2019 18:00", hours, "Will open tomorrow at 08:00");
+
+ hours = parseOpenedHours("2019 Apr 1 - 2020 Apr 1");
System.out.println(hours);
testOpened("01.04.2018 15:00", hours, false);
testOpened("01.04.2019 15:00", hours, true);
diff --git a/OsmAnd-telegram/build.gradle b/OsmAnd-telegram/build.gradle
index 4b215af1ad..f2152adba9 100644
--- a/OsmAnd-telegram/build.gradle
+++ b/OsmAnd-telegram/build.gradle
@@ -138,6 +138,7 @@ afterEvaluate {
dependencies {
implementation project(path: ':OsmAnd-java', configuration: 'android')
implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation project(':OsmAnd-api')
implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") {
exclude group: 'org.jetbrains', module: 'annotations'
diff --git a/OsmAnd-telegram/res/values-ast/strings.xml b/OsmAnd-telegram/res/values-ast/strings.xml
index 044db09a7f..a776c3fd4f 100644
--- a/OsmAnd-telegram/res/values-ast/strings.xml
+++ b/OsmAnd-telegram/res/values-ast/strings.xml
@@ -158,4 +158,66 @@
Data
Altitú
Aplicar
+ Tiempu de movimientu
+ Amosar n\'OsmAnd
+ Últimu allugamientu anováu:
+ Unviada y anovada correutamente
+ Nun se puede unviar a les charres de Telegram:
+ Unviando l\'alluganientu
+ unviaos (%1$d nel búfer)
+ %1$d puntos
+ Collechaos
+ Puntos GPS
+ Unviao
+ Actualiza OsmAnd pa ver los datos nel mapa
+ Anovar
+ Telegram
+ Telegram (l\'aplicación de mensaxería) emplégase pa coneutar y comunicase cola xente.
+ El rastrexador d\'OsmAnd ye unu de los clientes qu\'emplega la plataforma abierta Telegram. Los tos contautos pueden emplegar cualquier otru cliente de Telegram.
+ Al primir siguir, aceutes les condiciones de la Política d\'intimidá de Telegram y la Política d\'intimidá d\'OsmAnd.
+ Aceutar
+ Política d\'intimidá de Telegram
+ Política d\'intimidá d\'OsmAnd
+ Puntos GPX recibíos: %1$s
+ Apariencia
+ Amosar la cantidá de puntos GPS recibíos y unviaos.
+ Aceutar
+ Desactivar el siguimientu
+ Grabación del allugamientu activada
+ Rastrexador d\'OsmAnd
+ Guetar contautos
+ Guetar ente los tos grupos y contautos.
+ Escribe\'l nome del contautu o grupu
+ Guetar
+ Direición
+ Precisión
+ Rumbu
+ Clave
+ Contraseña
+ Nome d\'usuariu
+ Credenciales
+ Puertu
+ Sirvidor
+ Conexón
+ Activar
+ Tipu de proxy
+ Coneutáu
+ Desconeutáu
+ Configuración de proxy
+ Proxy
+ Intimidá
+ Esbillar
+ Distancia mínima de grabación
+ Filtru: distancia mínima pa grabar un puntu nuevu
+ Precisión mínima de grabación
+ Filtru: nun grabar mentanto nun se llogre esta precisión
+ Velocidá mínima de grabación
+ Filtru: nun grabar per baxo de la velocidá seleicionada
+ Configuración GPX
+ Nun recoyimos datos pal día seleicionáu
+ Nun hai datos
+ Final
+ Principiu
+ Seleiciona la hora de visualización
+ Data d\'Aniciu — Fin
\ No newline at end of file
diff --git a/OsmAnd-telegram/res/values-eu/strings.xml b/OsmAnd-telegram/res/values-eu/strings.xml
index 82f7f206bb..260e4522bf 100644
--- a/OsmAnd-telegram/res/values-eu/strings.xml
+++ b/OsmAnd-telegram/res/values-eu/strings.xml
@@ -164,4 +164,26 @@
GPX ezarpenak
Ez dugu bildutako daturik hautatutako egunarentzat
Daturik ez
+ Jasotako GPX puntuak: %1$s
+ Erakutsi bildutako eta bidalitako GPS puntu kopurua.
+ Eguneratu OsmAnd mapan datuak ikusteko
+ bidalita (%1$d tarteko memorian)
+ %1$d puntu
+ Bilduta
+ Monitorizazioa gaituta dago
+ Monitorizazioa desgaituta dago
+ Denbora mugimenduan
+ Batezbesteko garaiera
+ Batezbesteko abiadura
+ Bidali kokapena honela
+ Hautatu nola ikusiko diren zure kokapena daramaten mezuak.
+ Hautatu dagoeneko erabili ez duzun izen bat
+ %1$s gehituta.
+ Eman izena zure gailuari gehienez 200 karaktere erabilita.
+ Desgaituta
+ Amaiera
+ Hasiera
+ Aplikatu
+ Hautatu bistaratzeko denbora
+ Hasiera — Amaiera data
\ No newline at end of file
diff --git a/OsmAnd-telegram/res/values-fa/strings.xml b/OsmAnd-telegram/res/values-fa/strings.xml
index 9cf5642cf6..2528e3b201 100644
--- a/OsmAnd-telegram/res/values-fa/strings.xml
+++ b/OsmAnd-telegram/res/values-fa/strings.xml
@@ -22,7 +22,7 @@
وضعیت
بستن
نشان نده
- غیرفعالکردن
+ غیرفعال
ذخیره
نام
مرتبسازی
@@ -64,7 +64,7 @@
خُب
جستوجو
ارتفاع
- فعالکردن
+ فعال
انتخاب
بهکارگیری
nmi/h
diff --git a/OsmAnd-telegram/res/values-pt-rPT/strings.xml b/OsmAnd-telegram/res/values-pt-rPT/strings.xml
new file mode 100644
index 0000000000..7e854f67e4
--- /dev/null
+++ b/OsmAnd-telegram/res/values-pt-rPT/strings.xml
@@ -0,0 +1,252 @@
+
+
+ Posicionando…
+ Milhas náuticas por hora (nó)
+ Você precisa instalar a versão gratuita ou paga do OsmAnd primeiro
+ Telegram
+ Entrar
+ Data de início - fim
+ Registro no Telegram
+ Por favor, ligue \"Localização\" nas configurações do sistema
+ Sem dados
+ enviando localização
+ Selecione os contatos e grupos com os quais você deseja compartilhar sua localização.
+ Aguardando resposta do Telegram
+ Conta conectada
+ Política de privacidade do OsmAnd
+ %1$d m
+ Última localização disponível
+ OsmAnd Tracker
+ OsmAnd tracker é um dos clientes que usam a Plataforma aberta do Telegram . Seus contatos podem usar qualquer outro cliente Telegram.
+ Quilômetros/metros
+ no %1$s
+ Texto
+ Boas vindas
+ Bate-papos ativos
+ Minutos por quilômetro
+ Funcionamento em segundo plano
+ Ocultar contatos que não foram movidos em um determinado momento.
+ Configurações de GPX
+ Digite o nome do contato ou do grupo
+ min/m
+ Senha do telegrama
+ Última localização atualizada:
+ Parado
+ Mostrar quantidade de pontos de GPS coletados e enviados.
+ Você precisa de uma conta e número de telefone registrados no Telegram
+ Filtro: sem registro abaixo da velocidade selecionada
+ Ordenar por
+ Enviado
+ min/km
+ Mostrar pontos de GPS
+ Enviado e atualizado com sucesso
+ Escolha como as mensagens com sua localização serão exibidas.
+ Conexão
+ Se você deseja conectar vários aparelhos a uma conta de telegrama, é necessário usar um aparelho diferente para compartilhar sua localização.
+ Palavra-passe
+ Autorização
+ Selecionar
+ Definir tempo
+ Ativar
+ Robô
+ Altitude média
+ Data de início
+ Contatos e grupos compartilhando o local para você.
+ Todos
+ Pontos GPX recebidos: %1$s
+ Aparência
+ Nome
+ Pela distância
+ Desativar o compartilhamento de local
+ Coletado
+ Escolha um nome que você ainda não usou
+ Adicionar
+ Mostrar utilitadoes no mapa
+ Digite o código de autenticação
+ Precisão mínima de registro
+ Ao vivo agora
+ Pesquisar contatos
+ Compartilhar localização
+ Política de privacidade do Telegram
+ Conectar OsmAnd
+ Por favor, instale o Telegram e configure uma conta.
+ Quilômetros por hora
+ Senha
+ Distância mínima de registro
+ Salvar
+ Iniciar
+ Adicionar aparelho
+ Não foi possível adicionar novo aparelho
+ Cronologia
+ Conectado
+ m
+ O compartilhamento está ativado (desativado)
+ Eu não tenho conta Telegram
+ Você precisa de uma conta do Telegram para usar o compartilhamento de local.
+ Desativar todo o compartilhamento
+ Status de compartilhamento
+ Fim
+ Defina o intervalo mínimo para o compartilhamento de local.
+ Como desativar o OsmAnd Tracker para Telegram
+ Monitoramento está desativado
+ Mais tarde
+ Minha localização
+ Instalar OsmAnd
+ Telegrama (o aplicativo de mensagens) é usado para conectar e se comunicar com as pessoas.
+ Não é possível enviar para bate-papo do Telegram:
+ Ainda não enviado
+ %1$d pontos
+
+ OsmAnd Tracker permite que partilhe a sua localização e veja a dos outros no OsmAnd.
+
O app usa a API Telegram e você precisa de uma conta Telegram.
+ Filtro: distância mínima para registrar um novo ponto
+ O nome do aparelho não pode estar vazio
+ yd
+ Pesquisa: Grupo ou contato
+ Nome do aparelho
+ %1$s adicionado.
+ Port
+ Precisão
+ Expira
+ Enviar localização como
+ Sair
+ O aplicativo não tem permissão para acessar os dados de localização.
+ Milhas por hora
+ Pode criar e visualizar o ID do aparelho no cliente de telegrama usando o bot de bate-papo %1$s. %2$s
+ Voltar
+ Digite o código
+ Abrir OsmAnd
+ Aplicar
+ Número de telefone no formato internacional
+ Atualizar
+ m/s
+ OsmAnd Tracker é executado em segundo plano com o ecrã desligado.
+ enviado (%1$d em buffer)
+ Gravação de localização ativada
+ %1$d h
+ Ocultar
+ mn
+ Aceitar
+ Fechando
+ Histórico de localização
+ Modo em segundo plano
+ Ok
+ Mapa
+ Selecione um dos provedores de localização para compartilhar sua localização.
+ Configurações de proxy
+ Pesquise em todos os seus grupos e contatos.
+ mi
+ Desative a otimização da bateria do OsmAnd Tracker para que ele não seja desligado repentinamente quando estiver em segundo plano.
+ Ainda não encontrado
+ Mapa e texto
+ mn/h
+ Por favor, atualize o OsmAnd para ver os dados no mapa
+ Hora visível para todos
+ Filtro: sem registro, a menos que a precisão seja atingida
+ A última vez que um contato foi movido.
+ Credenciais
+ Pesquisar
+ Desligue todos
+ Sem conexão com a internet
+ Conta
+ seg
+ min
+ %1$d h %2$d m
+ Nome do aparelho muito longo
+ Pontos de GPS
+ Ative o monitoramento para salvar todos os locais no histórico.
+ Mostrar no mapa
+ Enviar minha localização
+ Compartilhar localização como
+ Data final
+ mph
+ Minutos por milha
+ Última atualização do Telegram
+ Tem certeza de que deseja sair do OsmAnd Tracker para que você não possa compartilhar o local ou ver a localização de outras pessoas\?
+ Servidor
+ Metros por segundo
+ Compartilhamento: Ativado
+ Por nome
+ Posição
+ Última resposta
+ Milhas/metros
+ Nome de utilizador
+ Chave
+ Cancelar
+ Conecte-se à Internet para efetuar a saída do Telegram corretamente.
+ Código de Autenticação
+ Desativa o compartilhamento de local para todos os bate-papos selecionados (%1$d).
+ Altitude
+ Fechar
+ Desativado
+ Direção
+ Tempo em movimento
+ Milhas náuticas
+ Instalar
+ Altere as configurações de otimização da bateria para estabilizar o compartilhamento de local.
+ Compartilhando em segundo plano
+ Sair do OsmAnd Tracker\?
+ Compartilhar localização
+ h
+ Como desativar o OsmAnd Tracker para Telegram
+ Nós não coletamos dados para o dia selecionado
+ Tempo de compartilhamento
+ você não está logado no
+ Ativar \"Localização\"\?
+ Tipo de proxy
+ Iniciando
+ Para revogar o acesso ao compartilhamento de local. Abra o Telegram, vá para Configurações → Privacidade e Segurança → Sessões e termine a sessão do OsmAnd Tracker.
+ Por grupo
+ Por favor, insira o número de telefone do seu Telegram em formato internacional
+ Definir tempo visível para todos
+ Número de telefone
+ Ao clicar em continuar, você concorda com as condições da política de privacidade do Telegram e da política de privacidade da OsmAnd.
+ Milhas/pés
+ Monitoramento está ativado
+ Escolha a versão OsmAnd que OsmAnd Tracker usa para exibir posições.
+ Selecionar a hora para exibir
+ Logotipo do OsmAnd
+ Velocidade média
+ Situação
+ km/h
+ Então você pode usar este aplicativo.
+ Configurações
+ Vá para as configurações
+ Uma faixa GPX é salva automaticamente durante a navegação.
+ Linha do tempo é um recurso disponível agora gratuitamente.
+ Vivo
+ Defina a hora em que seus contatos e grupos selecionados verão sua localização em tempo real.
+ Compartilhando localização
+ atrás
+ Rolamento
+ Continuar
+ km
+ Ordenar
+ Distância
+ Sem conexão GPS
+ Data
+ OsmAnd Online GPS Tracker
+ Nomeie seu novo aparelho no máximo 200 símbolos.
+ Serviço OsmAnd Tracker
+ Reenvie o local
+ Compartilhar
+ Digite a palavra-passe
+ Privacidade
+ Mostrar no OsmAnd
+ Saindo
+ Sair
+ Desabilitar
+ Digite o número de telefone
+ Velocidade mínima de registro
+ Desconectado
+ Conectando-se à Internet
+ ft
+ Como funciona
+ Grupo
+ Proxy
+ Desativar monitoramento
+ Selecione a versão do OsmAnd para usar
+ Selecione a versão OsmAnd, onde os contatos serão exibidos no mapa.
+ Milhas/jardas
+ Iniciando
+
\ No newline at end of file
diff --git a/OsmAnd-telegram/res/values-pt/strings.xml b/OsmAnd-telegram/res/values-pt/strings.xml
new file mode 100644
index 0000000000..057637d09b
--- /dev/null
+++ b/OsmAnd-telegram/res/values-pt/strings.xml
@@ -0,0 +1,251 @@
+
+
+ Sem dados
+ Selecionar
+ Distância mínima de registro
+ Filtro: distância mínima para registrar um novo ponto
+ Precisão mínima de registro
+ Filtro: sem registro, a menos que a precisão seja atingida
+ Velocidade mínima de registro
+ Filtro: sem registro abaixo da velocidade selecionada
+ Palavra-passe
+ Nome de utilizador
+ Ativar
+ Privacidade
+ Direção
+ Altitude
+ Pesquisar
+ Ok
+ OsmAnd Tracker
+ Telegram
+ Aparência
+ Atualizar
+ Data
+ Tempo em movimento
+ Altitude média
+ Velocidade média
+ Data de início
+ Mapa
+ Texto
+ Adicionar
+ Ocultar
+ Mais tarde
+ Situação
+ Ordenar por
+ Fim
+ Iniciar
+ Aplicar
+ Selecionar a hora para exibir
+ Data de início - fim
+ Nós não coletamos dados para o dia selecionado
+ Configurações de GPX
+ Chave
+ Credenciais
+ Port
+ Servidor
+ Conexão
+ Tipo de proxy
+ Conectado
+ Desconectado
+ Configurações de proxy
+ Proxy
+ Precisão
+ Rolamento
+ Pesquisar contatos
+ Pesquise em todos os seus grupos e contatos.
+ Digite o nome do contato ou do grupo
+ Linha do tempo é um recurso disponível agora gratuitamente.
+ Desativar monitoramento
+ Gravação de localização ativada
+ Ative o monitoramento para salvar todos os locais no histórico.
+ Telegrama (o aplicativo de mensagens) é usado para conectar e se comunicar com as pessoas.
+ OsmAnd tracker é um dos clientes que usam a Plataforma aberta do Telegram . Seus contatos podem usar qualquer outro cliente Telegram.
+ Ao clicar em continuar, você concorda com as condições da política de privacidade do Telegram e da política de privacidade da OsmAnd.
+ Aceitar
+ Política de privacidade do Telegram
+ Política de privacidade do OsmAnd
+ Como funciona
+ Pontos GPX recebidos: %1$s
+ Mostrar pontos de GPS
+ Mostrar quantidade de pontos de GPS coletados e enviados.
+ Por favor, atualize o OsmAnd para ver os dados no mapa
+ enviado (%1$d em buffer)
+ %1$d pontos
+ Coletado
+ Pontos de GPS
+ Enviado
+ Monitoramento está ativado
+ Monitoramento está desativado
+ Mostrar no OsmAnd
+ Data final
+ Enviar localização como
+ Escolha como as mensagens com sua localização serão exibidas.
+ Mapa e texto
+ Última atualização do Telegram
+ Escolha um nome que você ainda não usou
+ %1$s adicionado.
+ Não foi possível adicionar novo aparelho
+ Nomeie seu novo aparelho no máximo 200 símbolos.
+ Nome do aparelho muito longo
+ O nome do aparelho não pode estar vazio
+ Nome do aparelho
+ Pode criar e visualizar o ID do aparelho no cliente de telegrama usando o bot de bate-papo %1$s. %2$s
+ Se você deseja conectar vários aparelhos a uma conta de telegrama, é necessário usar um aparelho diferente para compartilhar sua localização.
+ Última localização atualizada:
+ Enviado e atualizado com sucesso
+ Não é possível enviar para bate-papo do Telegram:
+ Aguardando resposta do Telegram
+ enviando localização
+ Iniciando
+ Posicionando…
+ Conectando-se à Internet
+ Altere as configurações de otimização da bateria para estabilizar o compartilhamento de local.
+ Funcionamento em segundo plano
+ Desative a otimização da bateria do OsmAnd Tracker para que ele não seja desligado repentinamente quando estiver em segundo plano.
+ Compartilhando em segundo plano
+ Vá para as configurações
+ Ainda não enviado
+ Ainda não encontrado
+ Reenvie o local
+ Última localização disponível
+ Status de compartilhamento
+ Compartilhamento: Ativado
+ Sem conexão GPS
+ Sem conexão com a internet
+ Desativar
+ Gravar
+ Adicionar aparelho
+ Compartilhar localização como
+ Contatos e grupos compartilhando o local para você.
+ Tem certeza de que deseja sair do OsmAnd Tracker para que você não possa compartilhar o local ou ver a localização de outras pessoas\?
+ Sair do OsmAnd Tracker\?
+ Nome
+ Pela distância
+ Por nome
+ Por grupo
+ Ordenar
+ Selecione a versão OsmAnd, onde os contatos serão exibidos no mapa.
+ Selecione a versão do OsmAnd para usar
+ Desativa o compartilhamento de local para todos os bate-papos selecionados (%1$d).
+ Desativar todo o compartilhamento
+ Desligue todos
+ Sair
+ atrás
+ Última resposta
+ Grupo
+ Conecte-se à Internet para efetuar a saída do Telegram corretamente.
+ Fechar
+ Para revogar o acesso ao compartilhamento de local. Abra o Telegram, vá para Configurações → Privacidade e Segurança → Sessões e termine a sessão do OsmAnd Tracker.
+ Como desativar o OsmAnd Tracker para Telegram
+ Como desativar o OsmAnd Tracker para Telegram
+ Conta conectada
+ Conta
+ no %1$s
+ Escolha a versão OsmAnd que OsmAnd Tracker usa para exibir posições.
+ Conectar OsmAnd
+ Ocultar contatos que não foram movidos em um determinado momento.
+ Histórico de localização
+ A última vez que um contato foi movido.
+ Parado
+ Defina o intervalo mínimo para o compartilhamento de local.
+ Enviar minha localização
+ Posição
+ Tempo de compartilhamento
+ Expira
+ O compartilhamento está ativado (desativado)
+ Desativar o compartilhamento de local
+ Abrir OsmAnd
+ Vivo
+ Robô
+ Registro no Telegram
+ Você precisa de uma conta do Telegram para usar o compartilhamento de local.
+ Por favor, instale o Telegram e configure uma conta.
+ Então você pode usar este aplicativo.
+ Todos
+ Desligado
+ Você precisa de uma conta e número de telefone registrados no Telegram
+ Eu não tenho conta Telegram
+ Digite o número de telefone
+ Digite o código de autenticação
+ Definir tempo visível para todos
+ %1$d h %2$d m
+ %1$d m
+ %1$d h
+ Instalar
+ Partilhar
+ Voltar
+ Hora visível para todos
+ Defina a hora em que seus contatos e grupos selecionados verão sua localização em tempo real.
+ Definir tempo
+ Selecione os contatos e grupos com os quais você deseja compartilhar sua localização.
+ Pesquisa: Grupo ou contato
+ Compartilhar localização
+ Mostrar no mapa
+ OsmAnd Online GPS Tracker
+ Número de telefone
+ Número de telefone no formato internacional
+ Palavra-passe
+ Digite o código
+ Código de Autenticação
+ Uma faixa GPX é salva automaticamente durante a navegação.
+ Digite a palavra-passe
+ Senha do telegrama
+ Entrar
+ Sair
+ Iniciando
+ Saindo
+ Fechando
+ Ativar \"Localização\"\?
+ você não está logado no
+ Continuar
+ Cancelar
+ Configurações
+ O aplicativo não tem permissão para acessar os dados de localização.
+ Por favor, ligue \"Localização\" nas configurações do sistema
+ Selecione um dos provedores de localização para compartilhar sua localização.
+ Modo de fundo
+ OsmAnd Tracker é executado em segundo plano com o ecrã desligado.
+ Distância
+ Compartilhar localização
+ Compartilhando localização
+ Serviço OsmAnd Tracker
+ Logotipo do OsmAnd
+ Você precisa instalar a versão gratuita ou paga do OsmAnd primeiro
+ Instalar OsmAnd
+ Mostrar utilitadoes no mapa
+ Bate-papos ativos
+ Autorização
+ Por favor, insira o número de telefone do seu Telegram em formato internacional
+ Boas vindas
+ yd
+ ft
+ mi
+ km
+ m
+ mn
+ min/m
+ min/km
+ mn/h
+ m/s
+ km/h
+ mph
+ Quilómetros por hora
+ Milhas por hora
+ Metros por segundo
+ Minutos por quilómetro
+ Minutos por milha
+ Milhas náuticas por hora (nó)
+ Milhas/pés
+ Milhas/jardas
+ Quilómetros/metros
+ Milhas náuticas
+ Milhas/metros
+ h
+ min
+ seg
+ O OsmAnd Tracker permite que partilhe sua localização e veja a dos outros no OsmAnd.
+
O app usa a API Telegram e você precisa de uma conta da Telegram.
+ Minha localização
+ Ao vivo agora
+ Cronologia
+
\ No newline at end of file
diff --git a/OsmAnd-telegram/res/values-ru/strings.xml b/OsmAnd-telegram/res/values-ru/strings.xml
index 654f74dde6..3ce6fbe095 100644
--- a/OsmAnd-telegram/res/values-ru/strings.xml
+++ b/OsmAnd-telegram/res/values-ru/strings.xml
@@ -142,7 +142,7 @@
Статус
Отсутствует GPS
Отсутствует интернет
- Отключить
+ Выкл.
Сохранить
Добавить устройство
Перейти в настройки
@@ -230,4 +230,5 @@
Нет данных
Применить
Дата начала - окончания
+ Вкл.
\ No newline at end of file
diff --git a/OsmAnd-telegram/res/values-sr/strings.xml b/OsmAnd-telegram/res/values-sr/strings.xml
index f934e3a170..36d52f1fba 100644
--- a/OsmAnd-telegram/res/values-sr/strings.xml
+++ b/OsmAnd-telegram/res/values-sr/strings.xml
@@ -48,4 +48,5 @@
Километри/метри
Наутичке миље
Миље/метри
+ Примени
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl
deleted file mode 100644
index 017dd5e944..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.calculateroute;
-
-parcelable CalculateRouteParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java
deleted file mode 100644
index 3cc660ec8a..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/calculateroute/CalculateRouteParams.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package net.osmand.aidl.calculateroute;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import net.osmand.aidl.map.ALatLon;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class CalculateRouteParams implements Parcelable {
-
- private ALatLon startPoint;
- private String startPointName;
- private ALatLon endPoint;
- private String endPointName;
- private List intermediatePoints = new ArrayList<>();
- private List intermediateNames = new ArrayList<>();
-
- public CalculateRouteParams(ALatLon startPoint, String startPointName,
- ALatLon endPoint, String endPointName,
- List intermediatePoints, List intermediateNames) {
-
- if (endPoint == null) {
- throw new IllegalArgumentException("endPoint cannot be null");
- }
-
- this.startPoint = startPoint;
- this.startPointName = startPointName;
- this.endPoint = endPoint;
- this.endPointName = endPointName;
- if (intermediatePoints != null) {
- this.intermediatePoints.addAll(intermediatePoints);
- }
- if (intermediateNames != null) {
- this.intermediateNames.addAll(intermediateNames);
- }
- }
-
- public CalculateRouteParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Parcelable.Creator CREATOR = new
- Parcelable.Creator() {
- public CalculateRouteParams createFromParcel(Parcel in) {
- return new CalculateRouteParams(in);
- }
-
- public CalculateRouteParams[] newArray(int size) {
- return new CalculateRouteParams[size];
- }
- };
-
- public ALatLon getStartPoint() {
- return startPoint;
- }
-
- public String getStartPointName() {
- return startPointName;
- }
-
- public ALatLon getEndPoint() {
- return endPoint;
- }
-
- public String getEndPointName() {
- return endPointName;
- }
-
- public List getIntermediatePoints() {
- return intermediatePoints;
- }
-
- public List getIntermediateNames() {
- return intermediateNames;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(startPoint, flags);
- out.writeString(startPointName);
- out.writeParcelable(endPoint, flags);
- out.writeString(endPointName);
- out.writeTypedList(intermediatePoints);
- out.writeStringList(intermediateNames);
- }
-
- private void readFromParcel(Parcel in) {
- startPoint = in.readParcelable(ALatLon.class.getClassLoader());
- startPointName = in.readString();
- endPoint = in.readParcelable(ALatLon.class.getClassLoader());
- endPointName = in.readString();
- in.readTypedList(intermediatePoints, ALatLon.CREATOR);
- in.readStringList(intermediateNames);
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl
deleted file mode 100644
index 4a8cbee665..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/AContextMenuButton.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.contextmenu;
-
-parcelable AContextMenuButton;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl
deleted file mode 100644
index cf05b9db9c..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/ContextMenuButtonsParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.contextmenu;
-
-parcelable ContextMenuButtonsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java
deleted file mode 100644
index 33f3ab400c..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/RemoveContextMenuButtonsParams.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package net.osmand.aidl.contextmenu;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class RemoveContextMenuButtonsParams implements Parcelable {
-
- private String paramsId;
-
- private long callbackId = -1L;
-
- public RemoveContextMenuButtonsParams(String paramsId, long callbackId) {
- this.paramsId = paramsId;
- this.callbackId = callbackId;
- }
-
- public RemoveContextMenuButtonsParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public RemoveContextMenuButtonsParams createFromParcel(Parcel in) {
- return new RemoveContextMenuButtonsParams(in);
- }
-
- public RemoveContextMenuButtonsParams[] newArray(int size) {
- return new RemoveContextMenuButtonsParams[size];
- }
- };
-
- public String getParamsId() {
- return paramsId;
- }
-
- public long getCallbackId() {
- return callbackId;
- }
-
- public void writeToParcel(Parcel dest, int flags) {
- dest.writeString(paramsId);
- dest.writeLong(callbackId);
- }
-
- private void readFromParcel(Parcel in) {
- paramsId = in.readString();
- callbackId = in.readLong();
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java
deleted file mode 100644
index ce4d4a637c..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/contextmenu/UpdateContextMenuButtonsParams.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package net.osmand.aidl.contextmenu;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class UpdateContextMenuButtonsParams implements Parcelable {
- private ContextMenuButtonsParams buttonsParams;
-
- public UpdateContextMenuButtonsParams(ContextMenuButtonsParams widget) {
- this.buttonsParams = widget;
- }
-
- public UpdateContextMenuButtonsParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public UpdateContextMenuButtonsParams createFromParcel(Parcel in) {
- return new UpdateContextMenuButtonsParams(in);
- }
-
- public UpdateContextMenuButtonsParams[] newArray(int size) {
- return new UpdateContextMenuButtonsParams[size];
- }
- };
-
- public ContextMenuButtonsParams getContextMenuButtonsParams() {
- return buttonsParams;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(buttonsParams, flags);
- }
-
- private void readFromParcel(Parcel in) {
- buttonsParams = in.readParcelable(ContextMenuButtonsParams.class.getClassLoader());
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl
deleted file mode 100644
index a786325e98..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/copyfile/CopyFileParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.copyfile;
-
-parcelable CopyFileParams;
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl
deleted file mode 100644
index e72d2d47dc..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/CustomizationInfoParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.customization;
-
-parcelable CustomizationInfoParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl
deleted file mode 100644
index 80d0fa56ed..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsInfoParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.customization;
-
-parcelable OsmandSettingsInfoParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl
deleted file mode 100644
index 770070bb46..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/OsmandSettingsParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.customization;
-
-parcelable OsmandSettingsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl
deleted file mode 100644
index 235a4abe51..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.customization;
-
-parcelable SetWidgetsParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java b/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java
deleted file mode 100644
index d9343b920e..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/customization/SetWidgetsParams.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package net.osmand.aidl.customization;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.annotation.Nullable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SetWidgetsParams implements Parcelable {
-
- private String widgetKey;
- private List appModesKeys;
-
- public SetWidgetsParams(String widgetKey, @Nullable List appModesKeys) {
- this.widgetKey = widgetKey;
- this.appModesKeys = appModesKeys;
- }
-
- public SetWidgetsParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public SetWidgetsParams createFromParcel(Parcel in) {
- return new SetWidgetsParams(in);
- }
-
- @Override
- public SetWidgetsParams[] newArray(int size) {
- return new SetWidgetsParams[size];
- }
- };
-
- public String getWidgetKey() {
- return widgetKey;
- }
-
- public List getAppModesKeys() {
- return appModesKeys;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(widgetKey);
- writeStringList(out, appModesKeys);
- }
-
- private void readFromParcel(Parcel in) {
- widgetKey = in.readString();
- appModesKeys = readStringList(in);
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-
- private void writeStringList(Parcel out, List val) {
- if (val == null) {
- out.writeInt(-1);
- return;
- }
- int N = val.size();
- int i = 0;
- out.writeInt(N);
- while (i < N) {
- out.writeString(val.get(i));
- i++;
- }
- }
-
- private List readStringList(Parcel in) {
- List list = new ArrayList<>();
- int M = list.size();
- int N = in.readInt();
- if (N == -1) {
- return null;
- }
- int i = 0;
- for (; i < M && i < N; i++) {
- list.set(i, in.readString());
- }
- for (; i < N; i++) {
- list.add(in.readString());
- }
- for (; i < M; i++) {
- list.remove(N);
- }
- return list;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl
deleted file mode 100644
index afd535fbe8..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite;
-
-parcelable AFavorite;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java
deleted file mode 100644
index b7fc057249..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AFavorite.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package net.osmand.aidl.favorite;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class AFavorite implements Parcelable {
-
- private double lat;
- private double lon;
- private String name;
- private String description;
- private String category;
- private String color;
- private boolean visible;
-
- public AFavorite(double lat, double lon, String name, String description,
- String category, String color, boolean visible) {
- this.lat = lat;
- this.lon = lon;
- this.name = name;
- this.description = description;
- this.category = category;
- this.color = color;
- this.visible = visible;
- }
-
- public AFavorite(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public AFavorite createFromParcel(Parcel in) {
- return new AFavorite(in);
- }
-
- @Override
- public AFavorite[] newArray(int size) {
- return new AFavorite[size];
- }
- };
-
- public double getLat() {
- return lat;
- }
-
- public double getLon() {
- return lon;
- }
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getCategory() {
- return category;
- }
-
- public String getColor() {
- return color;
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(lat);
- out.writeDouble(lon);
- out.writeString(name);
- out.writeString(description);
- out.writeString(category);
- out.writeString(color);
- out.writeByte((byte) (visible ? 1 : 0));
- }
-
- private void readFromParcel(Parcel in) {
- lat = in.readDouble();
- lon = in.readDouble();
- name = in.readString();
- description = in.readString();
- category = in.readString();
- color = in.readString();
- visible = in.readByte() != 0;
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl
deleted file mode 100644
index c546992b10..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite;
-
-parcelable AddFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java
deleted file mode 100644
index 87baeb5a99..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/AddFavoriteParams.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.osmand.aidl.favorite;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class AddFavoriteParams implements Parcelable {
-
- private AFavorite favorite;
-
- public AddFavoriteParams(AFavorite favorite) {
- this.favorite = favorite;
- }
-
- public AddFavoriteParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public AddFavoriteParams createFromParcel(Parcel in) {
- return new AddFavoriteParams(in);
- }
-
- @Override
- public AddFavoriteParams[] newArray(int size) {
- return new AddFavoriteParams[size];
- }
- };
-
- public AFavorite getFavorite() {
- return favorite;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favorite, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favorite = in.readParcelable(AFavorite.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl
deleted file mode 100644
index 37c08cd374..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite;
-
-parcelable RemoveFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java
deleted file mode 100644
index 15e2ca74bd..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/RemoveFavoriteParams.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.osmand.aidl.favorite;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class RemoveFavoriteParams implements Parcelable {
-
- private AFavorite favorite;
-
- public RemoveFavoriteParams(AFavorite favorite) {
- this.favorite = favorite;
- }
-
- public RemoveFavoriteParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public RemoveFavoriteParams createFromParcel(Parcel in) {
- return new RemoveFavoriteParams(in);
- }
-
- @Override
- public RemoveFavoriteParams[] newArray(int size) {
- return new RemoveFavoriteParams[size];
- }
- };
-
- public AFavorite getFavorite() {
- return favorite;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favorite, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favorite = in.readParcelable(AFavorite.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl
deleted file mode 100644
index ba4a9364d3..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite;
-
-parcelable UpdateFavoriteParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java
deleted file mode 100644
index 43fdfc13bd..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/UpdateFavoriteParams.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package net.osmand.aidl.favorite;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class UpdateFavoriteParams implements Parcelable {
-
- private AFavorite favoritePrev;
- private AFavorite favoriteNew;
-
- public UpdateFavoriteParams(AFavorite favoritePrev, AFavorite favoriteNew) {
- this.favoritePrev = favoritePrev;
- this.favoriteNew = favoriteNew;
- }
-
- public UpdateFavoriteParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public UpdateFavoriteParams createFromParcel(Parcel in) {
- return new UpdateFavoriteParams(in);
- }
-
- @Override
- public UpdateFavoriteParams[] newArray(int size) {
- return new UpdateFavoriteParams[size];
- }
- };
-
- public AFavorite getFavoritePrev() {
- return favoritePrev;
- }
-
- public AFavorite getFavoriteNew() {
- return favoriteNew;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favoritePrev, flags);
- out.writeParcelable(favoriteNew, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favoritePrev = in.readParcelable(AFavorite.class.getClassLoader());
- favoriteNew = in.readParcelable(AFavorite.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl
deleted file mode 100644
index baec925474..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-parcelable AFavoriteGroup;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java
deleted file mode 100644
index e9b6348468..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AFavoriteGroup.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class AFavoriteGroup implements Parcelable {
-
- private String name;
- private String color;
- private boolean visible;
-
- public AFavoriteGroup(String name, String color, boolean visible) {
- this.name = name;
- this.color = color;
- this.visible = visible;
- }
-
- public AFavoriteGroup(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public AFavoriteGroup createFromParcel(Parcel in) {
- return new AFavoriteGroup(in);
- }
-
- @Override
- public AFavoriteGroup[] newArray(int size) {
- return new AFavoriteGroup[size];
- }
- };
-
- public String getName() {
- return name;
- }
-
- public String getColor() {
- return color;
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(name);
- out.writeString(color);
- out.writeByte((byte) (visible ? 1 : 0));
- }
-
- private void readFromParcel(Parcel in) {
- name = in.readString();
- color = in.readString();
- visible = in.readByte() != 0;
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl
deleted file mode 100644
index 5850b5cd34..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-parcelable AddFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java
deleted file mode 100644
index 7cb3228572..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/AddFavoriteGroupParams.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class AddFavoriteGroupParams implements Parcelable {
-
- private AFavoriteGroup favoriteGroup;
-
- public AddFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
- this.favoriteGroup = favoriteGroup;
- }
-
- public AddFavoriteGroupParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public AddFavoriteGroupParams createFromParcel(Parcel in) {
- return new AddFavoriteGroupParams(in);
- }
-
- @Override
- public AddFavoriteGroupParams[] newArray(int size) {
- return new AddFavoriteGroupParams[size];
- }
- };
-
- public AFavoriteGroup getFavoriteGroup() {
- return favoriteGroup;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favoriteGroup, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl
deleted file mode 100644
index e8b0710a01..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-parcelable RemoveFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java
deleted file mode 100644
index 0b17274440..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/RemoveFavoriteGroupParams.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class RemoveFavoriteGroupParams implements Parcelable {
-
- private AFavoriteGroup favoriteGroup;
-
- public RemoveFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
- this.favoriteGroup = favoriteGroup;
- }
-
- public RemoveFavoriteGroupParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public RemoveFavoriteGroupParams createFromParcel(Parcel in) {
- return new RemoveFavoriteGroupParams(in);
- }
-
- @Override
- public RemoveFavoriteGroupParams[] newArray(int size) {
- return new RemoveFavoriteGroupParams[size];
- }
- };
-
- public AFavoriteGroup getFavoriteGroup() {
- return favoriteGroup;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favoriteGroup, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl
deleted file mode 100644
index e9001a8c5e..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-parcelable UpdateFavoriteGroupParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java b/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java
deleted file mode 100644
index 0ea52e1fda..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/favorite/group/UpdateFavoriteGroupParams.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package net.osmand.aidl.favorite.group;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class UpdateFavoriteGroupParams implements Parcelable {
-
- private AFavoriteGroup favoriteGroupPrev;
- private AFavoriteGroup favoriteGroupNew;
-
- public UpdateFavoriteGroupParams(AFavoriteGroup favoriteGroup, AFavoriteGroup favoriteGroupNew) {
- this.favoriteGroupPrev = favoriteGroup;
- this.favoriteGroupNew = favoriteGroupNew;
- }
-
- public UpdateFavoriteGroupParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new Creator() {
- @Override
- public UpdateFavoriteGroupParams createFromParcel(Parcel in) {
- return new UpdateFavoriteGroupParams(in);
- }
-
- @Override
- public UpdateFavoriteGroupParams[] newArray(int size) {
- return new UpdateFavoriteGroupParams[size];
- }
- };
-
- public AFavoriteGroup getFavoriteGroupPrev() {
- return favoriteGroupPrev;
- }
-
- public AFavoriteGroup getFavoriteGroupNew() {
- return favoriteGroupNew;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(favoriteGroupPrev, flags);
- out.writeParcelable(favoriteGroupNew, flags);
- }
-
- private void readFromParcel(Parcel in) {
- favoriteGroupPrev = in.readParcelable(AFavoriteGroup.class.getClassLoader());
- favoriteGroupNew = in.readParcelable(AFavoriteGroup.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl
deleted file mode 100644
index 128f5e6b94..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.aidl
+++ /dev/null
@@ -1,4 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable AGpxBitmap;
-
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java
deleted file mode 100644
index f4bdef433d..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxBitmap.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.graphics.Bitmap;
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.annotation.NonNull;
-
-public class AGpxBitmap implements Parcelable {
-
- private Bitmap bitmap;
-
- public AGpxBitmap(@NonNull Bitmap bitmap) {
- this.bitmap = bitmap;
- }
-
- public AGpxBitmap(Parcel in) {
- readFromParcel(in);
- }
-
- public Bitmap getBitmap() {
- return bitmap;
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public AGpxBitmap createFromParcel(Parcel in) {
- return new AGpxBitmap(in);
- }
-
- public AGpxBitmap[] newArray(int size) {
- return new AGpxBitmap[size];
- }
- };
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(bitmap, flags);
- }
-
- private void readFromParcel(Parcel in) {
- bitmap = in.readParcelable(Bitmap.class.getClassLoader());
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl
deleted file mode 100644
index 413d34a571..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable AGpxFile;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java
deleted file mode 100644
index 028c0a628a..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFile.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-
-public class AGpxFile implements Parcelable {
-
- private String fileName;
- private long modifiedTime;
- private long fileSize;
- private boolean active;
- private AGpxFileDetails details;
-
- public AGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active, @Nullable AGpxFileDetails details) {
- this.fileName = fileName;
- this.modifiedTime = modifiedTime;
- this.fileSize = fileSize;
- this.active = active;
- this.details = details;
- }
-
- public AGpxFile(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public AGpxFile createFromParcel(Parcel in) {
- return new AGpxFile(in);
- }
-
- public AGpxFile[] newArray(int size) {
- return new AGpxFile[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- public long getModifiedTime() {
- return modifiedTime;
- }
-
- public long getFileSize() {
- return fileSize;
- }
-
- public boolean isActive() {
- return active;
- }
-
- public AGpxFileDetails getDetails() {
- return details;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- out.writeLong(modifiedTime);
- out.writeLong(fileSize);
- out.writeByte((byte) (active ? 1 : 0));
-
- out.writeByte((byte) (details != null ? 1 : 0));
- if (details != null) {
- out.writeParcelable(details, flags);
- }
- }
-
- private void readFromParcel(Parcel in) {
- fileName = in.readString();
- modifiedTime = in.readLong();
- fileSize = in.readLong();
- active = in.readByte() != 0;
-
- boolean hasDetails = in.readByte() != 0;
- if (hasDetails) {
- details = in.readParcelable(AGpxFileDetails.class.getClassLoader());
- } else {
- details = null;
- }
- }
-
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl
deleted file mode 100644
index 1e2cdec2b1..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable AGpxFileDetails;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java
deleted file mode 100644
index 3fe755135e..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/AGpxFileDetails.java
+++ /dev/null
@@ -1,196 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-public class AGpxFileDetails implements Parcelable {
-
- private float totalDistance = 0;
- private int totalTracks = 0;
- private long startTime = Long.MAX_VALUE;
- private long endTime = Long.MIN_VALUE;
- private long timeSpan = 0;
- private long timeMoving = 0;
- private float totalDistanceMoving = 0;
-
- private double diffElevationUp = 0;
- private double diffElevationDown = 0;
- private double avgElevation = 0;
- private double minElevation = 99999;
- private double maxElevation = -100;
-
- private float minSpeed = Float.MAX_VALUE;
- private float maxSpeed = 0;
- private float avgSpeed;
-
- private int points;
- private int wptPoints = 0;
-
- private List wptCategoryNames = new ArrayList<>();
-
- public AGpxFileDetails(float totalDistance, int totalTracks,
- long startTime, long endTime,
- long timeSpan, long timeMoving, float totalDistanceMoving,
- double diffElevationUp, double diffElevationDown,
- double avgElevation, double minElevation, double maxElevation,
- float minSpeed, float maxSpeed, float avgSpeed,
- int points, int wptPoints, Set wptCategoryNames) {
- this.totalDistance = totalDistance;
- this.totalTracks = totalTracks;
- this.startTime = startTime;
- this.endTime = endTime;
- this.timeSpan = timeSpan;
- this.timeMoving = timeMoving;
- this.totalDistanceMoving = totalDistanceMoving;
- this.diffElevationUp = diffElevationUp;
- this.diffElevationDown = diffElevationDown;
- this.avgElevation = avgElevation;
- this.minElevation = minElevation;
- this.maxElevation = maxElevation;
- this.minSpeed = minSpeed;
- this.maxSpeed = maxSpeed;
- this.avgSpeed = avgSpeed;
- this.points = points;
- this.wptPoints = wptPoints;
- if (wptCategoryNames != null) {
- this.wptCategoryNames = new ArrayList<>(wptCategoryNames);
- }
- }
-
- public AGpxFileDetails(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public AGpxFileDetails createFromParcel(Parcel in) {
- return new AGpxFileDetails(in);
- }
-
- public AGpxFileDetails[] newArray(int size) {
- return new AGpxFileDetails[size];
- }
- };
-
- public float getTotalDistance() {
- return totalDistance;
- }
-
- public int getTotalTracks() {
- return totalTracks;
- }
-
- public long getStartTime() {
- return startTime;
- }
-
- public long getEndTime() {
- return endTime;
- }
-
- public long getTimeSpan() {
- return timeSpan;
- }
-
- public long getTimeMoving() {
- return timeMoving;
- }
-
- public float getTotalDistanceMoving() {
- return totalDistanceMoving;
- }
-
- public double getDiffElevationUp() {
- return diffElevationUp;
- }
-
- public double getDiffElevationDown() {
- return diffElevationDown;
- }
-
- public double getAvgElevation() {
- return avgElevation;
- }
-
- public double getMinElevation() {
- return minElevation;
- }
-
- public double getMaxElevation() {
- return maxElevation;
- }
-
- public float getMinSpeed() {
- return minSpeed;
- }
-
- public float getMaxSpeed() {
- return maxSpeed;
- }
-
- public float getAvgSpeed() {
- return avgSpeed;
- }
-
- public int getPoints() {
- return points;
- }
-
- public int getWptPoints() {
- return wptPoints;
- }
-
- public List getWptCategoryNames() {
- return wptCategoryNames;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeFloat(totalDistance);
- out.writeInt(totalTracks);
- out.writeLong(startTime);
- out.writeLong(endTime);
- out.writeLong(timeSpan);
- out.writeLong(timeMoving);
- out.writeFloat(totalDistanceMoving);
- out.writeDouble(diffElevationUp);
- out.writeDouble(diffElevationDown);
- out.writeDouble(avgElevation);
- out.writeDouble(minElevation);
- out.writeDouble(maxElevation);
- out.writeFloat(minSpeed);
- out.writeFloat(maxSpeed);
- out.writeFloat(avgSpeed);
- out.writeInt(points);
- out.writeInt(wptPoints);
- out.writeStringList(wptCategoryNames);
- }
-
- private void readFromParcel(Parcel in) {
- totalDistance = in.readFloat();
- totalTracks = in.readInt();
- startTime = in.readLong();
- endTime = in.readLong();
- timeSpan = in.readLong();
- timeMoving = in.readLong();
- totalDistanceMoving = in.readFloat();
- diffElevationUp = in.readDouble();
- diffElevationDown = in.readDouble();
- avgElevation = in.readDouble();
- minElevation = in.readDouble();
- maxElevation = in.readDouble();
- minSpeed = in.readFloat();
- maxSpeed = in.readFloat();
- avgSpeed = in.readFloat();
- points = in.readInt();
- wptPoints = in.readInt();
- in.readStringList(wptCategoryNames);
- }
-
- public int describeContents() {
- return 0;
- }
-}
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl
deleted file mode 100644
index 23fc3312b4..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable ASelectedGpxFile;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java
deleted file mode 100644
index 6ffc6e2a70..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ASelectedGpxFile.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-
-public class ASelectedGpxFile implements Parcelable {
-
- private String fileName;
- private long modifiedTime;
- private long fileSize;
- private AGpxFileDetails details;
-
- public ASelectedGpxFile(@NonNull String fileName) {
- this.fileName = fileName;
- }
-
- public ASelectedGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, @Nullable AGpxFileDetails details) {
- this.fileName = fileName;
- this.modifiedTime = modifiedTime;
- this.fileSize = fileSize;
- this.details = details;
- }
-
- public ASelectedGpxFile(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public ASelectedGpxFile createFromParcel(Parcel in) {
- return new ASelectedGpxFile(in);
- }
-
- public ASelectedGpxFile[] newArray(int size) {
- return new ASelectedGpxFile[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- public long getModifiedTime() {
- return modifiedTime;
- }
-
- public long getFileSize() {
- return fileSize;
- }
-
- public AGpxFileDetails getDetails() {
- return details;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- out.writeLong(modifiedTime);
- out.writeLong(fileSize);
-
- out.writeByte((byte) (details != null ? 1 : 0));
- if (details != null) {
- out.writeParcelable(details, flags);
- }
- }
-
- private void readFromParcel(Parcel in) {
- fileName = in.readString();
- modifiedTime = in.readLong();
- fileSize = in.readLong();
-
- boolean hasDetails= in.readByte() != 0;
- if (hasDetails) {
- details = in.readParcelable(AGpxFileDetails.class.getClassLoader());
- } else {
- details = null;
- }
- }
-
- public int describeContents() {
- return 0;
- }
-}
-
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl
deleted file mode 100644
index bd26e19344..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable GpxColorParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java
deleted file mode 100644
index cd039ec0cc..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/GpxColorParams.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.support.annotation.NonNull;
-
-public class GpxColorParams implements Parcelable {
-
- private String fileName;
- private String gpxColor;
-
- public GpxColorParams() {
-
- }
-
- public GpxColorParams(@NonNull String fileName) {
- this.fileName = fileName;
- }
-
- public GpxColorParams(@NonNull String fileName, String gpxColor) {
- this.fileName = fileName;
- this.gpxColor = gpxColor;
- }
-
- public GpxColorParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public GpxColorParams createFromParcel(Parcel in) {
- return new GpxColorParams(in);
- }
-
- public GpxColorParams[] newArray(int size) {
- return new GpxColorParams[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- public String getGpxColor() {
- return gpxColor;
- }
-
- public void setGpxColor(String gpxColor) {
- this.gpxColor = gpxColor;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- out.writeString(gpxColor);
- }
-
- public void readFromParcel(Parcel in) {
- fileName = in.readString();
- gpxColor = in.readString();
- }
-
- public int describeContents() {
- return 0;
- }
-}
-
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl
deleted file mode 100644
index 4c8992552c..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable HideGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java
deleted file mode 100644
index 5e37c66f80..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/HideGpxParams.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class HideGpxParams implements Parcelable {
-
- private String fileName;
-
- public HideGpxParams(String fileName) {
- this.fileName = fileName;
- }
-
- public HideGpxParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public HideGpxParams createFromParcel(Parcel in) {
- return new HideGpxParams(in);
- }
-
- public HideGpxParams[] newArray(int size) {
- return new HideGpxParams[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- }
-
- private void readFromParcel(Parcel in) {
- fileName = in.readString();
- }
-
- public int describeContents() {
- return 0;
- }
-}
-
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl
deleted file mode 100644
index 23ecdb6ff3..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ImportGpxParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable ImportGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl
deleted file mode 100644
index e9025f7a19..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable RemoveGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java
deleted file mode 100644
index 2253fa3616..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/RemoveGpxParams.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class RemoveGpxParams implements Parcelable {
-
- private String fileName;
-
- public RemoveGpxParams(String fileName) {
- this.fileName = fileName;
- }
-
- public RemoveGpxParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- @Override
- public RemoveGpxParams createFromParcel(Parcel in) {
- return new RemoveGpxParams(in);
- }
-
- @Override
- public RemoveGpxParams[] newArray(int size) {
- return new RemoveGpxParams[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- }
-
- private void readFromParcel(Parcel in) {
- fileName = in.readString();
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl
deleted file mode 100644
index 217f600c4e..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.gpx;
-
-parcelable ShowGpxParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java b/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java
deleted file mode 100644
index 4d385a65a4..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/gpx/ShowGpxParams.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.osmand.aidl.gpx;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class ShowGpxParams implements Parcelable {
-
- private String fileName;
-
- public ShowGpxParams(String fileName) {
- this.fileName = fileName;
- }
-
- public ShowGpxParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public ShowGpxParams createFromParcel(Parcel in) {
- return new ShowGpxParams(in);
- }
-
- public ShowGpxParams[] newArray(int size) {
- return new ShowGpxParams[size];
- }
- };
-
- public String getFileName() {
- return fileName;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(fileName);
- }
-
- private void readFromParcel(Parcel in) {
- fileName = in.readString();
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl b/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl
deleted file mode 100644
index 33d5930f02..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/map/ALatLon.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.map;
-
-parcelable ALatLon;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java b/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java
deleted file mode 100644
index 929c817d9d..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/map/SetMapLocationParams.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package net.osmand.aidl.map;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class SetMapLocationParams implements Parcelable {
-
- private double latitude;
- private double longitude;
- private int zoom;
- private boolean animated;
-
- public SetMapLocationParams(double latitude, double longitude, int zoom, boolean animated) {
- this.latitude = latitude;
- this.longitude = longitude;
- this.zoom = zoom;
- this.animated = animated;
- }
-
- public SetMapLocationParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public SetMapLocationParams createFromParcel(Parcel in) {
- return new SetMapLocationParams(in);
- }
-
- public SetMapLocationParams[] newArray(int size) {
- return new SetMapLocationParams[size];
- }
- };
-
- public double getLatitude() {
- return latitude;
- }
-
- public double getLongitude() {
- return longitude;
- }
-
- public int getZoom() {
- return zoom;
- }
-
- public boolean isAnimated() {
- return animated;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeDouble(latitude);
- out.writeDouble(longitude);
- out.writeInt(zoom);
- out.writeByte((byte) (animated ? 1 : 0));
- }
-
- private void readFromParcel(Parcel in) {
- latitude = in.readDouble();
- longitude = in.readDouble();
- zoom = in.readInt();
- animated = in.readByte() != 0;
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl
deleted file mode 100644
index 745f49f1a5..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AMapLayer.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-parcelable AMapLayer;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl
deleted file mode 100644
index 8116760a45..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-parcelable AddMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java
deleted file mode 100644
index 38e9e53667..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/AddMapLayerParams.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.Parcelable.Creator;
-
-public class AddMapLayerParams implements Parcelable {
- private AMapLayer layer;
-
- public AddMapLayerParams(AMapLayer layer) {
- this.layer = layer;
- }
-
- public AddMapLayerParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public AddMapLayerParams createFromParcel(Parcel in) {
- return new AddMapLayerParams(in);
- }
-
- public AddMapLayerParams[] newArray(int size) {
- return new AddMapLayerParams[size];
- }
- };
-
- public AMapLayer getLayer() {
- return layer;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(layer, flags);
- }
-
- private void readFromParcel(Parcel in) {
- layer = in.readParcelable(AMapLayer.class.getClassLoader());
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl
deleted file mode 100644
index 20a972ee95..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-parcelable RemoveMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java
deleted file mode 100644
index 3e87627445..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/RemoveMapLayerParams.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.Parcelable.Creator;
-
-public class RemoveMapLayerParams implements Parcelable {
- private String id;
-
- public RemoveMapLayerParams(String id) {
- this.id = id;
- }
-
- public RemoveMapLayerParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public RemoveMapLayerParams createFromParcel(Parcel in) {
- return new RemoveMapLayerParams(in);
- }
-
- public RemoveMapLayerParams[] newArray(int size) {
- return new RemoveMapLayerParams[size];
- }
- };
-
- public String getId() {
- return id;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(id);
- }
-
- private void readFromParcel(Parcel in) {
- id = in.readString();
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl
deleted file mode 100644
index eafe8ef464..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-parcelable UpdateMapLayerParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java
deleted file mode 100644
index a2f6e16498..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/UpdateMapLayerParams.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package net.osmand.aidl.maplayer;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-import android.os.Parcelable.Creator;
-
-public class UpdateMapLayerParams implements Parcelable {
- private AMapLayer layer;
-
- public UpdateMapLayerParams(AMapLayer layer) {
- this.layer = layer;
- }
-
- public UpdateMapLayerParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public UpdateMapLayerParams createFromParcel(Parcel in) {
- return new UpdateMapLayerParams(in);
- }
-
- public UpdateMapLayerParams[] newArray(int size) {
- return new UpdateMapLayerParams[size];
- }
- };
-
- public AMapLayer getLayer() {
- return layer;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeParcelable(layer, flags);
- }
-
- private void readFromParcel(Parcel in) {
- layer = in.readParcelable(AMapLayer.class.getClassLoader());
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl
deleted file mode 100644
index 53fb86b788..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AMapPoint.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-parcelable AMapPoint;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl
deleted file mode 100644
index d41d6b69ca..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-parcelable AddMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java
deleted file mode 100644
index 0d575a38d9..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/AddMapPointParams.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class AddMapPointParams implements Parcelable {
- private String layerId;
- private AMapPoint point;
-
- public AddMapPointParams(String layerId, AMapPoint point) {
- this.layerId = layerId;
- this.point = point;
- }
-
- public AddMapPointParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public AddMapPointParams createFromParcel(Parcel in) {
- return new AddMapPointParams(in);
- }
-
- public AddMapPointParams[] newArray(int size) {
- return new AddMapPointParams[size];
- }
- };
-
- public String getLayerId() {
- return layerId;
- }
-
- public AMapPoint getPoint() {
- return point;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(layerId);
- out.writeParcelable(point, flags);
- }
-
- private void readFromParcel(Parcel in) {
- layerId = in.readString();
- point = in.readParcelable(AMapPoint.class.getClassLoader());
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl
deleted file mode 100644
index 68a5fdcf11..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-parcelable RemoveMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java
deleted file mode 100644
index 797556b1e3..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/RemoveMapPointParams.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class RemoveMapPointParams implements Parcelable {
- private String layerId;
- private String pointId;
-
- public RemoveMapPointParams(String layerId, String pointId) {
- this.layerId = layerId;
- this.pointId = pointId;
- }
-
- public RemoveMapPointParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public RemoveMapPointParams createFromParcel(Parcel in) {
- return new RemoveMapPointParams(in);
- }
-
- public RemoveMapPointParams[] newArray(int size) {
- return new RemoveMapPointParams[size];
- }
- };
-
- public String getLayerId() {
- return layerId;
- }
-
- public String getPointId() {
- return pointId;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(layerId);
- out.writeString(pointId);
- }
-
- private void readFromParcel(Parcel in) {
- layerId = in.readString();
- pointId = in.readString();
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl
deleted file mode 100644
index 54ff9b2075..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-parcelable ShowMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java
deleted file mode 100644
index 5b6e0c17c9..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/ShowMapPointParams.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class ShowMapPointParams implements Parcelable {
-
- private String layerId;
- private AMapPoint point;
-
- public ShowMapPointParams(String layerId, AMapPoint point) {
- this.layerId = layerId;
- this.point = point;
- }
-
- public ShowMapPointParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- @Override
- public ShowMapPointParams createFromParcel(Parcel in) {
- return new ShowMapPointParams(in);
- }
-
- @Override
- public ShowMapPointParams[] newArray(int size) {
- return new ShowMapPointParams[size];
- }
- };
-
- public String getLayerId() {
- return layerId;
- }
-
- public AMapPoint getPoint() {
- return point;
- }
-
- @Override
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(layerId);
- out.writeParcelable(point, flags);
- }
-
- private void readFromParcel(Parcel in) {
- layerId = in.readString();
- point = in.readParcelable(AMapPoint.class.getClassLoader());
- }
-
- @Override
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl
deleted file mode 100644
index d81ea87253..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-parcelable UpdateMapPointParams;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java b/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java
deleted file mode 100644
index a7b871a1d4..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/maplayer/point/UpdateMapPointParams.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package net.osmand.aidl.maplayer.point;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class UpdateMapPointParams implements Parcelable {
- private String layerId;
- private AMapPoint point;
- private boolean updateOpenedMenuAndMap;
-
- public UpdateMapPointParams(String layerId, AMapPoint point, boolean updateOpenedMenuAndMap) {
- this.layerId = layerId;
- this.point = point;
- this.updateOpenedMenuAndMap = updateOpenedMenuAndMap;
- }
-
- public UpdateMapPointParams(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Creator CREATOR = new
- Creator() {
- public UpdateMapPointParams createFromParcel(Parcel in) {
- return new UpdateMapPointParams(in);
- }
-
- public UpdateMapPointParams[] newArray(int size) {
- return new UpdateMapPointParams[size];
- }
- };
-
- public String getLayerId() {
- return layerId;
- }
-
- public AMapPoint getPoint() {
- return point;
- }
-
- public boolean isUpdateOpenedMenuAndMap() {
- return updateOpenedMenuAndMap;
- }
-
- public void writeToParcel(Parcel out, int flags) {
- out.writeString(layerId);
- out.writeParcelable(point, flags);
- out.writeInt(updateOpenedMenuAndMap ? 1 : 0);
- }
-
- private void readFromParcel(Parcel in) {
- layerId = in.readString();
- point = in.readParcelable(AMapPoint.class.getClassLoader());
- updateOpenedMenuAndMap = in.readInt() != 0;
- }
-
- public int describeContents() {
- return 0;
- }
-}
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl
deleted file mode 100644
index 4721b1812b..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.aidl
+++ /dev/null
@@ -1,3 +0,0 @@
-package net.osmand.aidl.mapmarker;
-
-parcelable AMapMarker;
\ No newline at end of file
diff --git a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java b/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java
deleted file mode 100644
index 083b5bbb37..0000000000
--- a/OsmAnd-telegram/src/net/osmand/aidl/mapmarker/AMapMarker.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package net.osmand.aidl.mapmarker;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import net.osmand.aidl.map.ALatLon;
-
-public class AMapMarker implements Parcelable {
-
- private ALatLon latLon;
- private String name;
-
- public AMapMarker(ALatLon latLon, String name) {
-
- if (latLon == null) {
- throw new IllegalArgumentException("latLon cannot be null");
- }
-
- if (name == null) {
- name = "";
- }
-
- this.latLon = latLon;
- this.name = name;
- }
-
- public AMapMarker(Parcel in) {
- readFromParcel(in);
- }
-
- public static final Parcelable.Creator CREATOR = new
- Parcelable.Creator