Merge branch 'master' into patch-19
This commit is contained in:
commit
06a3e62cfa
577 changed files with 19124 additions and 7009 deletions
10
OsmAnd-api/.gitignore
vendored
Normal file
10
OsmAnd-api/.gitignore
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Android Studio
|
||||
*/.idea
|
||||
*/*.iml
|
||||
|
||||
# Gradle
|
||||
*/.gradle
|
||||
*/local.properties
|
||||
|
||||
# Output files
|
||||
*/build
|
1
OsmAnd-api/AndroidManifest.xml
Normal file
1
OsmAnd-api/AndroidManifest.xml
Normal file
|
@ -0,0 +1 @@
|
|||
<manifest package="net.osmand.aidlapi" />
|
41
OsmAnd-api/build.gradle
Normal file
41
OsmAnd-api/build.gradle
Normal file
|
@ -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
|
||||
}
|
3
OsmAnd-api/res/values/strings.xml
Normal file
3
OsmAnd-api/res/values/strings.xml
Normal file
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">OsmAnd-api</string>
|
||||
</resources>
|
35
OsmAnd-api/src/net/osmand/aidlapi/AidlParams.java
Normal file
35
OsmAnd-api/src/net/osmand/aidlapi/AidlParams.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
*/
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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";
|
||||
|
||||
}
|
||||
}
|
36
OsmAnd-api/src/net/osmand/aidlapi/OsmandAidlConstants.java
Normal file
36
OsmAnd-api/src/net/osmand/aidlapi/OsmandAidlConstants.java
Normal file
|
@ -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
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.calculateroute;
|
||||
|
||||
parcelable CalculateRouteParams;
|
|
@ -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<ALatLon> intermediatePoints = new ArrayList<>();
|
||||
private ArrayList<String> intermediateNames = new ArrayList<>();
|
||||
|
||||
public CalculateRouteParams(ALatLon startPoint, String startPointName,
|
||||
ALatLon endPoint, String endPointName,
|
||||
List<ALatLon> intermediatePoints, List<String> 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<CalculateRouteParams> CREATOR = new Creator<CalculateRouteParams>() {
|
||||
@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<ALatLon> getIntermediatePoints() {
|
||||
return intermediatePoints;
|
||||
}
|
||||
|
||||
public List<String> 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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.contextmenu;
|
||||
|
||||
parcelable AContextMenuButton;
|
|
@ -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<AContextMenuButton> 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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.contextmenu;
|
||||
|
||||
parcelable ContextMenuButtonsParams;
|
|
@ -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<String> pointsIds = new ArrayList<>();
|
||||
private ArrayList<String> pointsIds = new ArrayList<>();
|
||||
|
||||
public ContextMenuButtonsParams(AContextMenuButton leftButton, AContextMenuButton rightButton, String id, String appPackage, String layerId, long callbackId, List<String> 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");
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
package net.osmand.aidlapi.contextmenu;
|
||||
|
||||
parcelable RemoveContextMenuButtonsParams;
|
|
@ -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<RemoveContextMenuButtonsParams> CREATOR = new Creator<RemoveContextMenuButtonsParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
package net.osmand.aidlapi.contextmenu;
|
||||
|
||||
parcelable UpdateContextMenuButtonsParams;
|
|
@ -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<UpdateContextMenuButtonsParams> CREATOR = new Creator<UpdateContextMenuButtonsParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.copyfile;
|
||||
|
||||
parcelable CopyFileParams;
|
|
@ -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<CopyFileParams> CREATOR = new Creator<CopyFileParams>() {
|
||||
@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<CopyFileParams> CREATOR = new Creator<CopyFileParams>() {
|
||||
@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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
parcelable CustomizationInfoParams;
|
|
@ -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<PluginParams> pluginsParams = new ArrayList<>();
|
||||
|
||||
private List<String> featuresEnabledIds = new ArrayList<>();
|
||||
private List<String> featuresDisabledIds = new ArrayList<>();
|
||||
private List<String> featuresEnabledPatterns = new ArrayList<>();
|
||||
private List<String> featuresDisabledPatterns = new ArrayList<>();
|
||||
private ArrayList<String> featuresEnabledIds = new ArrayList<>();
|
||||
private ArrayList<String> featuresDisabledIds = new ArrayList<>();
|
||||
private ArrayList<String> featuresEnabledPatterns = new ArrayList<>();
|
||||
private ArrayList<String> 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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
parcelable OsmandSettingsInfoParams;
|
|
@ -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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
parcelable OsmandSettingsParams;
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.customization;
|
||||
|
||||
parcelable SetWidgetsParams;
|
|
@ -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<String> appModesKeys = new ArrayList<>();
|
||||
|
||||
public SetWidgetsParams(String widgetKey, @Nullable List<String> appModesKeys) {
|
||||
this.widgetKey = widgetKey;
|
||||
if (appModesKeys != null) {
|
||||
this.appModesKeys.addAll(appModesKeys);
|
||||
}
|
||||
}
|
||||
|
||||
public SetWidgetsParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<SetWidgetsParams> CREATOR = new Creator<SetWidgetsParams>() {
|
||||
@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<String> 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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite;
|
||||
|
||||
parcelable AFavorite;
|
94
OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.java
Normal file
94
OsmAnd-api/src/net/osmand/aidlapi/favorite/AFavorite.java
Normal file
|
@ -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<AFavorite> CREATOR = new Creator<AFavorite>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite;
|
||||
|
||||
parcelable AddFavoriteParams;
|
|
@ -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<AddFavoriteParams> CREATOR = new Creator<AddFavoriteParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite;
|
||||
|
||||
parcelable RemoveFavoriteParams;
|
|
@ -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<RemoveFavoriteParams> CREATOR = new Creator<RemoveFavoriteParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite;
|
||||
|
||||
parcelable UpdateFavoriteParams;
|
|
@ -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<UpdateFavoriteParams> CREATOR = new Creator<UpdateFavoriteParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite.group;
|
||||
|
||||
parcelable AFavoriteGroup;
|
|
@ -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<AFavoriteGroup> CREATOR = new Creator<AFavoriteGroup>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite.group;
|
||||
|
||||
parcelable AddFavoriteGroupParams;
|
|
@ -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<AddFavoriteGroupParams> CREATOR = new Creator<AddFavoriteGroupParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite.group;
|
||||
|
||||
parcelable RemoveFavoriteGroupParams;
|
|
@ -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<RemoveFavoriteGroupParams> CREATOR = new Creator<RemoveFavoriteGroupParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.favorite.group;
|
||||
|
||||
parcelable UpdateFavoriteGroupParams;
|
|
@ -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<UpdateFavoriteGroupParams> CREATOR = new Creator<UpdateFavoriteGroupParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.aidl
Normal file
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable AGpxBitmap;
|
48
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java
Normal file
48
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxBitmap.java
Normal file
|
@ -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<AGpxBitmap> CREATOR = new Creator<AGpxBitmap>() {
|
||||
@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");
|
||||
}
|
||||
}
|
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.aidl
Normal file
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable AGpxFile;
|
88
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java
Normal file
88
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFile.java
Normal file
|
@ -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<AGpxFile> CREATOR = new Creator<AGpxFile>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable AGpxFileDetails;
|
197
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.java
Normal file
197
OsmAnd-api/src/net/osmand/aidlapi/gpx/AGpxFileDetails.java
Normal file
|
@ -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<String> 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<String> 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<AGpxFileDetails> CREATOR = new Creator<AGpxFileDetails>() {
|
||||
@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<String> 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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable ASelectedGpxFile;
|
76
OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java
Normal file
76
OsmAnd-api/src/net/osmand/aidlapi/gpx/ASelectedGpxFile.java
Normal file
|
@ -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<ASelectedGpxFile> CREATOR = new Creator<ASelectedGpxFile>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable CreateGpxBitmapParams;
|
|
@ -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<CreateGpxBitmapParams> CREATOR = new
|
||||
Creator<CreateGpxBitmapParams>() {
|
||||
public CreateGpxBitmapParams createFromParcel(Parcel in) {
|
||||
return new CreateGpxBitmapParams(in);
|
||||
}
|
||||
public static final Creator<CreateGpxBitmapParams> CREATOR = new Creator<CreateGpxBitmapParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.aidl
Normal file
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable HideGpxParams;
|
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.java
Normal file
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/HideGpxParams.java
Normal file
|
@ -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<HideGpxParams> CREATOR = new Creator<HideGpxParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable ImportGpxParams;
|
|
@ -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<ImportGpxParams> CREATOR = new
|
||||
Creator<ImportGpxParams>() {
|
||||
public ImportGpxParams createFromParcel(Parcel in) {
|
||||
return new ImportGpxParams(in);
|
||||
}
|
||||
public static final Creator<ImportGpxParams> CREATOR = new Creator<ImportGpxParams>() {
|
||||
@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);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable RemoveGpxParams;
|
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.java
Normal file
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/RemoveGpxParams.java
Normal file
|
@ -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<RemoveGpxParams> CREATOR = new Creator<RemoveGpxParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.aidl
Normal file
3
OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable ShowGpxParams;
|
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.java
Normal file
45
OsmAnd-api/src/net/osmand/aidlapi/gpx/ShowGpxParams.java
Normal file
|
@ -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<ShowGpxParams> CREATOR = new Creator<ShowGpxParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable StartGpxRecordingParams;
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
package net.osmand.aidlapi.gpx;
|
||||
|
||||
parcelable StopGpxRecordingParams;
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
3
OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.aidl
Normal file
3
OsmAnd-api/src/net/osmand/aidlapi/map/ALatLon.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.map;
|
||||
|
||||
parcelable ALatLon;
|
|
@ -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<ALatLon> CREATOR = new
|
||||
Parcelable.Creator<ALatLon>() {
|
||||
public ALatLon createFromParcel(Parcel in) {
|
||||
return new ALatLon(in);
|
||||
}
|
||||
public static final Creator<ALatLon> CREATOR = new Creator<ALatLon>() {
|
||||
@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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
package net.osmand.aidl.map;
|
||||
package net.osmand.aidlapi.map;
|
||||
|
||||
parcelable SetMapLocationParams;
|
|
@ -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<SetMapLocationParams> CREATOR = new Creator<SetMapLocationParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer;
|
||||
|
||||
parcelable AMapLayer;
|
|
@ -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<AMapLayer> CREATOR = new
|
||||
Parcelable.Creator<AMapLayer>() {
|
||||
public AMapLayer createFromParcel(Parcel in) {
|
||||
return new AMapLayer(in);
|
||||
}
|
||||
public static final Creator<AMapLayer> CREATOR = new Creator<AMapLayer>() {
|
||||
@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<AMapPoint> 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<AMapPoint> 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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer;
|
||||
|
||||
parcelable AddMapLayerParams;
|
|
@ -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<AddMapLayerParams> CREATOR = new Creator<AddMapLayerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer;
|
||||
|
||||
parcelable RemoveMapLayerParams;
|
|
@ -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<RemoveMapLayerParams> CREATOR = new Creator<RemoveMapLayerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer;
|
||||
|
||||
parcelable UpdateMapLayerParams;
|
|
@ -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<UpdateMapLayerParams> CREATOR = new Creator<UpdateMapLayerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer.point;
|
||||
|
||||
parcelable AMapPoint;
|
|
@ -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<String> details = new ArrayList<>();
|
||||
private Map<String, String> params = new HashMap<>();
|
||||
private ArrayList<String> details = new ArrayList<>();
|
||||
private HashMap<String, String> 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<String> details, Map<String, String> params) {
|
||||
this.id = id;
|
||||
this.shortName = shortName;
|
||||
|
@ -48,16 +50,17 @@ public class AMapPoint implements Parcelable {
|
|||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AMapPoint> CREATOR = new
|
||||
Creator<AMapPoint>() {
|
||||
public AMapPoint createFromParcel(Parcel in) {
|
||||
return new AMapPoint(in);
|
||||
}
|
||||
public static final Creator<AMapPoint> CREATOR = new Creator<AMapPoint>() {
|
||||
@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<String, String>) bundle.getSerializable("params");
|
||||
layerId = bundle.getString("layerId");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer.point;
|
||||
|
||||
parcelable AddMapPointParams;
|
|
@ -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<AddMapPointParams> CREATOR = new Creator<AddMapPointParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer.point;
|
||||
|
||||
parcelable RemoveMapPointParams;
|
|
@ -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<RemoveMapPointParams> CREATOR = new Creator<RemoveMapPointParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer.point;
|
||||
|
||||
parcelable ShowMapPointParams;
|
|
@ -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<ShowMapPointParams> CREATOR = new Creator<ShowMapPointParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.maplayer.point;
|
||||
|
||||
parcelable UpdateMapPointParams;
|
|
@ -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<UpdateMapPointParams> CREATOR = new Creator<UpdateMapPointParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapmarker;
|
||||
|
||||
parcelable AMapMarker;
|
61
OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.java
Normal file
61
OsmAnd-api/src/net/osmand/aidlapi/mapmarker/AMapMarker.java
Normal file
|
@ -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<AMapMarker> CREATOR = new Creator<AMapMarker>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapmarker;
|
||||
|
||||
parcelable AddMapMarkerParams;
|
|
@ -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<AddMapMarkerParams> CREATOR = new Creator<AddMapMarkerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkerParams;
|
|
@ -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<RemoveMapMarkerParams> CREATOR = new Creator<RemoveMapMarkerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkersParams;
|
|
@ -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<RemoveMapMarkersParams> CREATOR = new Creator<RemoveMapMarkersParams>() {
|
||||
@Override
|
||||
public RemoveMapMarkersParams createFromParcel(Parcel in) {
|
||||
return new RemoveMapMarkersParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RemoveMapMarkersParams[] newArray(int size) {
|
||||
return new RemoveMapMarkersParams[size];
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapmarker;
|
||||
|
||||
parcelable UpdateMapMarkerParams;
|
|
@ -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<UpdateMapMarkerParams> CREATOR = new Creator<UpdateMapMarkerParams>() {
|
||||
@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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidlapi.mapwidget;
|
||||
|
||||
parcelable AMapWidget;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue