Add second aidl version base
This commit is contained in:
parent
43a98a1d77
commit
9f595d37f9
151 changed files with 6064 additions and 0 deletions
43
osmand-api/src/net/osmand/aidl2/AidlParams.java
Normal file
43
osmand-api/src/net/osmand/aidl2/AidlParams.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
package net.osmand.aidl2;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public abstract class AidlParams implements Parcelable {
|
||||
|
||||
protected AidlParams() {
|
||||
|
||||
}
|
||||
|
||||
protected AidlParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void writeToParcel(Parcel dest, int flags) {
|
||||
Bundle bundle = new Bundle();
|
||||
writeToBundle(bundle);
|
||||
dest.writeBundle(bundle);
|
||||
}
|
||||
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
protected void readFromParcel(Parcel in) {
|
||||
Bundle bundle = in.readBundle(getClass().getClassLoader());
|
||||
if (bundle != null) {
|
||||
readFromBundle(bundle);
|
||||
}
|
||||
}
|
||||
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
54
osmand-api/src/net/osmand/aidl2/IOsmAndAidlCallback.aidl
Normal file
54
osmand-api/src/net/osmand/aidl2/IOsmAndAidlCallback.aidl
Normal file
|
@ -0,0 +1,54 @@
|
|||
package net.osmand.aidl2;
|
||||
|
||||
import net.osmand.aidl2.search.SearchResult;
|
||||
import net.osmand.aidl2.gpx.AGpxBitmap;
|
||||
import net.osmand.aidl2.navigation.ADirectionInfo;
|
||||
import net.osmand.aidl2.navigation.OnVoiceNavigationParams;
|
||||
|
||||
interface IOsmAndAidlCallback {
|
||||
|
||||
/**
|
||||
* Callback for search requests.
|
||||
*
|
||||
* @return resultSet - set of SearchResult
|
||||
*/
|
||||
void onSearchComplete(in List<SearchResult> resultSet);
|
||||
|
||||
/**
|
||||
* Callback for {@link IOsmAndAidlInterface} registerForUpdates() method.
|
||||
*/
|
||||
void onUpdate();
|
||||
|
||||
/**
|
||||
* Callback for {@link IOsmAndAidlInterface} registerForOsmandInitListener() method.
|
||||
*/
|
||||
void onAppInitialized();
|
||||
|
||||
/**
|
||||
* Callback for {@link IOsmAndAidlInterface} getBitmapForGpx() method.
|
||||
*
|
||||
* @return bitmap - snapshot image of gpx track on map
|
||||
*/
|
||||
void onGpxBitmapCreated(in AGpxBitmap bitmap);
|
||||
|
||||
/**
|
||||
* Callback for {@link IOsmAndAidlInterface} registerForNavigationUpdates() method.
|
||||
*
|
||||
* @return directionInfo - update on distance to next turn and turns type.
|
||||
*/
|
||||
void updateNavigationInfo(in ADirectionInfo directionInfo);
|
||||
|
||||
/**
|
||||
* Callback for {@link IOsmAndAidlInterface} buttons set with addContextMenuButtons() method.
|
||||
*
|
||||
* @param buttonId - id of custom button
|
||||
* @param pointId - id of point button associated with
|
||||
* @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.
|
||||
*/
|
||||
void onVoiceRouterNotify(in OnVoiceNavigationParams params);
|
||||
}
|
849
osmand-api/src/net/osmand/aidl2/IOsmAndAidlInterface.aidl
Normal file
849
osmand-api/src/net/osmand/aidl2/IOsmAndAidlInterface.aidl
Normal file
|
@ -0,0 +1,849 @@
|
|||
package net.osmand.aidl2;
|
||||
|
||||
import net.osmand.aidl2.map.ALatLon;
|
||||
import net.osmand.aidl2.map.SetMapLocationParams;
|
||||
|
||||
import net.osmand.aidl2.favorite.group.AFavoriteGroup;
|
||||
import net.osmand.aidl2.favorite.group.AddFavoriteGroupParams;
|
||||
import net.osmand.aidl2.favorite.group.RemoveFavoriteGroupParams;
|
||||
import net.osmand.aidl2.favorite.group.UpdateFavoriteGroupParams;
|
||||
|
||||
import net.osmand.aidl2.favorite.AFavorite;
|
||||
import net.osmand.aidl2.favorite.AddFavoriteParams;
|
||||
import net.osmand.aidl2.favorite.RemoveFavoriteParams;
|
||||
import net.osmand.aidl2.favorite.UpdateFavoriteParams;
|
||||
|
||||
import net.osmand.aidl2.mapmarker.AMapMarker;
|
||||
import net.osmand.aidl2.mapmarker.AddMapMarkerParams;
|
||||
import net.osmand.aidl2.mapmarker.RemoveMapMarkerParams;
|
||||
import net.osmand.aidl2.mapmarker.UpdateMapMarkerParams;
|
||||
|
||||
import net.osmand.aidl2.calculateroute.CalculateRouteParams;
|
||||
|
||||
import net.osmand.aidl2.gpx.ImportGpxParams;
|
||||
import net.osmand.aidl2.gpx.ShowGpxParams;
|
||||
import net.osmand.aidl2.gpx.StartGpxRecordingParams;
|
||||
import net.osmand.aidl2.gpx.StopGpxRecordingParams;
|
||||
import net.osmand.aidl2.gpx.HideGpxParams;
|
||||
import net.osmand.aidl2.gpx.ASelectedGpxFile;
|
||||
|
||||
import net.osmand.aidl2.mapwidget.AMapWidget;
|
||||
import net.osmand.aidl2.mapwidget.AddMapWidgetParams;
|
||||
import net.osmand.aidl2.mapwidget.RemoveMapWidgetParams;
|
||||
import net.osmand.aidl2.mapwidget.UpdateMapWidgetParams;
|
||||
|
||||
import net.osmand.aidl2.maplayer.point.AMapPoint;
|
||||
import net.osmand.aidl2.maplayer.point.AddMapPointParams;
|
||||
import net.osmand.aidl2.maplayer.point.RemoveMapPointParams;
|
||||
import net.osmand.aidl2.maplayer.point.UpdateMapPointParams;
|
||||
import net.osmand.aidl2.maplayer.AMapLayer;
|
||||
import net.osmand.aidl2.maplayer.AddMapLayerParams;
|
||||
import net.osmand.aidl2.maplayer.RemoveMapLayerParams;
|
||||
import net.osmand.aidl2.maplayer.UpdateMapLayerParams;
|
||||
|
||||
import net.osmand.aidl2.navigation.NavigateParams;
|
||||
import net.osmand.aidl2.navigation.NavigateGpxParams;
|
||||
|
||||
import net.osmand.aidl2.note.TakePhotoNoteParams;
|
||||
import net.osmand.aidl2.note.StartVideoRecordingParams;
|
||||
import net.osmand.aidl2.note.StartAudioRecordingParams;
|
||||
import net.osmand.aidl2.note.StopRecordingParams;
|
||||
|
||||
import net.osmand.aidl2.gpx.RemoveGpxParams;
|
||||
|
||||
import net.osmand.aidl2.maplayer.point.ShowMapPointParams;
|
||||
|
||||
import net.osmand.aidl2.navdrawer.SetNavDrawerItemsParams;
|
||||
import net.osmand.aidl2.navdrawer.NavDrawerFooterParams;
|
||||
import net.osmand.aidl2.navdrawer.NavDrawerHeaderParams;
|
||||
|
||||
import net.osmand.aidl2.navigation.PauseNavigationParams;
|
||||
import net.osmand.aidl2.navigation.ResumeNavigationParams;
|
||||
import net.osmand.aidl2.navigation.StopNavigationParams;
|
||||
import net.osmand.aidl2.navigation.MuteNavigationParams;
|
||||
import net.osmand.aidl2.navigation.UnmuteNavigationParams;
|
||||
|
||||
import net.osmand.aidl2.IOsmAndAidlCallback;
|
||||
|
||||
import net.osmand.aidl2.search.SearchResult;
|
||||
import net.osmand.aidl2.search.SearchParams;
|
||||
import net.osmand.aidl2.navigation.NavigateSearchParams;
|
||||
|
||||
import net.osmand.aidl2.customization.SetWidgetsParams;
|
||||
import net.osmand.aidl2.customization.OsmandSettingsParams;
|
||||
import net.osmand.aidl2.customization.OsmandSettingsInfoParams;
|
||||
import net.osmand.aidl2.customization.CustomizationInfoParams;
|
||||
|
||||
import net.osmand.aidl2.gpx.AGpxFile;
|
||||
import net.osmand.aidl2.gpx.AGpxFileDetails;
|
||||
import net.osmand.aidl2.gpx.CreateGpxBitmapParams;
|
||||
import net.osmand.aidl2.gpx.GpxColorParams;
|
||||
|
||||
import net.osmand.aidl2.tiles.ASqliteDbFile;
|
||||
|
||||
import net.osmand.aidl2.plugins.PluginParams;
|
||||
import net.osmand.aidl2.copyfile.CopyFileParams;
|
||||
|
||||
import net.osmand.aidl2.navigation.ANavigationUpdateParams;
|
||||
import net.osmand.aidl2.navigation.ANavigationVoiceRouterMessageParams;
|
||||
|
||||
import net.osmand.aidl2.contextmenu.ContextMenuButtonsParams;
|
||||
import net.osmand.aidl2.contextmenu.UpdateContextMenuButtonsParams;
|
||||
import net.osmand.aidl2.contextmenu.RemoveContextMenuButtonsParams;
|
||||
|
||||
import net.osmand.aidl2.mapmarker.RemoveMapMarkersParams;
|
||||
|
||||
// NOTE: Add new methods at the end of file!!!
|
||||
|
||||
interface IOsmAndAidlInterface {
|
||||
|
||||
/**
|
||||
* Add map marker at given location.
|
||||
*
|
||||
* @param lat (double) - latitude.
|
||||
* @param lon (double) - longitude.
|
||||
* @param name (String)- name of marker.
|
||||
*/
|
||||
boolean addMapMarker(in AddMapMarkerParams params);
|
||||
|
||||
/**
|
||||
* Remove map marker.
|
||||
*
|
||||
* If ignoreCoordinates is false the marker is only removed if lat/lon match the currently set values of the marker.
|
||||
* If ignoreCoordinates is true the marker is removed if the name matches, the values of lat/lon are ignored.
|
||||
*
|
||||
* @param lat (double) - latitude.
|
||||
* @param lon (double) - longitude.
|
||||
* @param name (String)- name of marker.
|
||||
* @param ignoreCoordinates (boolean) - flag to determine whether lat/lon shall be ignored
|
||||
*/
|
||||
boolean removeMapMarker(in RemoveMapMarkerParams params);
|
||||
|
||||
/**
|
||||
* Update map marker.
|
||||
*
|
||||
* If ignoreCoordinates is false the marker gets updated only if latPrev/lonPrev match the currently set values of the marker.
|
||||
* If ignoreCoordinates is true the marker gets updated if the name matches, the values of latPrev/lonPrev are ignored.
|
||||
*
|
||||
* @param latPrev (double) - latitude (current marker).
|
||||
* @param lonPrev (double) - longitude (current marker).
|
||||
* @param namePrev (String) - name (current marker).
|
||||
* @param latNew (double) - latitude (new marker).
|
||||
* @param lonNew (double) - longitude (new marker).
|
||||
* @param nameNew (String) - name (new marker).
|
||||
* @param ignoreCoordinates (boolean) - flag to determine whether latPrev/lonPrev shall be ignored
|
||||
*/
|
||||
boolean updateMapMarker(in UpdateMapMarkerParams params);
|
||||
|
||||
/**
|
||||
* Add map widget to the right side of the main screen.
|
||||
* Note: any specified icon should exist in OsmAnd app resources.
|
||||
*
|
||||
* @param id (String) - widget id.
|
||||
* @param menuIconName (String) - icon name (configure map menu).
|
||||
* @param menuTitle (String) - widget name (configure map menu).
|
||||
* @param lightIconName (String) - icon name for the light theme (widget).
|
||||
* @param darkIconName (String) - icon name for the dark theme (widget).
|
||||
* @param text (String) - main widget text.
|
||||
* @param description (String) - sub text, like "km/h".
|
||||
* @param order (int) - order position in the widgets list.
|
||||
* @param intentOnClick (String) - onClick intent. Called after click on widget as startActivity(Intent intent).
|
||||
*/
|
||||
boolean addMapWidget(in AddMapWidgetParams params);
|
||||
|
||||
/**
|
||||
* Remove map widget.
|
||||
*
|
||||
* @param (String) id - widget id.
|
||||
*/
|
||||
boolean removeMapWidget(in RemoveMapWidgetParams params);
|
||||
|
||||
/**
|
||||
* Update map widget.
|
||||
* Note: any specified icon should exist in OsmAnd app resources.
|
||||
*
|
||||
* @param id (String) - widget id.
|
||||
* @param menuIconName (String) - icon name (configure map menu).
|
||||
* @param menuTitle (String) - widget name (configure map menu).
|
||||
* @param lightIconName (String) - icon name for the light theme (widget).
|
||||
* @param darkIconName (String) - icon name for the dark theme (widget).
|
||||
* @param text (String) - main widget text.
|
||||
* @param description (String) - sub text, like "km/h".
|
||||
* @param order (int) - order position in the widgets list.
|
||||
* @param intentOnClick (String) - onClick intent. Called after click on widget as startActivity(Intent intent).
|
||||
*/
|
||||
boolean updateMapWidget(in UpdateMapWidgetParams params);
|
||||
|
||||
/**
|
||||
* Add point to user layer.
|
||||
*
|
||||
* @param layerId (String) - layer id. Note: layer should be added first.
|
||||
* @param pointId (String) - point id.
|
||||
* @param shortName (String) - short name (single char). Displayed on the map.
|
||||
* @param fullName (String) - full name. Displayed in the context menu on first row.
|
||||
* @param typeName (String) - type name. Displayed in context menu on second row.
|
||||
* @param color (int) - color of circle's background.
|
||||
* @param location (ALatLon) - location of the point.
|
||||
* @param details (List<String>)- list of details. Displayed under context menu.
|
||||
* @param params (Map<String, String>) - optional map of params for point.
|
||||
*/
|
||||
boolean addMapPoint(in AddMapPointParams params);
|
||||
|
||||
|
||||
/**
|
||||
* Remove point.
|
||||
*
|
||||
* @param layerId (String) - layer id.
|
||||
* @param pointId (String) - point id.
|
||||
*/
|
||||
boolean removeMapPoint(in RemoveMapPointParams params);
|
||||
|
||||
/**
|
||||
* Update point.
|
||||
*
|
||||
* @param layerId (String) - layer id.
|
||||
* @param pointId (String) - point id.
|
||||
* @param updateOpenedMenuAndMap (boolean) - flag to enable folowing mode and menu updates for point
|
||||
* @param shortName (String) - short name (single char). Displayed on the map.
|
||||
* @param fullName (String) - full name. Displayed in the context menu on first row.
|
||||
* @param typeName (String) - type name. Displayed in context menu on second row.
|
||||
* @param color (String) - color of circle's background.
|
||||
* @param location (ALatLon)- location of the point.
|
||||
* @param details (List<String>) - list of details. Displayed under context menu.
|
||||
* @param params (Map<String, String>) - optional map of params for point.
|
||||
*/
|
||||
boolean updateMapPoint(in UpdateMapPointParams params);
|
||||
|
||||
/**
|
||||
* Add user layer on the map.
|
||||
*
|
||||
* @param id (String) - layer id.
|
||||
* @param name (String) - layer name.
|
||||
* @param zOrder (float) - z-order position of layer. Default value is 5.5f
|
||||
* @param points Map<Sting, AMapPoint> - initial list of points. Nullable.
|
||||
* @param imagePoints (boolean) - use new style for points on map or not. Also default zoom bounds for new style can be edited.
|
||||
*/
|
||||
boolean addMapLayer(in AddMapLayerParams params);
|
||||
|
||||
/**
|
||||
* Remove user layer.
|
||||
*
|
||||
* @param id (String) - layer id.
|
||||
*/
|
||||
boolean removeMapLayer(in RemoveMapLayerParams params);
|
||||
|
||||
/**
|
||||
* Update user layer.
|
||||
*
|
||||
* @param id (String) - layer id.
|
||||
* @param name (String) - layer name.
|
||||
* @param zOrder (float) - z-order position of layer. Default value is 5.5f
|
||||
* @param points Map<Sting, AMapPoint> - list of points. Nullable.
|
||||
* @param imagePoints (boolean) - use new style for points on map or not. Also default zoom bounds for new style can be edited.
|
||||
*/
|
||||
boolean updateMapLayer(in UpdateMapLayerParams params);
|
||||
|
||||
/**
|
||||
* Import GPX file to OsmAnd (from URI or file).
|
||||
*
|
||||
* @param gpxUri (Uri) - URI created by FileProvider (preferable method).
|
||||
* @param file (File) - File which represents GPX track (not recomended, OsmAnd should have rights to access file location).
|
||||
* @param fileName (String) - Destination file name. May contain dirs.
|
||||
* @param color (String) - color of gpx. Can be one of: "red", "orange", "lightblue", "blue", "purple",
|
||||
* "translucent_red", "translucent_orange", "translucent_lightblue",
|
||||
* "translucent_blue", "translucent_purple"
|
||||
* @param show (boolean) - show track on the map after import
|
||||
*/
|
||||
boolean importGpx(in ImportGpxParams params);
|
||||
|
||||
/**
|
||||
* Show GPX file on map.
|
||||
*
|
||||
* @param fileName (String) - file name to show. Must be imported first.
|
||||
*/
|
||||
boolean showGpx(in ShowGpxParams params);
|
||||
|
||||
/**
|
||||
* Hide GPX file.
|
||||
*
|
||||
* @param fileName (String) - file name to hide.
|
||||
*/
|
||||
boolean hideGpx(in HideGpxParams params);
|
||||
|
||||
/**
|
||||
* Get list of active GPX files.
|
||||
*
|
||||
* @return list of active gpx files.
|
||||
*/
|
||||
boolean getActiveGpx(out List<ASelectedGpxFile> files);
|
||||
|
||||
/**
|
||||
* Set map view to current location.
|
||||
*
|
||||
* @param latitude (double) - latitude of new map center.
|
||||
* @param longitude (double) - longitude of new map center.
|
||||
* @param zoom (float) - map zoom level. Set 0 to keep zoom unchanged.
|
||||
* @param animated (boolean) - set true to animate changes.
|
||||
*/
|
||||
boolean setMapLocation(in SetMapLocationParams params);
|
||||
|
||||
|
||||
boolean calculateRoute(in CalculateRouteParams params);
|
||||
|
||||
/**
|
||||
* Refresh the map (UI)
|
||||
*/
|
||||
boolean refreshMap();
|
||||
|
||||
/**
|
||||
* Add favorite group with given params.
|
||||
*
|
||||
* @param name (String) - group name.
|
||||
* @param color (String) - group color. Can be one of: "red", "orange", "yellow",
|
||||
* "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown".
|
||||
* @param visible (boolean) - group visibility.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param namePrev (String) - group name (current).
|
||||
* @param colorPrev (String) - group color (current).
|
||||
* @param visiblePrev (boolean) - group visibility (current).
|
||||
* @param nameNew (String) - group name (new).
|
||||
* @param colorNew (String) - group color (new).
|
||||
* @param visibleNew (boolean) - group visibility (new).
|
||||
*/
|
||||
boolean updateFavoriteGroup(in UpdateFavoriteGroupParams params);
|
||||
|
||||
/**
|
||||
* Add favorite at given location with given params.
|
||||
*
|
||||
* @param lat (double) - latitude.
|
||||
* @param lon (double) - longitude.
|
||||
* @param name (String) - name of favorite item.
|
||||
* @param description (String) - description of favorite item.
|
||||
* @param category (String) - category of favorite item.
|
||||
* @param color (String) - color of favorite item. Can be one of: "red", "orange", "yellow",
|
||||
* "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown".
|
||||
* @param visible (boolean) - should favorite item be visible after creation.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param latPrev (double) - latitude (current favorite).
|
||||
* @param lonPrev (double) - longitude (current favorite).
|
||||
* @param namePrev (String) - name of favorite item (current favorite).
|
||||
* @param categoryPrev (String) - category of favorite item (current favorite).
|
||||
* @param latNew (double) - latitude (new favorite).
|
||||
* @param lonNew (double) - longitude (new favorite).
|
||||
* @param nameNew (String) - name of favorite item (new favorite).
|
||||
* @param descriptionNew (String) - description of favorite item (new favorite).
|
||||
* @param categoryNew (String) - category of favorite item (new favorite). Use only to create a new category,
|
||||
* not to update an existing one. If you want to update an existing category,
|
||||
* use the {@link #updateFavoriteGroup(String, String, boolean, String, String, boolean)} method.
|
||||
* @param colorNew (String) - color of new category. Can be one of: "red", "orange", "yellow",
|
||||
* "lightgreen", "green", "lightblue", "blue", "purple", "pink", "brown".
|
||||
* @param visibleNew (boolean) - should new category be visible after creation.
|
||||
*/
|
||||
boolean updateFavorite(in UpdateFavoriteParams params);
|
||||
|
||||
/**
|
||||
* Start gpx recording.
|
||||
*/
|
||||
boolean startGpxRecording(in StartGpxRecordingParams params);
|
||||
|
||||
/**
|
||||
* Stop gpx recording.
|
||||
*/
|
||||
boolean stopGpxRecording(in StopGpxRecordingParams params);
|
||||
|
||||
/**
|
||||
* Take photo note.
|
||||
*
|
||||
* @param lat (double) - latutude of photo note.
|
||||
* @param lon (double) - longitude of photo note.
|
||||
*/
|
||||
boolean takePhotoNote(in TakePhotoNoteParams params);
|
||||
|
||||
/**
|
||||
* Start video note recording.
|
||||
*
|
||||
* @param lat (double) - latutude of video note point.
|
||||
* @param lon (double) - longitude of video note point.
|
||||
*/
|
||||
boolean startVideoRecording(in StartVideoRecordingParams params);
|
||||
|
||||
/**
|
||||
* Start audio note recording.
|
||||
*
|
||||
* @param lat (double) - latutude of audio note point.
|
||||
* @param lon (double) - longitude of audio note point.
|
||||
*/
|
||||
boolean startAudioRecording(in StartAudioRecordingParams params);
|
||||
|
||||
/**
|
||||
* Stop Audio/Video recording.
|
||||
*/
|
||||
boolean stopRecording(in StopRecordingParams params);
|
||||
|
||||
/**
|
||||
* Start navigation.
|
||||
*
|
||||
* @param startName (String) - name of the start point as it displays in OsmAnd's UI. Nullable.
|
||||
* @param startLat (double) - latitude of the start point. If 0 - current location is used.
|
||||
* @param startLon (double) - longitude of the start point. If 0 - current location is used.
|
||||
* @param destName (String) - name of the start point as it displays in OsmAnd's UI.
|
||||
* @param destLat (double) - latitude of a destination point.
|
||||
* @param destLon (double) - longitude of a destination point.
|
||||
* @param profile (String) - One of: "default", "car", "bicycle", "pedestrian", "aircraft", "boat", "hiking", "motorcycle", "truck". Nullable (default).
|
||||
* @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask.
|
||||
*/
|
||||
boolean navigate(in NavigateParams params);
|
||||
|
||||
/**
|
||||
* Start navigation using gpx file. User need to grant Uri permission to OsmAnd.
|
||||
*
|
||||
* @param gpxUri (Uri) - URI created by FileProvider.
|
||||
* @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask.
|
||||
*/
|
||||
boolean navigateGpx(in NavigateGpxParams params);
|
||||
|
||||
/**
|
||||
* Remove GPX file.
|
||||
*
|
||||
* @param fileName (String) - file name to remove;
|
||||
*/
|
||||
boolean removeGpx(in RemoveGpxParams params);
|
||||
|
||||
|
||||
/**
|
||||
* Show AMapPoint on map in OsmAnd.
|
||||
*
|
||||
* @param layerId (String) - layer id. Note: layer should be added first.
|
||||
* @param pointId (String) - point id.
|
||||
* @param shortName (String) - short name (single char). Displayed on the map.
|
||||
* @param fullName (String) - full name. Displayed in the context menu on first row.
|
||||
* @param typeName (String) - type name. Displayed in context menu on second row.
|
||||
* @param color (int) - color of circle's background.
|
||||
* @param location (ALatLon) - location of the point.
|
||||
* @param details List<String> - list of details. Displayed under context menu.
|
||||
* @param params Map<String, String> - optional map of params for point.
|
||||
*/
|
||||
boolean showMapPoint(in ShowMapPointParams params);
|
||||
|
||||
/**
|
||||
* Method for adding up to 3 items to the OsmAnd navigation drawer.
|
||||
*
|
||||
* @param appPackage - current application package.
|
||||
* @param names - list of names for items.
|
||||
* @param uris - list of uris for intents.
|
||||
* @param iconNames - list of icon names for items.
|
||||
* @param flags - list of flags for intents. Use -1 if no flags needed.
|
||||
*/
|
||||
boolean setNavDrawerItems(in SetNavDrawerItemsParams params);
|
||||
|
||||
/**
|
||||
* Put navigation on pause.
|
||||
*/
|
||||
boolean pauseNavigation(in PauseNavigationParams params);
|
||||
|
||||
/**
|
||||
* Resume navigation if it was paused before.
|
||||
*/
|
||||
boolean resumeNavigation(in ResumeNavigationParams params);
|
||||
|
||||
/**
|
||||
* Stop navigation. Removes target / intermediate points and route path from the map.
|
||||
*/
|
||||
boolean stopNavigation(in StopNavigationParams params);
|
||||
|
||||
|
||||
/**
|
||||
* Mute voice guidance. Stays muted until unmute manually or via the api.
|
||||
*/
|
||||
boolean muteNavigation(in MuteNavigationParams params);
|
||||
|
||||
/**
|
||||
* Unmute voice guidance.
|
||||
*/
|
||||
boolean unmuteNavigation(in UnmuteNavigationParams params);
|
||||
|
||||
/**
|
||||
* Run search for POI / Address.
|
||||
*
|
||||
* @param searchQuery (String) - search query string.
|
||||
* @param searchType (int) - type of search. Values:
|
||||
* SearchParams.SEARCH_TYPE_ALL - all kind of search
|
||||
* SearchParams.SEARCH_TYPE_POI - POIs only
|
||||
* SearchParams.SEARCH_TYPE_ADDRESS - addresses only
|
||||
*
|
||||
* @param latitude (double) - latitude of original search location.
|
||||
* @param longitude (double) - longitude of original search location.
|
||||
* @param radiusLevel (int) - value from 1 to 7. Default value = 1.
|
||||
* @param totalLimit (int) - limit of returned search result rows. Default value = -1 (unlimited).
|
||||
*/
|
||||
boolean search(in SearchParams params, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Do search and start navigation.
|
||||
*
|
||||
* @param startName (String) - name of the start point as it displays in OsmAnd's UI. Nullable.
|
||||
* @param startLat (double) - latitude of the start point. If 0 - current location is used.
|
||||
* @param startLon (double) - longitude of the start point. If 0 - current location is used.
|
||||
* @param searchQuery (String) - Text of a query for searching a destination point. Sent as URI parameter.
|
||||
* @param searchLat (double) - original location of search (latitude). Sent as URI parameter.
|
||||
* @param searchLon (double) - original location of search (longitude). Sent as URI parameter.
|
||||
* @param profile (String) - one of: "default", "car", "bicycle", "pedestrian", "aircraft", "boat", "hiking", "motorcycle", "truck". Nullable (default).
|
||||
* @param force (boolean) - ask to stop current navigation if any. False - ask. True - don't ask.
|
||||
*/
|
||||
boolean navigateSearch(in NavigateSearchParams params);
|
||||
|
||||
/**
|
||||
* Method to register for periodical callbacks from OsmAnd
|
||||
*
|
||||
* @param updateTimeMS (long)- period of time in millisecond after which callback is triggered
|
||||
* @param callback (IOsmAndCallback)- create and provide instance of {@link IOsmAndAidlCallback} interface
|
||||
* @return id (long) - id of callback in OsmAnd. Needed to unsubscribe from updates.
|
||||
*/
|
||||
long registerForUpdates(in long updateTimeMS, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Method to unregister from periodical callbacks from OsmAnd
|
||||
*
|
||||
* @param callbackId (long)- id of registered callback (provided by OsmAnd
|
||||
* in {@link OsmAndAidlHelper#registerForUpdates(long, IOsmAndAidlCallback)})
|
||||
*/
|
||||
boolean unregisterFromUpdates(in long callbackId);
|
||||
|
||||
/**
|
||||
* Method for adding image to the top of Osmand's NavDrawer.
|
||||
*
|
||||
* @param imageUri (String)- image's URI.toString
|
||||
*
|
||||
* @deprecated
|
||||
* Use the {@link #setNavDrawerLogoWithParams(NavDrawerHeaderParams params)} method.
|
||||
*/
|
||||
boolean setNavDrawerLogo(in String imageUri);
|
||||
|
||||
/**
|
||||
* Method for selected UI elements (like QuickSearch button) to show.
|
||||
*
|
||||
* @param ids (List<String>)- list of menu items keys from {@link OsmAndCustomizationConstants}
|
||||
*/
|
||||
boolean setEnabledIds(in List<String> ids);
|
||||
|
||||
/**
|
||||
* Method for selected UI elements (like QuickSearch button) to hide.
|
||||
*
|
||||
* @param ids (List<String>)- list of menu items keys from {@link OsmAndCustomizationConstants}
|
||||
*/
|
||||
boolean setDisabledIds(in List<String> ids);
|
||||
|
||||
/**
|
||||
* Method to show selected NavDrawer's menu items.
|
||||
*
|
||||
* @param patterns (List<String>) - list of menu items names from {@link OsmAndCustomizationConstants}
|
||||
*/
|
||||
boolean setEnabledPatterns(in List<String> patterns);
|
||||
|
||||
/**
|
||||
* Method to hide selected NavDrawer's menu items.
|
||||
*
|
||||
* @param patterns (List<String>)- list of menu items names from {@link OsmAndCustomizationConstants}
|
||||
*/
|
||||
boolean setDisabledPatterns(in List<String> patterns);
|
||||
|
||||
/**
|
||||
* Register OsmAnd widgets for visibility.
|
||||
*
|
||||
* @param widgetKey ()- widget id.
|
||||
* @param appModKeys - list of OsmAnd Application modes widget active with. Could be "null" for all modes.
|
||||
*/
|
||||
boolean regWidgetVisibility(in SetWidgetsParams params);
|
||||
|
||||
/**
|
||||
* Register OsmAnd widgets for availability.
|
||||
*
|
||||
* @param widgetKey (String) - widget id.
|
||||
* @param appModKeys (List<String>)- ist of OsmAnd Application modes widget active with. Could be "null" for all modes.
|
||||
*/
|
||||
boolean regWidgetAvailability(in SetWidgetsParams params);
|
||||
|
||||
/**
|
||||
* Add custom parameters for OsmAnd settings to associate with client app.
|
||||
*
|
||||
* @param sharedPreferencesName (String)- string with name of clint's app for shared preferences key
|
||||
* @param bundle (Bundle)- bundle with keys from Settings IDs {@link OsmAndCustomizationConstants} and Settings params
|
||||
*/
|
||||
boolean customizeOsmandSettings(in OsmandSettingsParams params);
|
||||
|
||||
/**
|
||||
* Method to get list of gpx files currently registered (imported or created) in OsmAnd;
|
||||
*
|
||||
* @return list of gpx files
|
||||
*/
|
||||
boolean getImportedGpx(out List<AGpxFile> files);
|
||||
|
||||
/**
|
||||
* Method to get list of sqlitedb files registered in OsmAnd;
|
||||
*
|
||||
* @return list of sqlitedb files
|
||||
*/
|
||||
boolean getSqliteDbFiles(out List<ASqliteDbFile> files);
|
||||
|
||||
/**
|
||||
* Method to get list of currently active sqlitedb files
|
||||
*
|
||||
* @return list of sqlitedb files
|
||||
*/
|
||||
boolean getActiveSqliteDbFiles(out List<ASqliteDbFile> files);
|
||||
|
||||
/**
|
||||
* Method to show selected sqlitedb file as map overlay.
|
||||
*
|
||||
* @param fileName (String) - name of sqlitedb file
|
||||
*/
|
||||
boolean showSqliteDbFile(String fileName);
|
||||
|
||||
/**
|
||||
* Method to hide sqlitedb file from map overlay.
|
||||
*
|
||||
* @param fileName (String) - name of sqlitedb file
|
||||
*/
|
||||
boolean hideSqliteDbFile(String fileName);
|
||||
|
||||
/**
|
||||
* Method for adding image to the top of OsmAnd's NavDrawer with additional params
|
||||
*
|
||||
* @param imageUri (String) - image's URI.toString
|
||||
* @param packageName (String) - client's app package name
|
||||
* @param intent (String) - intent for additional functionality on image click
|
||||
*
|
||||
*/
|
||||
boolean setNavDrawerLogoWithParams(in NavDrawerHeaderParams params);
|
||||
|
||||
/**
|
||||
* Method for adding functionality to "Powered by Osmand" logo in NavDrawer's footer
|
||||
* (reset OsmAnd settings to pre-clinet app's state)
|
||||
*
|
||||
* @param packageName (String) - package name
|
||||
* @param intent (String) - intent
|
||||
* @param appName (String) - client's app name
|
||||
*/
|
||||
boolean setNavDrawerFooterWithParams(in NavDrawerFooterParams params);
|
||||
|
||||
/**
|
||||
* Restore default (pre-client) OsmAnd settings and state:
|
||||
* clears features, widgets and settings customization, NavDraw logo.
|
||||
*/
|
||||
boolean restoreOsmand();
|
||||
|
||||
/**
|
||||
* Method to change state of plug-ins in OsmAnd.
|
||||
*
|
||||
* @param pluginId (String) - id (name) of plugin.
|
||||
* @param newState (int) - new state (0 - off, 1 - on).
|
||||
*/
|
||||
boolean changePluginState(in PluginParams params);
|
||||
|
||||
/**
|
||||
* Method to register for callback on OsmAnd initialization
|
||||
* @param callback (IOsmAndAidlCallback) - create and provide instance of {@link IOsmAndAidlCallback} interface
|
||||
*/
|
||||
boolean registerForOsmandInitListener(in IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Requests bitmap snap-shot of map with GPX file from provided URI in its center.
|
||||
* You can set bitmap size, density and GPX lines color, but you need
|
||||
* to manually download appropriate map in OsmAnd or background will be empty.
|
||||
* Bitmap will be returned through callback {@link IOsmAndAidlCallback#onGpxBitmapCreated(AGpxBitmap)}
|
||||
*
|
||||
* @param gpxUri (Uri/File) - Uri for gpx file
|
||||
* @param density (float) - image density. Recommended to use default metrics for device's display.
|
||||
* @param widthPixels (int) - width of bitmap
|
||||
* @param heightPixels (int) - height of bitmap
|
||||
* @param color (int) - color in ARGB format
|
||||
* @param callback (IOsmAndAidlCallback) - instance of callback from OsmAnd.
|
||||
*/
|
||||
boolean getBitmapForGpx(in CreateGpxBitmapParams file, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Method to copy files to OsmAnd part by part. For now supports only sqlitedb format.
|
||||
* Part size (bytearray) should not exceed 256k.
|
||||
*
|
||||
* @param fileName (String) - name of file
|
||||
* @param filePartData (byte[]) - parts of file, byte[] with size 256k or less.
|
||||
* @param startTime (long) - timestamp of copying start.
|
||||
* @param isDone (boolean) - boolean to mark end of copying.
|
||||
* @return number of last successfully received file part or error(-1).
|
||||
*/
|
||||
int copyFile(in CopyFileParams filePart);
|
||||
|
||||
/**
|
||||
* Method to register for updates during navgation. Notifies user about distance to the next turn and its type.
|
||||
*
|
||||
* @param subscribeToUpdates (boolean) - subscribe or unsubscribe from updates
|
||||
* @param callbackId (long) - id of callback, needed to unsubscribe from updates
|
||||
* @param callback (IOsmAndAidlCallback) - callback to notify user on navigation data change
|
||||
*/
|
||||
long registerForNavigationUpdates(in ANavigationUpdateParams params, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Method to add Context Menu buttons to OsmAnd Context menu.
|
||||
*
|
||||
* {@link ContextMenuButtonsParams } is a wrapper class for params:
|
||||
*
|
||||
* @param leftButton (AContextMenuButton) - parameters for left context button:
|
||||
* @param buttonId (String at AContextMenuButton) - id of button in View
|
||||
* @param leftTextCaption (String at AContextMenuButton) - left-side button text
|
||||
* @param rightTextCaption (String at AContextMenuButton) - right-side button text
|
||||
* @param String leftIconName (String at AContextMenuButton) - name of left-side icon
|
||||
* @param String rightIconName (String at AContextMenuButton) - name of right-side icon
|
||||
* @param boolean needColorizeIcon (booleanat AContextMenuButton) - flag to apply color to icon
|
||||
* @param boolean enabled (boolean at AContextMenuButton) - enable button flag
|
||||
*
|
||||
* @param rightButton (AContextMenuButton) - parameters for right context button, see <i>leftButton</i> param for details.
|
||||
* @param id (String) - button id;
|
||||
* @param appPackage (String) - clinet's app package name
|
||||
* @param layerId (String) - id of Osmand's map layer
|
||||
* @param callbackId (long) - {@link IOsmAndAidlCallback} id
|
||||
* @param pointsIds (List<String>) - list of point Ids to which this rules applies to.
|
||||
*
|
||||
* @param callback (IOsmAndAidlCallback) - AIDL callback;
|
||||
*
|
||||
* @return long - callback's Id;
|
||||
*/
|
||||
long addContextMenuButtons(in ContextMenuButtonsParams params, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Method to remove Context Menu buttons from OsmAnd Context menu.
|
||||
*
|
||||
* {@link RemoveContextMenuButtonsParams} is a wrapper class for params:
|
||||
*
|
||||
* @param paramsId (String) - id of {@link ContextMenuButtonsParams} of button you want to remove;
|
||||
* @param callbackId (long) - id of {@ling IOsmAndAidlCallback} of button you want to remove;
|
||||
*
|
||||
*/
|
||||
boolean removeContextMenuButtons(in RemoveContextMenuButtonsParams params);
|
||||
|
||||
/**
|
||||
* Method to update params on already set custom Context Button.
|
||||
*
|
||||
* {@link UpdateContextMenuButtonsParams } is a wrapper class for params:
|
||||
*
|
||||
* @param leftButton (AContextMenuButton) - parameters for left context button:
|
||||
* @param buttonId (String at AContextMenuButton) - id of button in View
|
||||
* @param leftTextCaption (String at AContextMenuButton) - left-side button text
|
||||
* @param rightTextCaption (String at AContextMenuButton) - right-side button text
|
||||
* @param String leftIconName (String at AContextMenuButton) - name of left-side icon
|
||||
* @param String rightIconName (String at AContextMenuButton) - name of right-side icon
|
||||
* @param boolean needColorizeIcon (booleanat AContextMenuButton) - flag to apply color to icon
|
||||
* @param boolean enabled (boolean at AContextMenuButton) - enable button flag
|
||||
*
|
||||
* @param rightButton (AContextMenuButton) - parameters for right context button, see <i>leftButton</i> param for details.
|
||||
* @param id (String) - button id;
|
||||
* @param appPackage (String) - clinet's app package name
|
||||
* @param layerId (String) - id of Osmand's map layer
|
||||
* @param callbackId (long) - {@link IOsmAndAidlCallback} id
|
||||
* @param pointsIds (List<String>) - list of point Ids to which this rules applies to.
|
||||
*
|
||||
*/
|
||||
boolean updateContextMenuButtons(in UpdateContextMenuButtonsParams params);
|
||||
|
||||
/**
|
||||
* Method to check if there is a customized setting in OsmAnd Settings.
|
||||
*
|
||||
* {@link OsmandSettingsInfoParams} is a wrapper class for params:
|
||||
*
|
||||
* @param sharedPreferencesName (String at OsmandSettingInfoParams) - key of setting in OsmAnd's preferences.
|
||||
*
|
||||
* @return boolean - true if setting is already set in SharedPreferences
|
||||
*
|
||||
*/
|
||||
boolean areOsmandSettingsCustomized(in OsmandSettingsInfoParams params);
|
||||
|
||||
/**
|
||||
* Method to customize parameters of OsmAnd.
|
||||
*
|
||||
* @param params (CustomizationInfoParams) - wrapper class for custom settings and ui.
|
||||
*
|
||||
* @param settingsParams (OsmandSettingsParams) - wrapper class for OsmAnd shared preferences params.
|
||||
* See {@link #customizeOsmandSettings(in OsmandSettingsParams params) customizeOsmandSettings}
|
||||
* method description for details.
|
||||
* @param navDrawerHeaderParams (NavDrawerHeaderParams) - wrapper class for OsmAnd navdrawer header params.
|
||||
* See {@link #setNavDrawerLogoWithParams(in NavDrawerHeaderParams params) setNavDrawerLogoWithParams}
|
||||
* method description for details.
|
||||
* @param navDrawerFooterParams (NavDrawerFooterParams) - wrapper class for OsmAnd navdrawer footer params.
|
||||
* See {@link #setNavDrawerFooterWithParams(in NavDrawerFooterParams params) setNavDrawerFooterWithParams}
|
||||
* method description for details.
|
||||
* @param visibilityWidgetsParams (ArrayList<SetWidgetsParams>) - wrapper class for OsmAnd widgets visibility.
|
||||
* See {@link #regWidgetVisibility(in SetWidgetsParams params) regWidgetVisibility}
|
||||
* method description for details.
|
||||
* @param availabilityWidgetsParams (ArrayList<SetWidgetsParams>) - wrapper class for OsmAnd widgets availability.
|
||||
* See {@link #regWidgetAvailability(in SetWidgetsParams params) regWidgetAvailability}
|
||||
* method description for details.
|
||||
* @param pluginsParams (ArrayList<PluginParams>) - wrapper class for OsmAnd plugins states params.
|
||||
* See {@link #changePluginState(in PluginParams params) changePluginState}
|
||||
* method description for details.
|
||||
* @param featuresEnabledIds (List<String>) - list of UI elements (like QuickSearch button) to show.
|
||||
* See {@link #setEnabledIds(in List<String> ids) setEnabledIds}
|
||||
* @param featuresDisabledIds (List<String>) - list of UI elements (like QuickSearch button) to hide.
|
||||
* See {@link #setDisabledIds(in List<String> ids) setDisabledIds}
|
||||
* @param featuresEnabledPatterns (List<String>) - list of NavDrawer menu items to show.
|
||||
* See {@link #setEnabledPatterns(in List<String> patterns) setEnabledPatterns}
|
||||
* @param featuresDisabledPatterns (List<String>) - list of NavDrawer menu items to hide.
|
||||
* See {@link #setDisabledPatterns(in List<String> patterns) setDisabledPatterns}
|
||||
*
|
||||
*/
|
||||
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
|
||||
*/
|
||||
long registerForVoiceRouterMessages(in ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback);
|
||||
|
||||
/**
|
||||
* Removes all active map markers (marks them as passed and moves to history)
|
||||
* 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);
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.calculateroute;
|
||||
|
||||
parcelable CalculateRouteParams;
|
|
@ -0,0 +1,101 @@
|
|||
package net.osmand.aidl2.calculateroute;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.contextmenu;
|
||||
|
||||
parcelable AContextMenuButton;
|
|
@ -0,0 +1,95 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AContextMenuButton extends AidlParams {
|
||||
|
||||
private int buttonId;
|
||||
|
||||
private String leftTextCaption;
|
||||
private String rightTextCaption;
|
||||
private String leftIconName;
|
||||
private String rightIconName;
|
||||
|
||||
private boolean needColorizeIcon;
|
||||
private boolean enabled;
|
||||
|
||||
public AContextMenuButton(int buttonId, String leftTextCaption, String rightTextCaption, String leftIconName, String rightIconName, boolean needColorizeIcon, boolean enabled) {
|
||||
this.buttonId = buttonId;
|
||||
this.leftTextCaption = leftTextCaption;
|
||||
this.rightTextCaption = rightTextCaption;
|
||||
this.leftIconName = leftIconName;
|
||||
this.rightIconName = rightIconName;
|
||||
this.needColorizeIcon = needColorizeIcon;
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
protected AContextMenuButton(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<AContextMenuButton> CREATOR = new Creator<AContextMenuButton>() {
|
||||
@Override
|
||||
public AContextMenuButton createFromParcel(Parcel in) {
|
||||
return new AContextMenuButton(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AContextMenuButton[] newArray(int size) {
|
||||
return new AContextMenuButton[size];
|
||||
}
|
||||
};
|
||||
|
||||
public int getButtonId() {
|
||||
return buttonId;
|
||||
}
|
||||
|
||||
public String getLeftTextCaption() {
|
||||
return leftTextCaption;
|
||||
}
|
||||
|
||||
public String getRightTextCaption() {
|
||||
return rightTextCaption;
|
||||
}
|
||||
|
||||
public String getLeftIconName() {
|
||||
return leftIconName;
|
||||
}
|
||||
|
||||
public String getRightIconName() {
|
||||
return rightIconName;
|
||||
}
|
||||
|
||||
public boolean isTintIcon() {
|
||||
return needColorizeIcon;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@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
|
||||
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.aidl2.contextmenu;
|
||||
|
||||
parcelable ContextMenuButtonsParams;
|
|
@ -0,0 +1,106 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ContextMenuButtonsParams extends AidlParams {
|
||||
|
||||
private AContextMenuButton leftButton;
|
||||
private AContextMenuButton rightButton;
|
||||
|
||||
private String id;
|
||||
private String appPackage;
|
||||
private String layerId;
|
||||
|
||||
private long callbackId = -1L;
|
||||
|
||||
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;
|
||||
this.rightButton = rightButton;
|
||||
this.id = id;
|
||||
this.appPackage = appPackage;
|
||||
this.layerId = layerId;
|
||||
this.callbackId = callbackId;
|
||||
if (pointsIds != null) {
|
||||
this.pointsIds.addAll(pointsIds);
|
||||
}
|
||||
}
|
||||
|
||||
public ContextMenuButtonsParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<ContextMenuButtonsParams> CREATOR = new Creator<ContextMenuButtonsParams>() {
|
||||
@Override
|
||||
public ContextMenuButtonsParams createFromParcel(Parcel in) {
|
||||
return new ContextMenuButtonsParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContextMenuButtonsParams[] newArray(int size) {
|
||||
return new ContextMenuButtonsParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AContextMenuButton getLeftButton() {
|
||||
return leftButton;
|
||||
}
|
||||
|
||||
public AContextMenuButton getRightButton() {
|
||||
return rightButton;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getAppPackage() {
|
||||
return appPackage;
|
||||
}
|
||||
|
||||
public String getLayerId() {
|
||||
return layerId;
|
||||
}
|
||||
|
||||
public long getCallbackId() {
|
||||
return callbackId;
|
||||
}
|
||||
|
||||
public void setCallbackId(long callbackId) {
|
||||
this.callbackId = callbackId;
|
||||
}
|
||||
|
||||
public List<String> getPointsIds() {
|
||||
return pointsIds;
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
parcelable RemoveContextMenuButtonsParams;
|
|
@ -0,0 +1,53 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
parcelable UpdateContextMenuButtonsParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.contextmenu;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class UpdateContextMenuButtonsParams extends AidlParams {
|
||||
|
||||
private ContextMenuButtonsParams buttonsParams;
|
||||
|
||||
public UpdateContextMenuButtonsParams(ContextMenuButtonsParams widget) {
|
||||
this.buttonsParams = widget;
|
||||
}
|
||||
|
||||
public UpdateContextMenuButtonsParams(Parcel in) {
|
||||
super(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.aidl2.copyfile;
|
||||
|
||||
parcelable CopyFileParams;
|
80
osmand-api/src/net/osmand/aidl2/copyfile/CopyFileParams.java
Normal file
80
osmand-api/src/net/osmand/aidl2/copyfile/CopyFileParams.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package net.osmand.aidl2.copyfile;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class CopyFileParams extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
private byte[] filePartData;
|
||||
private long startTime;
|
||||
private boolean done;
|
||||
|
||||
public CopyFileParams(@NonNull String fileName, @NonNull byte[] filePartData, long startTime, boolean done) {
|
||||
this.fileName = fileName;
|
||||
this.filePartData = filePartData;
|
||||
this.startTime = startTime;
|
||||
this.done = done;
|
||||
}
|
||||
|
||||
protected CopyFileParams(Parcel in) {
|
||||
super(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;
|
||||
}
|
||||
|
||||
public byte[] getFilePartData() {
|
||||
return filePartData;
|
||||
}
|
||||
|
||||
public boolean isDone() {
|
||||
return done;
|
||||
}
|
||||
|
||||
public long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString("fileName", fileName);
|
||||
bundle.putByteArray("filePartData", filePartData);
|
||||
bundle.putLong("startTime", startTime);
|
||||
bundle.putBoolean("done", done);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
fileName = bundle.getString("fileName");
|
||||
filePartData = bundle.getByteArray("filePartData");
|
||||
startTime = bundle.getLong("startTime");
|
||||
done = bundle.getBoolean("done");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CopyFileParams {" +
|
||||
" fileName=" + fileName +
|
||||
", filePartData size=" + filePartData.length +
|
||||
", startTime=" + startTime +
|
||||
", done=" + done +
|
||||
" }";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
parcelable CustomizationInfoParams;
|
|
@ -0,0 +1,173 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
import net.osmand.aidl2.navdrawer.NavDrawerFooterParams;
|
||||
import net.osmand.aidl2.navdrawer.NavDrawerHeaderParams;
|
||||
import net.osmand.aidl2.navdrawer.SetNavDrawerItemsParams;
|
||||
import net.osmand.aidl2.plugins.PluginParams;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CustomizationInfoParams extends AidlParams {
|
||||
|
||||
private OsmandSettingsParams settingsParams;
|
||||
|
||||
private NavDrawerHeaderParams navDrawerHeaderParams;
|
||||
private NavDrawerFooterParams navDrawerFooterParams;
|
||||
private SetNavDrawerItemsParams navDrawerItemsParams;
|
||||
|
||||
private ArrayList<SetWidgetsParams> visibilityWidgetsParams = new ArrayList<>();
|
||||
private ArrayList<SetWidgetsParams> availabilityWidgetsParams = new ArrayList<>();
|
||||
|
||||
private ArrayList<PluginParams> pluginsParams = 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,
|
||||
NavDrawerFooterParams navDrawerFooterParams,
|
||||
SetNavDrawerItemsParams navDrawerItemsParams,
|
||||
ArrayList<SetWidgetsParams> visibilityWidgetsParams,
|
||||
ArrayList<SetWidgetsParams> availabilityWidgetsParams,
|
||||
ArrayList<PluginParams> pluginsParams,
|
||||
List<String> featuresEnabledIds,
|
||||
List<String> featuresDisabledIds,
|
||||
List<String> featuresEnabledPatterns,
|
||||
List<String> featuresDisabledPatterns) {
|
||||
this.settingsParams = settingsParams;
|
||||
this.navDrawerHeaderParams = navDrawerHeaderParams;
|
||||
this.navDrawerFooterParams = navDrawerFooterParams;
|
||||
this.navDrawerItemsParams = navDrawerItemsParams;
|
||||
|
||||
if (visibilityWidgetsParams != null) {
|
||||
this.visibilityWidgetsParams.addAll(visibilityWidgetsParams);
|
||||
}
|
||||
if (availabilityWidgetsParams != null) {
|
||||
this.availabilityWidgetsParams.addAll(availabilityWidgetsParams);
|
||||
}
|
||||
if (pluginsParams != null) {
|
||||
this.pluginsParams.addAll(pluginsParams);
|
||||
}
|
||||
if (featuresEnabledIds != null) {
|
||||
this.featuresEnabledIds.addAll(featuresEnabledIds);
|
||||
}
|
||||
if (featuresDisabledIds != null) {
|
||||
this.featuresDisabledIds.addAll(featuresDisabledIds);
|
||||
}
|
||||
if (featuresEnabledPatterns != null) {
|
||||
this.featuresEnabledPatterns.addAll(featuresEnabledPatterns);
|
||||
}
|
||||
if (featuresDisabledPatterns != null) {
|
||||
this.featuresDisabledPatterns.addAll(featuresDisabledPatterns);
|
||||
}
|
||||
}
|
||||
|
||||
public CustomizationInfoParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<CustomizationInfoParams> CREATOR = new Creator<CustomizationInfoParams>() {
|
||||
@Override
|
||||
public CustomizationInfoParams createFromParcel(Parcel in) {
|
||||
return new CustomizationInfoParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomizationInfoParams[] newArray(int size) {
|
||||
return new CustomizationInfoParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public OsmandSettingsParams getSettingsParams() {
|
||||
return settingsParams;
|
||||
}
|
||||
|
||||
public NavDrawerHeaderParams getNavDrawerHeaderParams() {
|
||||
return navDrawerHeaderParams;
|
||||
}
|
||||
|
||||
public NavDrawerFooterParams getNavDrawerFooterParams() {
|
||||
return navDrawerFooterParams;
|
||||
}
|
||||
|
||||
public SetNavDrawerItemsParams getNavDrawerItemsParams() {
|
||||
return navDrawerItemsParams;
|
||||
}
|
||||
|
||||
public ArrayList<SetWidgetsParams> getVisibilityWidgetsParams() {
|
||||
return visibilityWidgetsParams;
|
||||
}
|
||||
|
||||
public ArrayList<SetWidgetsParams> getAvailabilityWidgetsParams() {
|
||||
return availabilityWidgetsParams;
|
||||
}
|
||||
|
||||
public ArrayList<PluginParams> getPluginsParams() {
|
||||
return pluginsParams;
|
||||
}
|
||||
|
||||
public List<String> getFeaturesEnabledIds() {
|
||||
return featuresEnabledIds;
|
||||
}
|
||||
|
||||
public List<String> getFeaturesDisabledIds() {
|
||||
return featuresDisabledIds;
|
||||
}
|
||||
|
||||
public List<String> getFeaturesEnabledPatterns() {
|
||||
return featuresEnabledPatterns;
|
||||
}
|
||||
|
||||
public List<String> getFeaturesDisabledPatterns() {
|
||||
return featuresDisabledPatterns;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putParcelable("settingsParams", settingsParams);
|
||||
|
||||
bundle.putParcelable("navDrawerHeaderParams", navDrawerHeaderParams);
|
||||
bundle.putParcelable("navDrawerFooterParams", navDrawerFooterParams);
|
||||
bundle.putParcelable("navDrawerItemsParams", navDrawerItemsParams);
|
||||
|
||||
bundle.putParcelableArrayList("visibilityWidgetsParams", visibilityWidgetsParams);
|
||||
bundle.putParcelableArrayList("availabilityWidgetsParams", availabilityWidgetsParams);
|
||||
bundle.putParcelableArrayList("pluginsParams", pluginsParams);
|
||||
|
||||
bundle.putStringArrayList("featuresEnabledIds", featuresEnabledIds);
|
||||
bundle.putStringArrayList("featuresDisabledIds", featuresDisabledIds);
|
||||
bundle.putStringArrayList("featuresEnabledPatterns", featuresEnabledPatterns);
|
||||
bundle.putStringArrayList("featuresDisabledPatterns", featuresDisabledPatterns);
|
||||
}
|
||||
|
||||
@Override
|
||||
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.aidl2.customization;
|
||||
|
||||
parcelable OsmandSettingsInfoParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class OsmandSettingsInfoParams extends AidlParams {
|
||||
|
||||
private String sharedPreferencesName;
|
||||
|
||||
public OsmandSettingsInfoParams(@NonNull String sharedPreferencesName) {
|
||||
this.sharedPreferencesName = sharedPreferencesName;
|
||||
}
|
||||
|
||||
public OsmandSettingsInfoParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<OsmandSettingsInfoParams> CREATOR = new Creator<OsmandSettingsInfoParams>() {
|
||||
@Override
|
||||
public OsmandSettingsInfoParams createFromParcel(Parcel in) {
|
||||
return new OsmandSettingsInfoParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OsmandSettingsInfoParams[] newArray(int size) {
|
||||
return new OsmandSettingsInfoParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getSharedPreferencesName() {
|
||||
return sharedPreferencesName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString("sharedPreferencesName", sharedPreferencesName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
sharedPreferencesName = bundle.getString("sharedPreferencesName");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
parcelable OsmandSettingsParams;
|
|
@ -0,0 +1,55 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class OsmandSettingsParams extends AidlParams {
|
||||
|
||||
private String sharedPreferencesName;
|
||||
private Bundle bundleSettings;
|
||||
|
||||
public OsmandSettingsParams(@NonNull String sharedPreferencesName, @Nullable Bundle bundle) {
|
||||
this.sharedPreferencesName = sharedPreferencesName;
|
||||
this.bundleSettings = bundle;
|
||||
}
|
||||
|
||||
public OsmandSettingsParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<OsmandSettingsParams> CREATOR = new Creator<OsmandSettingsParams>() {
|
||||
@Override
|
||||
public OsmandSettingsParams createFromParcel(Parcel in) {
|
||||
return new OsmandSettingsParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OsmandSettingsParams[] newArray(int size) {
|
||||
return new OsmandSettingsParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getSharedPreferencesName() {
|
||||
return sharedPreferencesName;
|
||||
}
|
||||
|
||||
public Bundle getBundle() {
|
||||
return bundleSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString("sharedPreferencesName", sharedPreferencesName);
|
||||
bundle.putBundle("bundleSettings", bundleSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
sharedPreferencesName = bundle.getString("sharedPreferencesName");
|
||||
bundleSettings = bundle.getBundle("bundleSettings");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
parcelable SetWidgetsParams;
|
|
@ -0,0 +1,59 @@
|
|||
package net.osmand.aidl2.customization;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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");
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/favorite/AFavorite.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/favorite/AFavorite.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.favorite;
|
||||
|
||||
parcelable AFavorite;
|
94
osmand-api/src/net/osmand/aidl2/favorite/AFavorite.java
Normal file
94
osmand-api/src/net/osmand/aidl2/favorite/AFavorite.java
Normal file
|
@ -0,0 +1,94 @@
|
|||
package net.osmand.aidl2.favorite;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.favorite;
|
||||
|
||||
parcelable AddFavoriteParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.favorite;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AddFavoriteParams extends AidlParams {
|
||||
|
||||
private AFavorite favorite;
|
||||
|
||||
public AddFavoriteParams(AFavorite favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public AddFavoriteParams(Parcel in) {
|
||||
super(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.aidl2.favorite;
|
||||
|
||||
parcelable RemoveFavoriteParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.favorite;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class RemoveFavoriteParams extends AidlParams {
|
||||
|
||||
private AFavorite favorite;
|
||||
|
||||
public RemoveFavoriteParams(AFavorite favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public RemoveFavoriteParams(Parcel in) {
|
||||
super(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.aidl2.favorite;
|
||||
|
||||
parcelable UpdateFavoriteParams;
|
|
@ -0,0 +1,54 @@
|
|||
package net.osmand.aidl2.favorite;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.favorite.group;
|
||||
|
||||
parcelable AFavoriteGroup;
|
|
@ -0,0 +1,61 @@
|
|||
package net.osmand.aidl2.favorite.group;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.favorite.group;
|
||||
|
||||
parcelable AddFavoriteGroupParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.favorite.group;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AddFavoriteGroupParams extends AidlParams {
|
||||
|
||||
private AFavoriteGroup favoriteGroup;
|
||||
|
||||
public AddFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
|
||||
this.favoriteGroup = favoriteGroup;
|
||||
}
|
||||
|
||||
public AddFavoriteGroupParams(Parcel in) {
|
||||
super(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.aidl2.favorite.group;
|
||||
|
||||
parcelable RemoveFavoriteGroupParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.favorite.group;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class RemoveFavoriteGroupParams extends AidlParams {
|
||||
|
||||
private AFavoriteGroup favoriteGroup;
|
||||
|
||||
public RemoveFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
|
||||
this.favoriteGroup = favoriteGroup;
|
||||
}
|
||||
|
||||
public RemoveFavoriteGroupParams(Parcel in) {
|
||||
super(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.aidl2.favorite.group;
|
||||
|
||||
parcelable UpdateFavoriteGroupParams;
|
|
@ -0,0 +1,54 @@
|
|||
package net.osmand.aidl2.favorite.group;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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/aidl2/gpx/AGpxBitmap.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/AGpxBitmap.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable AGpxBitmap;
|
48
osmand-api/src/net/osmand/aidl2/gpx/AGpxBitmap.java
Normal file
48
osmand-api/src/net/osmand/aidl2/gpx/AGpxBitmap.java
Normal file
|
@ -0,0 +1,48 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AGpxBitmap extends AidlParams {
|
||||
|
||||
private Bitmap bitmap;
|
||||
|
||||
public AGpxBitmap(@NonNull Bitmap bitmap) {
|
||||
this.bitmap = bitmap;
|
||||
}
|
||||
|
||||
public AGpxBitmap(Parcel in) {
|
||||
super(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/aidl2/gpx/AGpxFile.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/AGpxFile.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable AGpxFile;
|
80
osmand-api/src/net/osmand/aidl2/gpx/AGpxFile.java
Normal file
80
osmand-api/src/net/osmand/aidl2/gpx/AGpxFile.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AGpxFile extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
private long modifiedTime;
|
||||
private long fileSize;
|
||||
private boolean active;
|
||||
private AGpxFileDetails details;
|
||||
|
||||
public AGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active, @Nullable AGpxFileDetails details) {
|
||||
this.fileName = fileName;
|
||||
this.modifiedTime = modifiedTime;
|
||||
this.fileSize = fileSize;
|
||||
this.active = active;
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public AGpxFile(Parcel in) {
|
||||
super(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 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);
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/gpx/AGpxFileDetails.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/AGpxFileDetails.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable AGpxFileDetails;
|
197
osmand-api/src/net/osmand/aidl2/gpx/AGpxFileDetails.java
Normal file
197
osmand-api/src/net/osmand/aidl2/gpx/AGpxFileDetails.java
Normal file
|
@ -0,0 +1,197 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.gpx;
|
||||
|
||||
parcelable ASelectedGpxFile;
|
76
osmand-api/src/net/osmand/aidl2/gpx/ASelectedGpxFile.java
Normal file
76
osmand-api/src/net/osmand/aidl2/gpx/ASelectedGpxFile.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable CreateGpxBitmapParams;
|
100
osmand-api/src/net/osmand/aidl2/gpx/CreateGpxBitmapParams.java
Normal file
100
osmand-api/src/net/osmand/aidl2/gpx/CreateGpxBitmapParams.java
Normal file
|
@ -0,0 +1,100 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CreateGpxBitmapParams extends AidlParams {
|
||||
|
||||
private File gpxFile;
|
||||
private Uri gpxUri;
|
||||
private float density;
|
||||
private int widthPixels;
|
||||
private int heightPixels;
|
||||
private int color; //ARGB color int
|
||||
|
||||
public CreateGpxBitmapParams(File gpxFile, float density, int widthPixels, int heightPixels, int color) {
|
||||
this.gpxFile = gpxFile;
|
||||
this.density = density;
|
||||
this.widthPixels = widthPixels;
|
||||
this.heightPixels = heightPixels;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public CreateGpxBitmapParams(Uri gpxUri, float density, int widthPixels, int heightPixels, int color) {
|
||||
this.gpxUri = gpxUri;
|
||||
this.density = density;
|
||||
this.widthPixels = widthPixels;
|
||||
this.heightPixels = heightPixels;
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public CreateGpxBitmapParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<CreateGpxBitmapParams> CREATOR = new Creator<CreateGpxBitmapParams>() {
|
||||
@Override
|
||||
public CreateGpxBitmapParams createFromParcel(Parcel in) {
|
||||
return new CreateGpxBitmapParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateGpxBitmapParams[] newArray(int size) {
|
||||
return new CreateGpxBitmapParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public File getGpxFile() {
|
||||
return gpxFile;
|
||||
}
|
||||
|
||||
public Uri getGpxUri() {
|
||||
return gpxUri;
|
||||
}
|
||||
|
||||
public int getWidthPixels() {
|
||||
return widthPixels;
|
||||
}
|
||||
|
||||
public int getHeightPixels() {
|
||||
return heightPixels;
|
||||
}
|
||||
|
||||
public float getDensity() {
|
||||
return density;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return 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);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
bundle.setClassLoader(Uri.class.getClassLoader());
|
||||
|
||||
String gpxAbsolutePath = bundle.getString("gpxAbsolutePath");
|
||||
if (gpxAbsolutePath != null) {
|
||||
gpxFile = new File(gpxAbsolutePath);
|
||||
}
|
||||
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/aidl2/gpx/GpxColorParams.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/GpxColorParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable GpxColorParams;
|
66
osmand-api/src/net/osmand/aidl2/gpx/GpxColorParams.java
Normal file
66
osmand-api/src/net/osmand/aidl2/gpx/GpxColorParams.java
Normal file
|
@ -0,0 +1,66 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class GpxColorParams extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
private String gpxColor;
|
||||
|
||||
public GpxColorParams() {
|
||||
|
||||
}
|
||||
|
||||
public GpxColorParams(@NonNull String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public GpxColorParams(@NonNull String fileName, String gpxColor) {
|
||||
this.fileName = fileName;
|
||||
this.gpxColor = gpxColor;
|
||||
}
|
||||
|
||||
public GpxColorParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<GpxColorParams> CREATOR = new Creator<GpxColorParams>() {
|
||||
@Override
|
||||
public GpxColorParams createFromParcel(Parcel in) {
|
||||
return new GpxColorParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GpxColorParams[] newArray(int size) {
|
||||
return new GpxColorParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public String getGpxColor() {
|
||||
return gpxColor;
|
||||
}
|
||||
|
||||
public void setGpxColor(String gpxColor) {
|
||||
this.gpxColor = gpxColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
fileName = bundle.getString("fileName");
|
||||
gpxColor = bundle.getString("gpxColor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString("fileName", fileName);
|
||||
bundle.putString("gpxColor", gpxColor);
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/gpx/HideGpxParams.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/HideGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable HideGpxParams;
|
45
osmand-api/src/net/osmand/aidl2/gpx/HideGpxParams.java
Normal file
45
osmand-api/src/net/osmand/aidl2/gpx/HideGpxParams.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class HideGpxParams extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public HideGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public HideGpxParams(Parcel in) {
|
||||
super(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");
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/gpx/ImportGpxParams.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/ImportGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable ImportGpxParams;
|
105
osmand-api/src/net/osmand/aidl2/gpx/ImportGpxParams.java
Normal file
105
osmand-api/src/net/osmand/aidl2/gpx/ImportGpxParams.java
Normal file
|
@ -0,0 +1,105 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ImportGpxParams extends AidlParams {
|
||||
|
||||
private File gpxFile;
|
||||
private Uri gpxUri;
|
||||
private String sourceRawData;
|
||||
private String destinationPath;
|
||||
private String color;
|
||||
private boolean show;
|
||||
|
||||
public ImportGpxParams(File gpxFile, String destinationPath, String color, boolean show) {
|
||||
this.gpxFile = gpxFile;
|
||||
this.destinationPath = destinationPath;
|
||||
this.color = color;
|
||||
this.show = show;
|
||||
}
|
||||
|
||||
public ImportGpxParams(Uri gpxUri, String destinationPath, String color, boolean show) {
|
||||
this.gpxUri = gpxUri;
|
||||
this.destinationPath = destinationPath;
|
||||
this.color = color;
|
||||
this.show = show;
|
||||
}
|
||||
|
||||
public ImportGpxParams(String sourceRawData, String destinationPath, String color, boolean show) {
|
||||
this.sourceRawData = sourceRawData;
|
||||
this.destinationPath = destinationPath;
|
||||
this.color = color;
|
||||
this.show = show;
|
||||
}
|
||||
|
||||
public ImportGpxParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<ImportGpxParams> CREATOR = new Creator<ImportGpxParams>() {
|
||||
@Override
|
||||
public ImportGpxParams createFromParcel(Parcel in) {
|
||||
return new ImportGpxParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImportGpxParams[] newArray(int size) {
|
||||
return new ImportGpxParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public File getGpxFile() {
|
||||
return gpxFile;
|
||||
}
|
||||
|
||||
public Uri getGpxUri() {
|
||||
return gpxUri;
|
||||
}
|
||||
|
||||
public String getSourceRawData() {
|
||||
return sourceRawData;
|
||||
}
|
||||
|
||||
public String getDestinationPath() {
|
||||
return destinationPath;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
bundle.setClassLoader(Uri.class.getClassLoader());
|
||||
|
||||
String gpxAbsolutePath = bundle.getString("gpxAbsolutePath");
|
||||
if (gpxAbsolutePath != null) {
|
||||
gpxFile = new File(gpxAbsolutePath);
|
||||
}
|
||||
gpxUri = bundle.getParcelable("gpxUri");
|
||||
sourceRawData = bundle.getString("sourceRawData");
|
||||
destinationPath = bundle.getString("destinationPath");
|
||||
color = bundle.getString("color");
|
||||
show = bundle.getBoolean("show");
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/gpx/RemoveGpxParams.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/RemoveGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable RemoveGpxParams;
|
45
osmand-api/src/net/osmand/aidl2/gpx/RemoveGpxParams.java
Normal file
45
osmand-api/src/net/osmand/aidl2/gpx/RemoveGpxParams.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class RemoveGpxParams extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public RemoveGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public RemoveGpxParams(Parcel in) {
|
||||
super(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/aidl2/gpx/ShowGpxParams.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/gpx/ShowGpxParams.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable ShowGpxParams;
|
45
osmand-api/src/net/osmand/aidl2/gpx/ShowGpxParams.java
Normal file
45
osmand-api/src/net/osmand/aidl2/gpx/ShowGpxParams.java
Normal file
|
@ -0,0 +1,45 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class ShowGpxParams extends AidlParams {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public ShowGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public ShowGpxParams(Parcel in) {
|
||||
super(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");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable StartGpxRecordingParams;
|
|
@ -0,0 +1,28 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class StartGpxRecordingParams extends AidlParams {
|
||||
|
||||
public StartGpxRecordingParams() {
|
||||
|
||||
}
|
||||
|
||||
public StartGpxRecordingParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<StartGpxRecordingParams> CREATOR = new Creator<StartGpxRecordingParams>() {
|
||||
@Override
|
||||
public StartGpxRecordingParams createFromParcel(Parcel in) {
|
||||
return new StartGpxRecordingParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StartGpxRecordingParams[] newArray(int size) {
|
||||
return new StartGpxRecordingParams[size];
|
||||
}
|
||||
};
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
parcelable StopGpxRecordingParams;
|
|
@ -0,0 +1,28 @@
|
|||
package net.osmand.aidl2.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class StopGpxRecordingParams extends AidlParams {
|
||||
|
||||
public StopGpxRecordingParams() {
|
||||
|
||||
}
|
||||
|
||||
public StopGpxRecordingParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<StopGpxRecordingParams> CREATOR = new Creator<StopGpxRecordingParams>() {
|
||||
@Override
|
||||
public StopGpxRecordingParams createFromParcel(Parcel in) {
|
||||
return new StopGpxRecordingParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StopGpxRecordingParams[] newArray(int size) {
|
||||
return new StopGpxRecordingParams[size];
|
||||
}
|
||||
};
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/map/ALatLon.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/map/ALatLon.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.map;
|
||||
|
||||
parcelable ALatLon;
|
84
osmand-api/src/net/osmand/aidl2/map/ALatLon.java
Normal file
84
osmand-api/src/net/osmand/aidl2/map/ALatLon.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package net.osmand.aidl2.map;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class ALatLon extends AidlParams {
|
||||
|
||||
private double longitude;
|
||||
private double latitude;
|
||||
|
||||
public ALatLon(double latitude, double longitude) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public ALatLon(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<ALatLon> CREATOR = new Creator<ALatLon>() {
|
||||
@Override
|
||||
public ALatLon createFromParcel(Parcel in) {
|
||||
return new ALatLon(in);
|
||||
}
|
||||
|
||||
@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);
|
||||
result = prime * result + temp;
|
||||
temp = (int) Math.floor(longitude * 10000);
|
||||
result = prime * result + temp;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
|
||||
ALatLon other = (ALatLon) obj;
|
||||
return Math.abs(latitude - other.latitude) < 0.00001
|
||||
&& Math.abs(longitude - other.longitude) < 0.00001;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Lat " + ((float) latitude) + " Lon " + ((float) longitude);
|
||||
}
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putDouble("latitude", latitude);
|
||||
bundle.putDouble("longitude", longitude);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
latitude = bundle.getDouble("latitude");
|
||||
longitude = bundle.getDouble("longitude");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.map;
|
||||
|
||||
parcelable SetMapLocationParams;
|
|
@ -0,0 +1,69 @@
|
|||
package net.osmand.aidl2.map;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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");
|
||||
}
|
||||
}
|
3
osmand-api/src/net/osmand/aidl2/maplayer/AMapLayer.aidl
Normal file
3
osmand-api/src/net/osmand/aidl2/maplayer/AMapLayer.aidl
Normal file
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
parcelable AMapLayer;
|
180
osmand-api/src/net/osmand/aidl2/maplayer/AMapLayer.java
Normal file
180
osmand-api/src/net/osmand/aidl2/maplayer/AMapLayer.java
Normal file
|
@ -0,0 +1,180 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
import net.osmand.aidl2.maplayer.point.AMapPoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class AMapLayer extends AidlParams {
|
||||
|
||||
private String id;
|
||||
private String name;
|
||||
private float zOrder = 5.5f;
|
||||
private Map<String, AMapPoint> points = new ConcurrentHashMap<>();
|
||||
|
||||
private boolean imagePoints = false;
|
||||
private int circlePointMinZoom = 0;
|
||||
private int circlePointMaxZoom = 6;
|
||||
private int smallPointMinZoom = 7;
|
||||
private int smallPointMaxZoom = 13;
|
||||
private int bigPointMinZoom = 14;
|
||||
private int bigPointMaxZoom = 22;
|
||||
|
||||
public AMapLayer(String id, String name, float zOrder, List<AMapPoint> pointList) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.zOrder = zOrder;
|
||||
if (pointList != null) {
|
||||
for (AMapPoint p : pointList) {
|
||||
this.points.put(p.getId(), p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AMapLayer(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<AMapLayer> CREATOR = new Creator<AMapLayer>() {
|
||||
@Override
|
||||
public AMapLayer createFromParcel(Parcel in) {
|
||||
return new AMapLayer(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AMapLayer[] newArray(int size) {
|
||||
return new AMapLayer[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public float getZOrder() {
|
||||
return zOrder;
|
||||
}
|
||||
|
||||
public List<AMapPoint> getPoints() {
|
||||
return new ArrayList<>(points.values());
|
||||
}
|
||||
|
||||
public AMapPoint getPoint(String pointId) {
|
||||
return points.get(pointId);
|
||||
}
|
||||
|
||||
public boolean hasPoint(String pointId) {
|
||||
return points.containsKey(pointId);
|
||||
}
|
||||
|
||||
public void putPoint(AMapPoint point) {
|
||||
points.put(point.getId(), point);
|
||||
}
|
||||
|
||||
public void removePoint(String pointId) {
|
||||
points.remove(pointId);
|
||||
}
|
||||
|
||||
public boolean isImagePoints() {
|
||||
return imagePoints;
|
||||
}
|
||||
|
||||
public void setImagePoints(boolean imagePoints) {
|
||||
this.imagePoints = imagePoints;
|
||||
}
|
||||
|
||||
public void copyZoomBounds(AMapLayer layer) {
|
||||
circlePointMinZoom = layer.circlePointMinZoom;
|
||||
circlePointMaxZoom = layer.circlePointMaxZoom;
|
||||
smallPointMinZoom = layer.smallPointMinZoom;
|
||||
smallPointMaxZoom = layer.smallPointMaxZoom;
|
||||
bigPointMinZoom = layer.bigPointMinZoom;
|
||||
bigPointMaxZoom = layer.bigPointMaxZoom;
|
||||
}
|
||||
|
||||
public void setCirclePointZoomBounds(int min, int max) {
|
||||
circlePointMinZoom = min;
|
||||
circlePointMaxZoom = max;
|
||||
}
|
||||
|
||||
public void setSmallPointZoomBounds(int min, int max) {
|
||||
smallPointMinZoom = min;
|
||||
smallPointMaxZoom = max;
|
||||
}
|
||||
|
||||
public void setBigPointZoomBounds(int min, int max) {
|
||||
bigPointMinZoom = min;
|
||||
bigPointMaxZoom = max;
|
||||
}
|
||||
|
||||
public int getCirclePointMinZoom() {
|
||||
return circlePointMinZoom;
|
||||
}
|
||||
|
||||
public int getCirclePointMaxZoom() {
|
||||
return circlePointMaxZoom;
|
||||
}
|
||||
|
||||
public int getSmallPointMinZoom() {
|
||||
return smallPointMinZoom;
|
||||
}
|
||||
|
||||
public int getSmallPointMaxZoom() {
|
||||
return smallPointMaxZoom;
|
||||
}
|
||||
|
||||
public int getBigPointMinZoom() {
|
||||
return bigPointMinZoom;
|
||||
}
|
||||
|
||||
public int getBigPointMaxZoom() {
|
||||
return 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);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
parcelable AddMapLayerParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AddMapLayerParams extends AidlParams {
|
||||
|
||||
private AMapLayer layer;
|
||||
|
||||
public AddMapLayerParams(AMapLayer layer) {
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public AddMapLayerParams(Parcel in) {
|
||||
super(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.aidl2.maplayer;
|
||||
|
||||
parcelable RemoveMapLayerParams;
|
|
@ -0,0 +1,45 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class RemoveMapLayerParams extends AidlParams {
|
||||
|
||||
private String id;
|
||||
|
||||
public RemoveMapLayerParams(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public RemoveMapLayerParams(Parcel in) {
|
||||
super(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.aidl2.maplayer;
|
||||
|
||||
parcelable UpdateMapLayerParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.maplayer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class UpdateMapLayerParams extends AidlParams {
|
||||
|
||||
private AMapLayer layer;
|
||||
|
||||
public UpdateMapLayerParams(AMapLayer layer) {
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public UpdateMapLayerParams(Parcel in) {
|
||||
super(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.aidl2.maplayer.point;
|
||||
|
||||
parcelable AMapPoint;
|
128
osmand-api/src/net/osmand/aidl2/maplayer/point/AMapPoint.java
Normal file
128
osmand-api/src/net/osmand/aidl2/maplayer/point/AMapPoint.java
Normal file
|
@ -0,0 +1,128 @@
|
|||
package net.osmand.aidl2.maplayer.point;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
import net.osmand.aidl2.map.ALatLon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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";
|
||||
public static final String POINT_STALE_LOC_PARAM = "point_stale_loc_param";
|
||||
public static final String POINT_BEARING_PARAM = "point_bearing_param";
|
||||
|
||||
private String id;
|
||||
private String shortName;
|
||||
private String fullName;
|
||||
private String typeName;
|
||||
private String layerId;
|
||||
private int color;
|
||||
private ALatLon location;
|
||||
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,
|
||||
int color, ALatLon location, List<String> details, Map<String, String> params) {
|
||||
this.id = id;
|
||||
this.shortName = shortName;
|
||||
this.fullName = fullName;
|
||||
this.typeName = typeName;
|
||||
this.layerId = layerId;
|
||||
this.color = color;
|
||||
this.location = location;
|
||||
if (details != null) {
|
||||
this.details.addAll(details);
|
||||
}
|
||||
if (params != null) {
|
||||
this.params.putAll(params);
|
||||
}
|
||||
}
|
||||
|
||||
public AMapPoint(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<AMapPoint> CREATOR = new Creator<AMapPoint>() {
|
||||
@Override
|
||||
public AMapPoint createFromParcel(Parcel in) {
|
||||
return new AMapPoint(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AMapPoint[] newArray(int size) {
|
||||
return new AMapPoint[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getShortName() {
|
||||
return shortName;
|
||||
}
|
||||
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
|
||||
public String getTypeName() {
|
||||
return typeName;
|
||||
}
|
||||
|
||||
public String getLayerId() {
|
||||
return layerId;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public ALatLon getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public List<String> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
bundle.setClassLoader(ALatLon.class.getClassLoader());
|
||||
|
||||
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.aidl2.maplayer.point;
|
||||
|
||||
parcelable AddMapPointParams;
|
|
@ -0,0 +1,55 @@
|
|||
package net.osmand.aidl2.maplayer.point;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.maplayer.point;
|
||||
|
||||
parcelable RemoveMapPointParams;
|
|
@ -0,0 +1,55 @@
|
|||
package net.osmand.aidl2.maplayer.point;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.maplayer.point;
|
||||
|
||||
parcelable ShowMapPointParams;
|
|
@ -0,0 +1,54 @@
|
|||
package net.osmand.aidl2.maplayer.point;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.maplayer.point;
|
||||
|
||||
parcelable UpdateMapPointParams;
|
|
@ -0,0 +1,62 @@
|
|||
package net.osmand.aidl2.maplayer.point;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.mapmarker;
|
||||
|
||||
parcelable AMapMarker;
|
61
osmand-api/src/net/osmand/aidl2/mapmarker/AMapMarker.java
Normal file
61
osmand-api/src/net/osmand/aidl2/mapmarker/AMapMarker.java
Normal file
|
@ -0,0 +1,61 @@
|
|||
package net.osmand.aidl2.mapmarker;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.mapmarker;
|
||||
|
||||
parcelable AddMapMarkerParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.mapmarker;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AddMapMarkerParams extends AidlParams {
|
||||
|
||||
private AMapMarker marker;
|
||||
|
||||
public AddMapMarkerParams(AMapMarker marker) {
|
||||
this.marker = marker;
|
||||
}
|
||||
|
||||
public AddMapMarkerParams(Parcel in) {
|
||||
super(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.aidl2.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkerParams;
|
|
@ -0,0 +1,59 @@
|
|||
package net.osmand.aidl2.mapmarker;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkersParams;
|
|
@ -0,0 +1,28 @@
|
|||
package net.osmand.aidl2.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class RemoveMapMarkersParams extends AidlParams {
|
||||
|
||||
public RemoveMapMarkersParams() {
|
||||
|
||||
}
|
||||
|
||||
public RemoveMapMarkersParams(Parcel in) {
|
||||
super(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.aidl2.mapmarker;
|
||||
|
||||
parcelable UpdateMapMarkerParams;
|
|
@ -0,0 +1,68 @@
|
|||
package net.osmand.aidl2.mapmarker;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.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) {
|
||||
super(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.aidl2.mapwidget;
|
||||
|
||||
parcelable AMapWidget;
|
112
osmand-api/src/net/osmand/aidl2/mapwidget/AMapWidget.java
Normal file
112
osmand-api/src/net/osmand/aidl2/mapwidget/AMapWidget.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
package net.osmand.aidl2.mapwidget;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AMapWidget extends AidlParams {
|
||||
private String id;
|
||||
private String menuIconName;
|
||||
private String menuTitle;
|
||||
private String lightIconName;
|
||||
private String darkIconName;
|
||||
private String text;
|
||||
private String description;
|
||||
private int order;
|
||||
private Intent intentOnClick;
|
||||
|
||||
public AMapWidget(String id, String menuIconName, String menuTitle,
|
||||
String lightIconName, String darkIconName, String text, String description,
|
||||
int order, Intent intentOnClick) {
|
||||
this.id = id;
|
||||
this.menuIconName = menuIconName;
|
||||
this.menuTitle = menuTitle;
|
||||
this.lightIconName = lightIconName;
|
||||
this.darkIconName = darkIconName;
|
||||
this.text = text;
|
||||
this.description = description;
|
||||
this.order = order;
|
||||
this.intentOnClick = intentOnClick;
|
||||
}
|
||||
|
||||
public AMapWidget(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<AMapWidget> CREATOR = new Creator<AMapWidget>() {
|
||||
@Override
|
||||
public AMapWidget createFromParcel(Parcel in) {
|
||||
return new AMapWidget(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AMapWidget[] newArray(int size) {
|
||||
return new AMapWidget[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getMenuIconName() {
|
||||
return menuIconName;
|
||||
}
|
||||
|
||||
public String getMenuTitle() {
|
||||
return menuTitle;
|
||||
}
|
||||
|
||||
public String getLightIconName() {
|
||||
return lightIconName;
|
||||
}
|
||||
|
||||
public String getDarkIconName() {
|
||||
return darkIconName;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
public Intent getIntentOnClick() {
|
||||
return intentOnClick;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putString("id", id);
|
||||
bundle.putString("menuIconName", menuIconName);
|
||||
bundle.putString("menuTitle", menuTitle);
|
||||
bundle.putString("lightIconName", lightIconName);
|
||||
bundle.putString("darkIconName", darkIconName);
|
||||
bundle.putString("text", text);
|
||||
bundle.putString("description", description);
|
||||
bundle.putInt("order", order);
|
||||
bundle.putParcelable("intentOnClick", intentOnClick);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
bundle.setClassLoader(Intent.class.getClassLoader());
|
||||
id = bundle.getString("id");
|
||||
menuIconName = bundle.getString("menuIconName");
|
||||
menuTitle = bundle.getString("menuTitle");
|
||||
lightIconName = bundle.getString("lightIconName");
|
||||
darkIconName = bundle.getString("darkIconName");
|
||||
text = bundle.getString("text");
|
||||
description = bundle.getString("description");
|
||||
order = bundle.getInt("order");
|
||||
intentOnClick = bundle.getParcelable("intentOnClick");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.mapwidget;
|
||||
|
||||
parcelable AddMapWidgetParams;
|
|
@ -0,0 +1,46 @@
|
|||
package net.osmand.aidl2.mapwidget;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
|
||||
import net.osmand.aidl2.AidlParams;
|
||||
|
||||
public class AddMapWidgetParams extends AidlParams {
|
||||
|
||||
private AMapWidget widget;
|
||||
|
||||
public AddMapWidgetParams(AMapWidget widget) {
|
||||
this.widget = widget;
|
||||
}
|
||||
|
||||
public AddMapWidgetParams(Parcel in) {
|
||||
super(in);
|
||||
}
|
||||
|
||||
public static final Creator<AddMapWidgetParams> CREATOR = new Creator<AddMapWidgetParams>() {
|
||||
@Override
|
||||
public AddMapWidgetParams createFromParcel(Parcel in) {
|
||||
return new AddMapWidgetParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddMapWidgetParams[] newArray(int size) {
|
||||
return new AddMapWidgetParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapWidget getWidget() {
|
||||
return widget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToBundle(Bundle bundle) {
|
||||
bundle.putParcelable("widget", widget);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readFromBundle(Bundle bundle) {
|
||||
bundle.setClassLoader(AMapWidget.class.getClassLoader());
|
||||
widget = bundle.getParcelable("widget");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package net.osmand.aidl2.mapwidget;
|
||||
|
||||
parcelable RemoveMapWidgetParams;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue