Add OsmAnd-api android library and remove duplicated aidl code
This commit is contained in:
parent
f89499bec3
commit
17ed57288f
307 changed files with 43 additions and 6121 deletions
|
@ -138,6 +138,7 @@ afterEvaluate {
|
|||
dependencies {
|
||||
implementation project(path: ':OsmAnd-java', configuration: 'android')
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
implementation project(":osmand-api")
|
||||
|
||||
implementation( "org.jetbrains.kotlin:kotlin-stdlib:1.2.71") {
|
||||
exclude group: 'org.jetbrains', module: 'annotations'
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
package net.osmand.aidl;
|
||||
|
||||
import net.osmand.aidl.search.SearchResult;
|
||||
import net.osmand.aidl.gpx.AGpxBitmap;
|
||||
import net.osmand.aidl.navigation.ADirectionInfo;
|
||||
import net.osmand.aidl.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);
|
||||
}
|
|
@ -1,849 +0,0 @@
|
|||
package net.osmand.aidl;
|
||||
|
||||
import net.osmand.aidl.map.ALatLon;
|
||||
import net.osmand.aidl.map.SetMapLocationParams;
|
||||
|
||||
import net.osmand.aidl.favorite.group.AFavoriteGroup;
|
||||
import net.osmand.aidl.favorite.group.AddFavoriteGroupParams;
|
||||
import net.osmand.aidl.favorite.group.RemoveFavoriteGroupParams;
|
||||
import net.osmand.aidl.favorite.group.UpdateFavoriteGroupParams;
|
||||
|
||||
import net.osmand.aidl.favorite.AFavorite;
|
||||
import net.osmand.aidl.favorite.AddFavoriteParams;
|
||||
import net.osmand.aidl.favorite.RemoveFavoriteParams;
|
||||
import net.osmand.aidl.favorite.UpdateFavoriteParams;
|
||||
|
||||
import net.osmand.aidl.mapmarker.AMapMarker;
|
||||
import net.osmand.aidl.mapmarker.AddMapMarkerParams;
|
||||
import net.osmand.aidl.mapmarker.RemoveMapMarkerParams;
|
||||
import net.osmand.aidl.mapmarker.UpdateMapMarkerParams;
|
||||
|
||||
import net.osmand.aidl.calculateroute.CalculateRouteParams;
|
||||
|
||||
import net.osmand.aidl.gpx.ImportGpxParams;
|
||||
import net.osmand.aidl.gpx.ShowGpxParams;
|
||||
import net.osmand.aidl.gpx.StartGpxRecordingParams;
|
||||
import net.osmand.aidl.gpx.StopGpxRecordingParams;
|
||||
import net.osmand.aidl.gpx.HideGpxParams;
|
||||
import net.osmand.aidl.gpx.ASelectedGpxFile;
|
||||
|
||||
import net.osmand.aidl.mapwidget.AMapWidget;
|
||||
import net.osmand.aidl.mapwidget.AddMapWidgetParams;
|
||||
import net.osmand.aidl.mapwidget.RemoveMapWidgetParams;
|
||||
import net.osmand.aidl.mapwidget.UpdateMapWidgetParams;
|
||||
|
||||
import net.osmand.aidl.maplayer.point.AMapPoint;
|
||||
import net.osmand.aidl.maplayer.point.AddMapPointParams;
|
||||
import net.osmand.aidl.maplayer.point.RemoveMapPointParams;
|
||||
import net.osmand.aidl.maplayer.point.UpdateMapPointParams;
|
||||
import net.osmand.aidl.maplayer.AMapLayer;
|
||||
import net.osmand.aidl.maplayer.AddMapLayerParams;
|
||||
import net.osmand.aidl.maplayer.RemoveMapLayerParams;
|
||||
import net.osmand.aidl.maplayer.UpdateMapLayerParams;
|
||||
|
||||
import net.osmand.aidl.navigation.NavigateParams;
|
||||
import net.osmand.aidl.navigation.NavigateGpxParams;
|
||||
|
||||
import net.osmand.aidl.note.TakePhotoNoteParams;
|
||||
import net.osmand.aidl.note.StartVideoRecordingParams;
|
||||
import net.osmand.aidl.note.StartAudioRecordingParams;
|
||||
import net.osmand.aidl.note.StopRecordingParams;
|
||||
|
||||
import net.osmand.aidl.gpx.RemoveGpxParams;
|
||||
|
||||
import net.osmand.aidl.maplayer.point.ShowMapPointParams;
|
||||
|
||||
import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams;
|
||||
import net.osmand.aidl.navdrawer.NavDrawerFooterParams;
|
||||
import net.osmand.aidl.navdrawer.NavDrawerHeaderParams;
|
||||
|
||||
import net.osmand.aidl.navigation.PauseNavigationParams;
|
||||
import net.osmand.aidl.navigation.ResumeNavigationParams;
|
||||
import net.osmand.aidl.navigation.StopNavigationParams;
|
||||
import net.osmand.aidl.navigation.MuteNavigationParams;
|
||||
import net.osmand.aidl.navigation.UnmuteNavigationParams;
|
||||
|
||||
import net.osmand.aidl.IOsmAndAidlCallback;
|
||||
|
||||
import net.osmand.aidl.search.SearchResult;
|
||||
import net.osmand.aidl.search.SearchParams;
|
||||
import net.osmand.aidl.navigation.NavigateSearchParams;
|
||||
|
||||
import net.osmand.aidl.customization.SetWidgetsParams;
|
||||
import net.osmand.aidl.customization.OsmandSettingsParams;
|
||||
import net.osmand.aidl.customization.OsmandSettingsInfoParams;
|
||||
import net.osmand.aidl.customization.CustomizationInfoParams;
|
||||
|
||||
import net.osmand.aidl.gpx.AGpxFile;
|
||||
import net.osmand.aidl.gpx.AGpxFileDetails;
|
||||
import net.osmand.aidl.gpx.CreateGpxBitmapParams;
|
||||
import net.osmand.aidl.gpx.GpxColorParams;
|
||||
|
||||
import net.osmand.aidl.tiles.ASqliteDbFile;
|
||||
|
||||
import net.osmand.aidl.plugins.PluginParams;
|
||||
import net.osmand.aidl.copyfile.CopyFileParams;
|
||||
|
||||
import net.osmand.aidl.navigation.ANavigationUpdateParams;
|
||||
import net.osmand.aidl.navigation.ANavigationVoiceRouterMessageParams;
|
||||
|
||||
import net.osmand.aidl.contextmenu.ContextMenuButtonsParams;
|
||||
import net.osmand.aidl.contextmenu.UpdateContextMenuButtonsParams;
|
||||
import net.osmand.aidl.contextmenu.RemoveContextMenuButtonsParams;
|
||||
|
||||
import net.osmand.aidl.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);
|
||||
|
||||
/**
|
||||
* 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 removeFavoriteGroup(in RemoveFavoriteGroupParams params);
|
||||
|
||||
/**
|
||||
* Remove favorite group with given name.
|
||||
*
|
||||
* @param name (String) - name of favorite group.
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* 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 removeFavorite(in RemoveFavoriteParams params);
|
||||
|
||||
/**
|
||||
* Remove favorite at given location with given params.
|
||||
*
|
||||
* @param lat (double) - latitude.
|
||||
* @param lon (double) - longitude.
|
||||
* @param name (String) - name of favorite item.
|
||||
* @param category (String) - category of favorite item.
|
||||
*/
|
||||
boolean updateFavorite(in UpdateFavoriteParams params);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
|
@ -1,101 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AContextMenuButton implements Parcelable {
|
||||
|
||||
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) {
|
||||
readFromParcel(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 isNeedColorizeIcon() {
|
||||
return needColorizeIcon;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public static Creator<AContextMenuButton> getCREATOR() {
|
||||
return CREATOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int f) {
|
||||
dest.writeInt(buttonId);
|
||||
dest.writeString(leftTextCaption);
|
||||
dest.writeString(rightTextCaption);
|
||||
dest.writeString(leftIconName);
|
||||
dest.writeString(rightIconName);
|
||||
dest.writeInt(needColorizeIcon ? 1 : 0);
|
||||
dest.writeInt(enabled ? 1 : 0);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
buttonId = in.readInt();
|
||||
leftTextCaption = in.readString();
|
||||
rightTextCaption = in.readString();
|
||||
leftIconName = in.readString();
|
||||
rightIconName = in.readString();
|
||||
needColorizeIcon = in.readInt() != 0;
|
||||
enabled = in.readInt() != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UpdateContextMenuButtonsParams implements Parcelable {
|
||||
private ContextMenuButtonsParams buttonsParams;
|
||||
|
||||
public UpdateContextMenuButtonsParams(ContextMenuButtonsParams widget) {
|
||||
this.buttonsParams = widget;
|
||||
}
|
||||
|
||||
public UpdateContextMenuButtonsParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<UpdateContextMenuButtonsParams> CREATOR = new
|
||||
Creator<UpdateContextMenuButtonsParams>() {
|
||||
public UpdateContextMenuButtonsParams createFromParcel(Parcel in) {
|
||||
return new UpdateContextMenuButtonsParams(in);
|
||||
}
|
||||
|
||||
public UpdateContextMenuButtonsParams[] newArray(int size) {
|
||||
return new UpdateContextMenuButtonsParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public ContextMenuButtonsParams getContextMenuButtonsParams() {
|
||||
return buttonsParams;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(buttonsParams, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
buttonsParams = in.readParcelable(ContextMenuButtonsParams.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable AGpxBitmap;
|
||||
|
|
@ -1,196 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class AGpxFileDetails implements Parcelable {
|
||||
|
||||
private float totalDistance = 0;
|
||||
private int totalTracks = 0;
|
||||
private long startTime = Long.MAX_VALUE;
|
||||
private long endTime = Long.MIN_VALUE;
|
||||
private long timeSpan = 0;
|
||||
private long timeMoving = 0;
|
||||
private float totalDistanceMoving = 0;
|
||||
|
||||
private double diffElevationUp = 0;
|
||||
private double diffElevationDown = 0;
|
||||
private double avgElevation = 0;
|
||||
private double minElevation = 99999;
|
||||
private double maxElevation = -100;
|
||||
|
||||
private float minSpeed = Float.MAX_VALUE;
|
||||
private float maxSpeed = 0;
|
||||
private float avgSpeed;
|
||||
|
||||
private int points;
|
||||
private int wptPoints = 0;
|
||||
|
||||
private List<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 = new ArrayList<>(wptCategoryNames);
|
||||
}
|
||||
}
|
||||
|
||||
public AGpxFileDetails(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AGpxFileDetails> CREATOR = new
|
||||
Creator<AGpxFileDetails>() {
|
||||
public AGpxFileDetails createFromParcel(Parcel in) {
|
||||
return new AGpxFileDetails(in);
|
||||
}
|
||||
|
||||
public AGpxFileDetails[] newArray(int size) {
|
||||
return new AGpxFileDetails[size];
|
||||
}
|
||||
};
|
||||
|
||||
public float getTotalDistance() {
|
||||
return totalDistance;
|
||||
}
|
||||
|
||||
public int getTotalTracks() {
|
||||
return totalTracks;
|
||||
}
|
||||
|
||||
public long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public long getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public long getTimeSpan() {
|
||||
return timeSpan;
|
||||
}
|
||||
|
||||
public long getTimeMoving() {
|
||||
return timeMoving;
|
||||
}
|
||||
|
||||
public float getTotalDistanceMoving() {
|
||||
return totalDistanceMoving;
|
||||
}
|
||||
|
||||
public double getDiffElevationUp() {
|
||||
return diffElevationUp;
|
||||
}
|
||||
|
||||
public double getDiffElevationDown() {
|
||||
return diffElevationDown;
|
||||
}
|
||||
|
||||
public double getAvgElevation() {
|
||||
return avgElevation;
|
||||
}
|
||||
|
||||
public double getMinElevation() {
|
||||
return minElevation;
|
||||
}
|
||||
|
||||
public double getMaxElevation() {
|
||||
return maxElevation;
|
||||
}
|
||||
|
||||
public float getMinSpeed() {
|
||||
return minSpeed;
|
||||
}
|
||||
|
||||
public float getMaxSpeed() {
|
||||
return maxSpeed;
|
||||
}
|
||||
|
||||
public float getAvgSpeed() {
|
||||
return avgSpeed;
|
||||
}
|
||||
|
||||
public int getPoints() {
|
||||
return points;
|
||||
}
|
||||
|
||||
public int getWptPoints() {
|
||||
return wptPoints;
|
||||
}
|
||||
|
||||
public List<String> getWptCategoryNames() {
|
||||
return wptCategoryNames;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeFloat(totalDistance);
|
||||
out.writeInt(totalTracks);
|
||||
out.writeLong(startTime);
|
||||
out.writeLong(endTime);
|
||||
out.writeLong(timeSpan);
|
||||
out.writeLong(timeMoving);
|
||||
out.writeFloat(totalDistanceMoving);
|
||||
out.writeDouble(diffElevationUp);
|
||||
out.writeDouble(diffElevationDown);
|
||||
out.writeDouble(avgElevation);
|
||||
out.writeDouble(minElevation);
|
||||
out.writeDouble(maxElevation);
|
||||
out.writeFloat(minSpeed);
|
||||
out.writeFloat(maxSpeed);
|
||||
out.writeFloat(avgSpeed);
|
||||
out.writeInt(points);
|
||||
out.writeInt(wptPoints);
|
||||
out.writeStringList(wptCategoryNames);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
totalDistance = in.readFloat();
|
||||
totalTracks = in.readInt();
|
||||
startTime = in.readLong();
|
||||
endTime = in.readLong();
|
||||
timeSpan = in.readLong();
|
||||
timeMoving = in.readLong();
|
||||
totalDistanceMoving = in.readFloat();
|
||||
diffElevationUp = in.readDouble();
|
||||
diffElevationDown = in.readDouble();
|
||||
avgElevation = in.readDouble();
|
||||
minElevation = in.readDouble();
|
||||
maxElevation = in.readDouble();
|
||||
minSpeed = in.readFloat();
|
||||
maxSpeed = in.readFloat();
|
||||
avgSpeed = in.readFloat();
|
||||
points = in.readInt();
|
||||
wptPoints = in.readInt();
|
||||
in.readStringList(wptCategoryNames);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
public class ASelectedGpxFile implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
private long modifiedTime;
|
||||
private long fileSize;
|
||||
private AGpxFileDetails details;
|
||||
|
||||
public ASelectedGpxFile(@NonNull String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public ASelectedGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, @Nullable AGpxFileDetails details) {
|
||||
this.fileName = fileName;
|
||||
this.modifiedTime = modifiedTime;
|
||||
this.fileSize = fileSize;
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public ASelectedGpxFile(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<ASelectedGpxFile> CREATOR = new
|
||||
Creator<ASelectedGpxFile>() {
|
||||
public ASelectedGpxFile createFromParcel(Parcel in) {
|
||||
return new ASelectedGpxFile(in);
|
||||
}
|
||||
|
||||
public ASelectedGpxFile[] newArray(int size) {
|
||||
return new ASelectedGpxFile[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public long getModifiedTime() {
|
||||
return modifiedTime;
|
||||
}
|
||||
|
||||
public long getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public AGpxFileDetails getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
out.writeLong(modifiedTime);
|
||||
out.writeLong(fileSize);
|
||||
|
||||
out.writeByte((byte) (details != null ? 1 : 0));
|
||||
if (details != null) {
|
||||
out.writeParcelable(details, flags);
|
||||
}
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
modifiedTime = in.readLong();
|
||||
fileSize = in.readLong();
|
||||
|
||||
boolean hasDetails= in.readByte() != 0;
|
||||
if (hasDetails) {
|
||||
details = in.readParcelable(AGpxFileDetails.class.getClassLoader());
|
||||
} else {
|
||||
details = null;
|
||||
}
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveMapMarkerParams implements Parcelable {
|
||||
|
||||
private AMapMarker marker;
|
||||
|
||||
public RemoveMapMarkerParams(AMapMarker marker) {
|
||||
this.marker = marker;
|
||||
}
|
||||
|
||||
public RemoveMapMarkerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<RemoveMapMarkerParams> CREATOR = new
|
||||
Parcelable.Creator<RemoveMapMarkerParams>() {
|
||||
public RemoveMapMarkerParams createFromParcel(Parcel in) {
|
||||
return new RemoveMapMarkerParams(in);
|
||||
}
|
||||
|
||||
public RemoveMapMarkerParams[] newArray(int size) {
|
||||
return new RemoveMapMarkerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapMarker getMarker() {
|
||||
return marker;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(marker, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
marker = in.readParcelable(AMapMarker.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UpdateMapMarkerParams implements Parcelable {
|
||||
|
||||
private AMapMarker markerPrev;
|
||||
private AMapMarker markerNew;
|
||||
|
||||
public UpdateMapMarkerParams(AMapMarker markerPrev, AMapMarker markerNew) {
|
||||
this.markerPrev = markerPrev;
|
||||
this.markerNew = markerNew;
|
||||
}
|
||||
|
||||
public UpdateMapMarkerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<UpdateMapMarkerParams> CREATOR = new
|
||||
Parcelable.Creator<UpdateMapMarkerParams>() {
|
||||
public UpdateMapMarkerParams createFromParcel(Parcel in) {
|
||||
return new UpdateMapMarkerParams(in);
|
||||
}
|
||||
|
||||
public UpdateMapMarkerParams[] newArray(int size) {
|
||||
return new UpdateMapMarkerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapMarker getMarkerPrev() {
|
||||
return markerPrev;
|
||||
}
|
||||
|
||||
public AMapMarker getMarkerNew() {
|
||||
return markerNew;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(markerPrev, flags);
|
||||
out.writeParcelable(markerNew, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
markerPrev = in.readParcelable(AMapMarker.class.getClassLoader());
|
||||
markerNew = in.readParcelable(AMapMarker.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package net.osmand.aidl.navigation;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class ANavigationVoiceRouterMessageParams implements Parcelable{
|
||||
private boolean subscribeToUpdates = true;
|
||||
private long callbackId = -1L;
|
||||
|
||||
public ANavigationVoiceRouterMessageParams() {
|
||||
}
|
||||
|
||||
public long getCallbackId() {
|
||||
return callbackId;
|
||||
}
|
||||
|
||||
public void setCallbackId(long callbackId) {
|
||||
this.callbackId = callbackId;
|
||||
}
|
||||
|
||||
public void setSubscribeToUpdates(boolean subscribeToUpdates) {
|
||||
this.subscribeToUpdates = subscribeToUpdates;
|
||||
}
|
||||
|
||||
public boolean isSubscribeToUpdates() {
|
||||
return subscribeToUpdates;
|
||||
}
|
||||
|
||||
protected ANavigationVoiceRouterMessageParams(Parcel in) {
|
||||
callbackId = in.readLong();
|
||||
subscribeToUpdates = in.readByte() != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeLong(callbackId);
|
||||
dest.writeByte((byte) (subscribeToUpdates ? 1 : 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<ANavigationVoiceRouterMessageParams> CREATOR = new Creator<ANavigationVoiceRouterMessageParams>() {
|
||||
@Override
|
||||
public ANavigationVoiceRouterMessageParams createFromParcel(Parcel in) {
|
||||
return new ANavigationVoiceRouterMessageParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ANavigationVoiceRouterMessageParams[] newArray(int size) {
|
||||
return new ANavigationVoiceRouterMessageParams[size];
|
||||
}
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
package net.osmand.aidl.tiles;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class ASqliteDbFile implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
private long modifiedTime;
|
||||
private long fileSize;
|
||||
private boolean active;
|
||||
|
||||
public ASqliteDbFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active) {
|
||||
this.fileName = fileName;
|
||||
this.modifiedTime = modifiedTime;
|
||||
this.fileSize = fileSize;
|
||||
this.active = active;
|
||||
}
|
||||
|
||||
public ASqliteDbFile(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<ASqliteDbFile> CREATOR = new
|
||||
Creator<ASqliteDbFile>() {
|
||||
public ASqliteDbFile createFromParcel(Parcel in) {
|
||||
return new ASqliteDbFile(in);
|
||||
}
|
||||
|
||||
public ASqliteDbFile[] newArray(int size) {
|
||||
return new ASqliteDbFile[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public long getModifiedTime() {
|
||||
return modifiedTime;
|
||||
}
|
||||
|
||||
public long getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
out.writeLong(modifiedTime);
|
||||
out.writeLong(fileSize);
|
||||
out.writeByte((byte) (active ? 1 : 0));
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
modifiedTime = in.readLong();
|
||||
fileSize = in.readLong();
|
||||
active = in.readByte() != 0;
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -433,6 +433,7 @@ task appStart(type: Exec) {
|
|||
|
||||
dependencies {
|
||||
implementation project(path: ':OsmAnd-java', configuration: 'android')
|
||||
implementation project(":osmand-api")
|
||||
implementation 'com.android.support:multidex:1.0.1'
|
||||
implementation 'com.android.support:gridlayout-v7:27.1.1'
|
||||
implementation 'com.android.support:cardview-v7:27.1.1'
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.calculateroute;
|
||||
|
||||
parcelable CalculateRouteParams;
|
|
@ -1,100 +0,0 @@
|
|||
package net.osmand.aidl.calculateroute;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import net.osmand.aidl.map.ALatLon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CalculateRouteParams implements Parcelable {
|
||||
|
||||
private ALatLon startPoint;
|
||||
private String startPointName;
|
||||
private ALatLon endPoint;
|
||||
private String endPointName;
|
||||
private List<ALatLon> intermediatePoints = new ArrayList<>();
|
||||
private List<String> intermediateNames = new ArrayList<>();
|
||||
|
||||
public CalculateRouteParams(ALatLon startPoint, String startPointName,
|
||||
ALatLon endPoint, String endPointName,
|
||||
List<ALatLon> intermediatePoints, List<String> intermediateNames) {
|
||||
|
||||
if (endPoint == null) {
|
||||
throw new IllegalArgumentException("endPoint cannot be null");
|
||||
}
|
||||
|
||||
this.startPoint = startPoint;
|
||||
this.startPointName = startPointName;
|
||||
this.endPoint = endPoint;
|
||||
this.endPointName = endPointName;
|
||||
if (intermediatePoints != null) {
|
||||
this.intermediatePoints.addAll(intermediatePoints);
|
||||
}
|
||||
if (intermediateNames != null) {
|
||||
this.intermediateNames.addAll(intermediateNames);
|
||||
}
|
||||
}
|
||||
|
||||
public CalculateRouteParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<CalculateRouteParams> CREATOR = new
|
||||
Parcelable.Creator<CalculateRouteParams>() {
|
||||
public CalculateRouteParams createFromParcel(Parcel in) {
|
||||
return new CalculateRouteParams(in);
|
||||
}
|
||||
|
||||
public CalculateRouteParams[] newArray(int size) {
|
||||
return new CalculateRouteParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public ALatLon getStartPoint() {
|
||||
return startPoint;
|
||||
}
|
||||
|
||||
public String getStartPointName() {
|
||||
return startPointName;
|
||||
}
|
||||
|
||||
public ALatLon getEndPoint() {
|
||||
return endPoint;
|
||||
}
|
||||
|
||||
public String getEndPointName() {
|
||||
return endPointName;
|
||||
}
|
||||
|
||||
public List<ALatLon> getIntermediatePoints() {
|
||||
return intermediatePoints;
|
||||
}
|
||||
|
||||
public List<String> getIntermediateNames() {
|
||||
return intermediateNames;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(startPoint, flags);
|
||||
out.writeString(startPointName);
|
||||
out.writeParcelable(endPoint, flags);
|
||||
out.writeString(endPointName);
|
||||
out.writeTypedList(intermediatePoints);
|
||||
out.writeStringList(intermediateNames);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
startPoint = in.readParcelable(ALatLon.class.getClassLoader());
|
||||
startPointName = in.readString();
|
||||
endPoint = in.readParcelable(ALatLon.class.getClassLoader());
|
||||
endPointName = in.readString();
|
||||
in.readTypedList(intermediatePoints, ALatLon.CREATOR);
|
||||
in.readStringList(intermediateNames);
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
parcelable AContextMenuButton;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
parcelable ContextMenuButtonsParams;
|
|
@ -1,105 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ContextMenuButtonsParams implements Parcelable {
|
||||
|
||||
private AContextMenuButton leftButton;
|
||||
private AContextMenuButton rightButton;
|
||||
|
||||
private String id;
|
||||
private String appPackage;
|
||||
private String layerId;
|
||||
|
||||
private long callbackId = -1L;
|
||||
|
||||
private List<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;
|
||||
this.pointsIds = pointsIds;
|
||||
}
|
||||
|
||||
public ContextMenuButtonsParams(Parcel in) {
|
||||
readFromParcel(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 writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeParcelable(leftButton, flags);
|
||||
dest.writeParcelable(rightButton, flags);
|
||||
dest.writeString(id);
|
||||
dest.writeString(appPackage);
|
||||
dest.writeString(layerId);
|
||||
dest.writeLong(callbackId);
|
||||
dest.writeStringList(pointsIds);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
leftButton = in.readParcelable(AContextMenuButton.class.getClassLoader());
|
||||
rightButton = in.readParcelable(AContextMenuButton.class.getClassLoader());
|
||||
id = in.readString();
|
||||
appPackage = in.readString();
|
||||
layerId = in.readString();
|
||||
callbackId = in.readLong();
|
||||
in.readStringList(pointsIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
parcelable RemoveContextMenuButtonsParams;
|
|
@ -1,53 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveContextMenuButtonsParams implements Parcelable {
|
||||
|
||||
private String paramsId;
|
||||
|
||||
private long callbackId = -1L;
|
||||
|
||||
public RemoveContextMenuButtonsParams(String paramsId, long callbackId) {
|
||||
this.paramsId = paramsId;
|
||||
this.callbackId = callbackId;
|
||||
}
|
||||
|
||||
public RemoveContextMenuButtonsParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<RemoveContextMenuButtonsParams> CREATOR = new
|
||||
Creator<RemoveContextMenuButtonsParams>() {
|
||||
public RemoveContextMenuButtonsParams createFromParcel(Parcel in) {
|
||||
return new RemoveContextMenuButtonsParams(in);
|
||||
}
|
||||
|
||||
public RemoveContextMenuButtonsParams[] newArray(int size) {
|
||||
return new RemoveContextMenuButtonsParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getParamsId() {
|
||||
return paramsId;
|
||||
}
|
||||
|
||||
public long getCallbackId() {
|
||||
return callbackId;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(paramsId);
|
||||
dest.writeLong(callbackId);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
paramsId = in.readString();
|
||||
callbackId = in.readLong();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.contextmenu;
|
||||
|
||||
parcelable UpdateContextMenuButtonsParams;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.copyfile;
|
||||
|
||||
parcelable CopyFileParams;
|
|
@ -1,78 +0,0 @@
|
|||
package net.osmand.aidl.copyfile;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class CopyFileParams implements Parcelable {
|
||||
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;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public byte[] getFilePartData() {
|
||||
return filePartData;
|
||||
}
|
||||
|
||||
public boolean isDone() {
|
||||
return done;
|
||||
}
|
||||
|
||||
public long getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
protected CopyFileParams(Parcel in) {
|
||||
fileName = in.readString();
|
||||
filePartData = in.createByteArray();
|
||||
startTime = in.readLong();
|
||||
done = in.readByte() == 0;
|
||||
}
|
||||
|
||||
public static final Creator<CopyFileParams> CREATOR = new Creator<CopyFileParams>() {
|
||||
@Override
|
||||
public CopyFileParams createFromParcel(Parcel in) {
|
||||
return new CopyFileParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CopyFileParams[] newArray(int size) {
|
||||
return new CopyFileParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CopyFileParams {" +
|
||||
" fileName=" + fileName +
|
||||
", filePartData size=" + filePartData.length +
|
||||
", startTime=" + startTime +
|
||||
", done=" + done +
|
||||
" }";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(fileName);
|
||||
dest.writeByteArray(filePartData);
|
||||
dest.writeLong(startTime);
|
||||
dest.writeByte((byte) (done ? 0 : 1));
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
parcelable CustomizationInfoParams;
|
|
@ -1,172 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import net.osmand.aidl.navdrawer.NavDrawerFooterParams;
|
||||
import net.osmand.aidl.navdrawer.NavDrawerHeaderParams;
|
||||
import net.osmand.aidl.navdrawer.SetNavDrawerItemsParams;
|
||||
import net.osmand.aidl.plugins.PluginParams;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CustomizationInfoParams implements Parcelable {
|
||||
|
||||
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 List<String> featuresEnabledIds = new ArrayList<>();
|
||||
private List<String> featuresDisabledIds = new ArrayList<>();
|
||||
private List<String> featuresEnabledPatterns = new ArrayList<>();
|
||||
private List<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) {
|
||||
readFromParcel(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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(settingsParams, flags);
|
||||
|
||||
out.writeParcelable(navDrawerHeaderParams, flags);
|
||||
out.writeParcelable(navDrawerFooterParams, flags);
|
||||
out.writeParcelable(navDrawerItemsParams, flags);
|
||||
|
||||
out.writeTypedList(visibilityWidgetsParams);
|
||||
out.writeTypedList(availabilityWidgetsParams);
|
||||
out.writeTypedList(pluginsParams);
|
||||
|
||||
out.writeStringList(featuresEnabledIds);
|
||||
out.writeStringList(featuresDisabledIds);
|
||||
out.writeStringList(featuresEnabledPatterns);
|
||||
out.writeStringList(featuresDisabledPatterns);
|
||||
}
|
||||
|
||||
@SuppressLint("ParcelClassLoader")
|
||||
private void readFromParcel(Parcel in) {
|
||||
settingsParams = in.readParcelable(OsmandSettingsParams.class.getClassLoader());
|
||||
|
||||
navDrawerHeaderParams = in.readParcelable(NavDrawerHeaderParams.class.getClassLoader());
|
||||
navDrawerFooterParams = in.readParcelable(NavDrawerFooterParams.class.getClassLoader());
|
||||
navDrawerItemsParams = in.readParcelable(SetNavDrawerItemsParams.class.getClassLoader());
|
||||
|
||||
in.readTypedList(visibilityWidgetsParams, SetWidgetsParams.CREATOR);
|
||||
in.readTypedList(availabilityWidgetsParams, SetWidgetsParams.CREATOR);
|
||||
in.readTypedList(pluginsParams, PluginParams.CREATOR);
|
||||
|
||||
in.readStringList(featuresEnabledIds);
|
||||
in.readStringList(featuresDisabledIds);
|
||||
in.readStringList(featuresEnabledPatterns);
|
||||
in.readStringList(featuresDisabledPatterns);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
parcelable OsmandSettingsInfoParams;
|
|
@ -1,50 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class OsmandSettingsInfoParams implements Parcelable {
|
||||
|
||||
private String sharedPreferencesName;
|
||||
|
||||
public OsmandSettingsInfoParams(@NonNull String sharedPreferencesName) {
|
||||
this.sharedPreferencesName = sharedPreferencesName;
|
||||
}
|
||||
|
||||
public OsmandSettingsInfoParams(Parcel in) {
|
||||
readFromParcel(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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(sharedPreferencesName);
|
||||
}
|
||||
|
||||
@SuppressLint("ParcelClassLoader")
|
||||
private void readFromParcel(Parcel in) {
|
||||
sharedPreferencesName = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
parcelable OsmandSettingsParams;
|
|
@ -1,60 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
public class OsmandSettingsParams implements Parcelable {
|
||||
|
||||
private String sharedPreferencesName;
|
||||
private Bundle bundle;
|
||||
|
||||
public OsmandSettingsParams(@NonNull String sharedPreferencesName, @Nullable Bundle bundle) {
|
||||
this.sharedPreferencesName = sharedPreferencesName;
|
||||
this.bundle = bundle;
|
||||
}
|
||||
|
||||
public OsmandSettingsParams(Parcel in) {
|
||||
readFromParcel(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 bundle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(sharedPreferencesName);
|
||||
out.writeBundle(bundle);
|
||||
}
|
||||
|
||||
@SuppressLint("ParcelClassLoader")
|
||||
private void readFromParcel(Parcel in) {
|
||||
sharedPreferencesName = in.readString();
|
||||
bundle = in.readBundle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
parcelable SetWidgetsParams;
|
|
@ -1,93 +0,0 @@
|
|||
package net.osmand.aidl.customization;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SetWidgetsParams implements Parcelable {
|
||||
|
||||
private String widgetKey;
|
||||
private List<String> appModesKeys;
|
||||
|
||||
public SetWidgetsParams(String widgetKey, @Nullable List<String> appModesKeys) {
|
||||
this.widgetKey = widgetKey;
|
||||
this.appModesKeys = appModesKeys;
|
||||
}
|
||||
|
||||
public SetWidgetsParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<SetWidgetsParams> CREATOR = new Creator<SetWidgetsParams>() {
|
||||
@Override
|
||||
public SetWidgetsParams createFromParcel(Parcel in) {
|
||||
return new SetWidgetsParams(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SetWidgetsParams[] newArray(int size) {
|
||||
return new SetWidgetsParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getWidgetKey() {
|
||||
return widgetKey;
|
||||
}
|
||||
|
||||
public List<String> getAppModesKeys() {
|
||||
return appModesKeys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(widgetKey);
|
||||
writeStringList(out, appModesKeys);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
widgetKey = in.readString();
|
||||
appModesKeys = readStringList(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private void writeStringList(Parcel out, List<String> val) {
|
||||
if (val == null) {
|
||||
out.writeInt(-1);
|
||||
return;
|
||||
}
|
||||
int N = val.size();
|
||||
int i = 0;
|
||||
out.writeInt(N);
|
||||
while (i < N) {
|
||||
out.writeString(val.get(i));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> readStringList(Parcel in) {
|
||||
List<String> list = new ArrayList<>();
|
||||
int M = list.size();
|
||||
int N = in.readInt();
|
||||
if (N == -1) {
|
||||
return null;
|
||||
}
|
||||
int i = 0;
|
||||
for (; i < M && i < N; i++) {
|
||||
list.set(i, in.readString());
|
||||
}
|
||||
for (; i < N; i++) {
|
||||
list.add(in.readString());
|
||||
}
|
||||
for (; i < M; i++) {
|
||||
list.remove(N);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
parcelable AFavorite;
|
|
@ -1,96 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AFavorite implements Parcelable {
|
||||
|
||||
private double lat;
|
||||
private double lon;
|
||||
private String name;
|
||||
private String description;
|
||||
private String category;
|
||||
private String color;
|
||||
private boolean visible;
|
||||
|
||||
public AFavorite(double lat, double lon, String name, String description,
|
||||
String category, String color, boolean visible) {
|
||||
this.lat = lat;
|
||||
this.lon = lon;
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.category = category;
|
||||
this.color = color;
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public AFavorite(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeDouble(lat);
|
||||
out.writeDouble(lon);
|
||||
out.writeString(name);
|
||||
out.writeString(description);
|
||||
out.writeString(category);
|
||||
out.writeString(color);
|
||||
out.writeByte((byte) (visible ? 1 : 0));
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
lat = in.readDouble();
|
||||
lon = in.readDouble();
|
||||
name = in.readString();
|
||||
description = in.readString();
|
||||
category = in.readString();
|
||||
color = in.readString();
|
||||
visible = in.readByte() != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
parcelable AddFavoriteParams;
|
|
@ -1,47 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AddFavoriteParams implements Parcelable {
|
||||
|
||||
private AFavorite favorite;
|
||||
|
||||
public AddFavoriteParams(AFavorite favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public AddFavoriteParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favorite, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favorite = in.readParcelable(AFavorite.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
parcelable RemoveFavoriteParams;
|
|
@ -1,47 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveFavoriteParams implements Parcelable {
|
||||
|
||||
private AFavorite favorite;
|
||||
|
||||
public RemoveFavoriteParams(AFavorite favorite) {
|
||||
this.favorite = favorite;
|
||||
}
|
||||
|
||||
public RemoveFavoriteParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favorite, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favorite = in.readParcelable(AFavorite.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
parcelable UpdateFavoriteParams;
|
|
@ -1,55 +0,0 @@
|
|||
package net.osmand.aidl.favorite;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UpdateFavoriteParams implements Parcelable {
|
||||
|
||||
private AFavorite favoritePrev;
|
||||
private AFavorite favoriteNew;
|
||||
|
||||
public UpdateFavoriteParams(AFavorite favoritePrev, AFavorite favoriteNew) {
|
||||
this.favoritePrev = favoritePrev;
|
||||
this.favoriteNew = favoriteNew;
|
||||
}
|
||||
|
||||
public UpdateFavoriteParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favoritePrev, flags);
|
||||
out.writeParcelable(favoriteNew, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favoritePrev = in.readParcelable(AFavorite.class.getClassLoader());
|
||||
favoriteNew = in.readParcelable(AFavorite.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
parcelable AFavoriteGroup;
|
|
@ -1,63 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AFavoriteGroup implements Parcelable {
|
||||
|
||||
private String name;
|
||||
private String color;
|
||||
private boolean visible;
|
||||
|
||||
public AFavoriteGroup(String name, String color, boolean visible) {
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
public AFavoriteGroup(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(name);
|
||||
out.writeString(color);
|
||||
out.writeByte((byte) (visible ? 1 : 0));
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
name = in.readString();
|
||||
color = in.readString();
|
||||
visible = in.readByte() != 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
parcelable AddFavoriteGroupParams;
|
|
@ -1,47 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AddFavoriteGroupParams implements Parcelable {
|
||||
|
||||
private AFavoriteGroup favoriteGroup;
|
||||
|
||||
public AddFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
|
||||
this.favoriteGroup = favoriteGroup;
|
||||
}
|
||||
|
||||
public AddFavoriteGroupParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favoriteGroup, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
parcelable RemoveFavoriteGroupParams;
|
|
@ -1,47 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveFavoriteGroupParams implements Parcelable {
|
||||
|
||||
private AFavoriteGroup favoriteGroup;
|
||||
|
||||
public RemoveFavoriteGroupParams(AFavoriteGroup favoriteGroup) {
|
||||
this.favoriteGroup = favoriteGroup;
|
||||
}
|
||||
|
||||
public RemoveFavoriteGroupParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favoriteGroup, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favoriteGroup = in.readParcelable(AFavoriteGroup.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
parcelable UpdateFavoriteGroupParams;
|
|
@ -1,55 +0,0 @@
|
|||
package net.osmand.aidl.favorite.group;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UpdateFavoriteGroupParams implements Parcelable {
|
||||
|
||||
private AFavoriteGroup favoriteGroupPrev;
|
||||
private AFavoriteGroup favoriteGroupNew;
|
||||
|
||||
public UpdateFavoriteGroupParams(AFavoriteGroup favoriteGroup, AFavoriteGroup favoriteGroupNew) {
|
||||
this.favoriteGroupPrev = favoriteGroup;
|
||||
this.favoriteGroupNew = favoriteGroupNew;
|
||||
}
|
||||
|
||||
public UpdateFavoriteGroupParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(favoriteGroupPrev, flags);
|
||||
out.writeParcelable(favoriteGroupNew, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
favoriteGroupPrev = in.readParcelable(AFavoriteGroup.class.getClassLoader());
|
||||
favoriteGroupNew = in.readParcelable(AFavoriteGroup.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class AGpxBitmap implements Parcelable {
|
||||
|
||||
private Bitmap bitmap;
|
||||
|
||||
public AGpxBitmap(@NonNull Bitmap bitmap) {
|
||||
this.bitmap = bitmap;
|
||||
}
|
||||
|
||||
public AGpxBitmap(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public Bitmap getBitmap() {
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public static final Creator<AGpxBitmap> CREATOR = new
|
||||
Creator<AGpxBitmap>() {
|
||||
public AGpxBitmap createFromParcel(Parcel in) {
|
||||
return new AGpxBitmap(in);
|
||||
}
|
||||
|
||||
public AGpxBitmap[] newArray(int size) {
|
||||
return new AGpxBitmap[size];
|
||||
}
|
||||
};
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(bitmap, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
bitmap = in.readParcelable(Bitmap.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable AGpxFile;
|
|
@ -1,88 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
public class AGpxFile implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
private long modifiedTime;
|
||||
private long fileSize;
|
||||
private boolean active;
|
||||
private AGpxFileDetails details;
|
||||
|
||||
public AGpxFile(@NonNull String fileName, long modifiedTime, long fileSize, boolean active, @Nullable AGpxFileDetails details) {
|
||||
this.fileName = fileName;
|
||||
this.modifiedTime = modifiedTime;
|
||||
this.fileSize = fileSize;
|
||||
this.active = active;
|
||||
this.details = details;
|
||||
}
|
||||
|
||||
public AGpxFile(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AGpxFile> CREATOR = new
|
||||
Creator<AGpxFile>() {
|
||||
public AGpxFile createFromParcel(Parcel in) {
|
||||
return new AGpxFile(in);
|
||||
}
|
||||
|
||||
public AGpxFile[] newArray(int size) {
|
||||
return new AGpxFile[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public long getModifiedTime() {
|
||||
return modifiedTime;
|
||||
}
|
||||
|
||||
public long getFileSize() {
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
public AGpxFileDetails getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
out.writeLong(modifiedTime);
|
||||
out.writeLong(fileSize);
|
||||
out.writeByte((byte) (active ? 1 : 0));
|
||||
|
||||
out.writeByte((byte) (details != null ? 1 : 0));
|
||||
if (details != null) {
|
||||
out.writeParcelable(details, flags);
|
||||
}
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
modifiedTime = in.readLong();
|
||||
fileSize = in.readLong();
|
||||
active = in.readByte() != 0;
|
||||
|
||||
boolean hasDetails = in.readByte() != 0;
|
||||
if (hasDetails) {
|
||||
details = in.readParcelable(AGpxFileDetails.class.getClassLoader());
|
||||
} else {
|
||||
details = null;
|
||||
}
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable AGpxFileDetails;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable ASelectedGpxFile;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable CreateGpxBitmapParams;
|
|
@ -1,101 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CreateGpxBitmapParams implements Parcelable {
|
||||
|
||||
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) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<CreateGpxBitmapParams> CREATOR = new
|
||||
Creator<CreateGpxBitmapParams>() {
|
||||
public CreateGpxBitmapParams createFromParcel(Parcel in) {
|
||||
return new CreateGpxBitmapParams(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
if (gpxFile != null) {
|
||||
out.writeString(gpxFile.getAbsolutePath());
|
||||
} else {
|
||||
out.writeString(null);
|
||||
}
|
||||
out.writeParcelable(gpxUri, flags);
|
||||
out.writeFloat(density);
|
||||
out.writeInt(widthPixels);
|
||||
out.writeInt(heightPixels);
|
||||
out.writeInt(color);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
String gpxAbsolutePath = in.readString();
|
||||
if (gpxAbsolutePath != null) {
|
||||
gpxFile = new File(gpxAbsolutePath);
|
||||
}
|
||||
gpxUri = in.readParcelable(Uri.class.getClassLoader());
|
||||
density = in.readFloat();
|
||||
widthPixels = in.readInt();
|
||||
heightPixels = in.readInt();
|
||||
color = in.readInt();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable GpxColorParams;
|
|
@ -1,66 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
public class GpxColorParams implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
private String gpxColor;
|
||||
|
||||
public GpxColorParams() {
|
||||
|
||||
}
|
||||
|
||||
public GpxColorParams(@NonNull String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public GpxColorParams(@NonNull String fileName, String gpxColor) {
|
||||
this.fileName = fileName;
|
||||
this.gpxColor = gpxColor;
|
||||
}
|
||||
|
||||
public GpxColorParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<GpxColorParams> CREATOR = new
|
||||
Creator<GpxColorParams>() {
|
||||
public GpxColorParams createFromParcel(Parcel in) {
|
||||
return new GpxColorParams(in);
|
||||
}
|
||||
|
||||
public GpxColorParams[] newArray(int size) {
|
||||
return new GpxColorParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public String getGpxColor() {
|
||||
return gpxColor;
|
||||
}
|
||||
|
||||
public void setGpxColor(String gpxColor) {
|
||||
this.gpxColor = gpxColor;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
out.writeString(gpxColor);
|
||||
}
|
||||
|
||||
public void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
gpxColor = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable HideGpxParams;
|
|
@ -1,45 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class HideGpxParams implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public HideGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public HideGpxParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<HideGpxParams> CREATOR = new
|
||||
Creator<HideGpxParams>() {
|
||||
public HideGpxParams createFromParcel(Parcel in) {
|
||||
return new HideGpxParams(in);
|
||||
}
|
||||
|
||||
public HideGpxParams[] newArray(int size) {
|
||||
return new HideGpxParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable ImportGpxParams;
|
|
@ -1,106 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ImportGpxParams implements Parcelable {
|
||||
|
||||
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) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<ImportGpxParams> CREATOR = new
|
||||
Creator<ImportGpxParams>() {
|
||||
public ImportGpxParams createFromParcel(Parcel in) {
|
||||
return new ImportGpxParams(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
if (gpxFile != null) {
|
||||
out.writeString(gpxFile.getAbsolutePath());
|
||||
} else {
|
||||
out.writeString(null);
|
||||
}
|
||||
out.writeParcelable(gpxUri, flags);
|
||||
out.writeString(sourceRawData);
|
||||
out.writeString(destinationPath);
|
||||
out.writeString(color);
|
||||
out.writeByte((byte) (show ? 1 : 0));
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
String gpxAbsolutePath = in.readString();
|
||||
if (gpxAbsolutePath != null) {
|
||||
gpxFile = new File(gpxAbsolutePath);
|
||||
}
|
||||
gpxUri = in.readParcelable(Uri.class.getClassLoader());
|
||||
sourceRawData = in.readString();
|
||||
destinationPath = in.readString();
|
||||
color = in.readString();
|
||||
show = in.readByte() == 1;
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable RemoveGpxParams;
|
|
@ -1,48 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveGpxParams implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public RemoveGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public RemoveGpxParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable ShowGpxParams;
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class ShowGpxParams implements Parcelable {
|
||||
|
||||
private String fileName;
|
||||
|
||||
public ShowGpxParams(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public ShowGpxParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<ShowGpxParams> CREATOR = new
|
||||
Creator<ShowGpxParams>() {
|
||||
public ShowGpxParams createFromParcel(Parcel in) {
|
||||
return new ShowGpxParams(in);
|
||||
}
|
||||
|
||||
public ShowGpxParams[] newArray(int size) {
|
||||
return new ShowGpxParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getFileName() {
|
||||
return fileName;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(fileName);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
fileName = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable StartGpxRecordingParams;
|
|
@ -1,40 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class StartGpxRecordingParams implements Parcelable {
|
||||
|
||||
public StartGpxRecordingParams() {
|
||||
|
||||
}
|
||||
|
||||
public StartGpxRecordingParams(Parcel in) {
|
||||
readFromParcel(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];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
parcelable StopGpxRecordingParams;
|
|
@ -1,40 +0,0 @@
|
|||
package net.osmand.aidl.gpx;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class StopGpxRecordingParams implements Parcelable {
|
||||
|
||||
public StopGpxRecordingParams() {
|
||||
|
||||
}
|
||||
|
||||
public StopGpxRecordingParams(Parcel in) {
|
||||
readFromParcel(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];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.map;
|
||||
|
||||
parcelable ALatLon;
|
|
@ -1,83 +0,0 @@
|
|||
package net.osmand.aidl.map;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class ALatLon implements Parcelable {
|
||||
|
||||
private double longitude;
|
||||
private double latitude;
|
||||
|
||||
public ALatLon(double latitude, double longitude) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
}
|
||||
|
||||
public ALatLon(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<ALatLon> CREATOR = new
|
||||
Parcelable.Creator<ALatLon>() {
|
||||
public ALatLon createFromParcel(Parcel in) {
|
||||
return new ALatLon(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeDouble(latitude);
|
||||
out.writeDouble(longitude);
|
||||
}
|
||||
|
||||
public void readFromParcel(Parcel in) {
|
||||
latitude = in.readDouble();
|
||||
longitude = in.readDouble();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.map;
|
||||
|
||||
parcelable SetMapLocationParams;
|
|
@ -1,68 +0,0 @@
|
|||
package net.osmand.aidl.map;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class SetMapLocationParams implements Parcelable {
|
||||
|
||||
private double latitude;
|
||||
private double longitude;
|
||||
private int zoom;
|
||||
private boolean animated;
|
||||
|
||||
public SetMapLocationParams(double latitude, double longitude, int zoom, boolean animated) {
|
||||
this.latitude = latitude;
|
||||
this.longitude = longitude;
|
||||
this.zoom = zoom;
|
||||
this.animated = animated;
|
||||
}
|
||||
|
||||
public SetMapLocationParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<SetMapLocationParams> CREATOR = new
|
||||
Creator<SetMapLocationParams>() {
|
||||
public SetMapLocationParams createFromParcel(Parcel in) {
|
||||
return new SetMapLocationParams(in);
|
||||
}
|
||||
|
||||
public SetMapLocationParams[] newArray(int size) {
|
||||
return new SetMapLocationParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public double getLatitude() {
|
||||
return latitude;
|
||||
}
|
||||
|
||||
public double getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
||||
public int getZoom() {
|
||||
return zoom;
|
||||
}
|
||||
|
||||
public boolean isAnimated() {
|
||||
return animated;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeDouble(latitude);
|
||||
out.writeDouble(longitude);
|
||||
out.writeInt(zoom);
|
||||
out.writeByte((byte) (animated ? 1 : 0));
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
latitude = in.readDouble();
|
||||
longitude = in.readDouble();
|
||||
zoom = in.readInt();
|
||||
animated = in.readByte() != 0;
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
parcelable AMapLayer;
|
|
@ -1,176 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import net.osmand.aidl.maplayer.point.AMapPoint;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class AMapLayer implements Parcelable {
|
||||
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) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<AMapLayer> CREATOR = new
|
||||
Parcelable.Creator<AMapLayer>() {
|
||||
public AMapLayer createFromParcel(Parcel in) {
|
||||
return new AMapLayer(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(id);
|
||||
out.writeString(name);
|
||||
out.writeFloat(zOrder);
|
||||
out.writeTypedList(new ArrayList<>(points.values()));
|
||||
out.writeByte((byte) (imagePoints ? 1 : 0));
|
||||
out.writeInt(circlePointMinZoom);
|
||||
out.writeInt(circlePointMaxZoom);
|
||||
out.writeInt(smallPointMinZoom);
|
||||
out.writeInt(smallPointMaxZoom);
|
||||
out.writeInt(bigPointMinZoom);
|
||||
out.writeInt(bigPointMaxZoom);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
id = in.readString();
|
||||
name = in.readString();
|
||||
zOrder = in.readFloat();
|
||||
List<AMapPoint> pointList = new ArrayList<>();
|
||||
in.readTypedList(pointList, AMapPoint.CREATOR);
|
||||
for (AMapPoint p : pointList) {
|
||||
this.points.put(p.getId(), p);
|
||||
}
|
||||
imagePoints = in.readByte() == 1;
|
||||
circlePointMinZoom = in.readInt();
|
||||
circlePointMaxZoom = in.readInt();
|
||||
smallPointMinZoom = in.readInt();
|
||||
smallPointMaxZoom = in.readInt();
|
||||
bigPointMinZoom = in.readInt();
|
||||
bigPointMaxZoom = in.readInt();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
parcelable AddMapLayerParams;
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcelable.Creator;
|
||||
|
||||
public class AddMapLayerParams implements Parcelable {
|
||||
private AMapLayer layer;
|
||||
|
||||
public AddMapLayerParams(AMapLayer layer) {
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public AddMapLayerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AddMapLayerParams> CREATOR = new
|
||||
Creator<AddMapLayerParams>() {
|
||||
public AddMapLayerParams createFromParcel(Parcel in) {
|
||||
return new AddMapLayerParams(in);
|
||||
}
|
||||
|
||||
public AddMapLayerParams[] newArray(int size) {
|
||||
return new AddMapLayerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapLayer getLayer() {
|
||||
return layer;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(layer, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layer = in.readParcelable(AMapLayer.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
parcelable RemoveMapLayerParams;
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcelable.Creator;
|
||||
|
||||
public class RemoveMapLayerParams implements Parcelable {
|
||||
private String id;
|
||||
|
||||
public RemoveMapLayerParams(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public RemoveMapLayerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<RemoveMapLayerParams> CREATOR = new
|
||||
Creator<RemoveMapLayerParams>() {
|
||||
public RemoveMapLayerParams createFromParcel(Parcel in) {
|
||||
return new RemoveMapLayerParams(in);
|
||||
}
|
||||
|
||||
public RemoveMapLayerParams[] newArray(int size) {
|
||||
return new RemoveMapLayerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(id);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
id = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
parcelable UpdateMapLayerParams;
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.maplayer;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcelable.Creator;
|
||||
|
||||
public class UpdateMapLayerParams implements Parcelable {
|
||||
private AMapLayer layer;
|
||||
|
||||
public UpdateMapLayerParams(AMapLayer layer) {
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
public UpdateMapLayerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<UpdateMapLayerParams> CREATOR = new
|
||||
Creator<UpdateMapLayerParams>() {
|
||||
public UpdateMapLayerParams createFromParcel(Parcel in) {
|
||||
return new UpdateMapLayerParams(in);
|
||||
}
|
||||
|
||||
public UpdateMapLayerParams[] newArray(int size) {
|
||||
return new UpdateMapLayerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapLayer getLayer() {
|
||||
return layer;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(layer, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layer = in.readParcelable(AMapLayer.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
parcelable AMapPoint;
|
|
@ -1,125 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import net.osmand.aidl.map.ALatLon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AMapPoint implements Parcelable {
|
||||
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 List<String> details = new ArrayList<>();
|
||||
private Map<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) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AMapPoint> CREATOR = new
|
||||
Creator<AMapPoint>() {
|
||||
public AMapPoint createFromParcel(Parcel in) {
|
||||
return new AMapPoint(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(id);
|
||||
out.writeString(shortName);
|
||||
out.writeString(fullName);
|
||||
out.writeString(typeName);
|
||||
out.writeInt(color);
|
||||
out.writeParcelable(location, flags);
|
||||
out.writeStringList(details);
|
||||
out.writeMap(params);
|
||||
out.writeString(layerId);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
id = in.readString();
|
||||
shortName = in.readString();
|
||||
fullName = in.readString();
|
||||
typeName = in.readString();
|
||||
color = in.readInt();
|
||||
location = in.readParcelable(ALatLon.class.getClassLoader());
|
||||
in.readStringList(details);
|
||||
in.readMap(params, HashMap.class.getClassLoader());
|
||||
layerId = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
parcelable AddMapPointParams;
|
|
@ -1,51 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AddMapPointParams implements Parcelable {
|
||||
private String layerId;
|
||||
private AMapPoint point;
|
||||
|
||||
public AddMapPointParams(String layerId, AMapPoint point) {
|
||||
this.layerId = layerId;
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public AddMapPointParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<AddMapPointParams> CREATOR = new
|
||||
Creator<AddMapPointParams>() {
|
||||
public AddMapPointParams createFromParcel(Parcel in) {
|
||||
return new AddMapPointParams(in);
|
||||
}
|
||||
|
||||
public AddMapPointParams[] newArray(int size) {
|
||||
return new AddMapPointParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getLayerId() {
|
||||
return layerId;
|
||||
}
|
||||
|
||||
public AMapPoint getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(layerId);
|
||||
out.writeParcelable(point, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layerId = in.readString();
|
||||
point = in.readParcelable(AMapPoint.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
parcelable RemoveMapPointParams;
|
|
@ -1,51 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveMapPointParams implements Parcelable {
|
||||
private String layerId;
|
||||
private String pointId;
|
||||
|
||||
public RemoveMapPointParams(String layerId, String pointId) {
|
||||
this.layerId = layerId;
|
||||
this.pointId = pointId;
|
||||
}
|
||||
|
||||
public RemoveMapPointParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<RemoveMapPointParams> CREATOR = new
|
||||
Creator<RemoveMapPointParams>() {
|
||||
public RemoveMapPointParams createFromParcel(Parcel in) {
|
||||
return new RemoveMapPointParams(in);
|
||||
}
|
||||
|
||||
public RemoveMapPointParams[] newArray(int size) {
|
||||
return new RemoveMapPointParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getLayerId() {
|
||||
return layerId;
|
||||
}
|
||||
|
||||
public String getPointId() {
|
||||
return pointId;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(layerId);
|
||||
out.writeString(pointId);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layerId = in.readString();
|
||||
pointId = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
parcelable ShowMapPointParams;
|
|
@ -1,56 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class ShowMapPointParams implements Parcelable {
|
||||
|
||||
private String layerId;
|
||||
private AMapPoint point;
|
||||
|
||||
public ShowMapPointParams(String layerId, AMapPoint point) {
|
||||
this.layerId = layerId;
|
||||
this.point = point;
|
||||
}
|
||||
|
||||
public ShowMapPointParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<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 writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(layerId);
|
||||
out.writeParcelable(point, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layerId = in.readString();
|
||||
point = in.readParcelable(AMapPoint.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
parcelable UpdateMapPointParams;
|
|
@ -1,59 +0,0 @@
|
|||
package net.osmand.aidl.maplayer.point;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class UpdateMapPointParams implements Parcelable {
|
||||
private String layerId;
|
||||
private AMapPoint point;
|
||||
private boolean updateOpenedMenuAndMap;
|
||||
|
||||
public UpdateMapPointParams(String layerId, AMapPoint point, boolean updateOpenedMenuAndMap) {
|
||||
this.layerId = layerId;
|
||||
this.point = point;
|
||||
this.updateOpenedMenuAndMap = updateOpenedMenuAndMap;
|
||||
}
|
||||
|
||||
public UpdateMapPointParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<UpdateMapPointParams> CREATOR = new
|
||||
Creator<UpdateMapPointParams>() {
|
||||
public UpdateMapPointParams createFromParcel(Parcel in) {
|
||||
return new UpdateMapPointParams(in);
|
||||
}
|
||||
|
||||
public UpdateMapPointParams[] newArray(int size) {
|
||||
return new UpdateMapPointParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getLayerId() {
|
||||
return layerId;
|
||||
}
|
||||
|
||||
public AMapPoint getPoint() {
|
||||
return point;
|
||||
}
|
||||
|
||||
public boolean isUpdateOpenedMenuAndMap() {
|
||||
return updateOpenedMenuAndMap;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(layerId);
|
||||
out.writeParcelable(point, flags);
|
||||
out.writeInt(updateOpenedMenuAndMap ? 1 : 0);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
layerId = in.readString();
|
||||
point = in.readParcelable(AMapPoint.class.getClassLoader());
|
||||
updateOpenedMenuAndMap = in.readInt() != 0;
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
parcelable AMapMarker;
|
|
@ -1,63 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import net.osmand.aidl.map.ALatLon;
|
||||
|
||||
public class AMapMarker implements Parcelable {
|
||||
|
||||
private ALatLon latLon;
|
||||
private String name;
|
||||
|
||||
public AMapMarker(ALatLon latLon, String name) {
|
||||
|
||||
if (latLon == null) {
|
||||
throw new IllegalArgumentException("latLon cannot be null");
|
||||
}
|
||||
|
||||
if (name == null) {
|
||||
name = "";
|
||||
}
|
||||
|
||||
this.latLon = latLon;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public AMapMarker(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<AMapMarker> CREATOR = new
|
||||
Parcelable.Creator<AMapMarker>() {
|
||||
public AMapMarker createFromParcel(Parcel in) {
|
||||
return new AMapMarker(in);
|
||||
}
|
||||
|
||||
public AMapMarker[] newArray(int size) {
|
||||
return new AMapMarker[size];
|
||||
}
|
||||
};
|
||||
|
||||
public ALatLon getLatLon() {
|
||||
return latLon;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(latLon, flags);
|
||||
out.writeString(name);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
latLon = in.readParcelable(ALatLon.class.getClassLoader());
|
||||
name = in.readString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
parcelable AddMapMarkerParams;
|
|
@ -1,44 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AddMapMarkerParams implements Parcelable {
|
||||
|
||||
private AMapMarker marker;
|
||||
|
||||
public AddMapMarkerParams(AMapMarker marker) {
|
||||
this.marker = marker;
|
||||
}
|
||||
|
||||
public AddMapMarkerParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<AddMapMarkerParams> CREATOR = new
|
||||
Parcelable.Creator<AddMapMarkerParams>() {
|
||||
public AddMapMarkerParams createFromParcel(Parcel in) {
|
||||
return new AddMapMarkerParams(in);
|
||||
}
|
||||
|
||||
public AddMapMarkerParams[] newArray(int size) {
|
||||
return new AddMapMarkerParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
public AMapMarker getMarker() {
|
||||
return marker;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeParcelable(marker, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
marker = in.readParcelable(AMapMarker.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkerParams;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
parcelable RemoveMapMarkersParams;
|
|
@ -1,37 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class RemoveMapMarkersParams implements Parcelable {
|
||||
|
||||
|
||||
public RemoveMapMarkersParams() {
|
||||
}
|
||||
|
||||
public RemoveMapMarkersParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<RemoveMapMarkersParams> CREATOR = new
|
||||
Creator<RemoveMapMarkersParams>() {
|
||||
public RemoveMapMarkersParams createFromParcel(Parcel in) {
|
||||
return new RemoveMapMarkersParams(in);
|
||||
}
|
||||
|
||||
public RemoveMapMarkersParams[] newArray(int size) {
|
||||
return new RemoveMapMarkersParams[size];
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapmarker;
|
||||
|
||||
parcelable UpdateMapMarkerParams;
|
|
@ -1,3 +0,0 @@
|
|||
package net.osmand.aidl.mapwidget;
|
||||
|
||||
parcelable AMapWidget;
|
|
@ -1,110 +0,0 @@
|
|||
package net.osmand.aidl.mapwidget;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
public class AMapWidget implements Parcelable {
|
||||
private String id;
|
||||
private String menuIconName;
|
||||
private String menuTitle;
|
||||
private String lightIconName;
|
||||
private String darkIconName;
|
||||
private String text;
|
||||
private String description;
|
||||
private int order;
|
||||
private Intent intentOnClick;
|
||||
|
||||
public AMapWidget(String id, String menuIconName, String menuTitle,
|
||||
String lightIconName, String darkIconName, String text, String description,
|
||||
int order, Intent intentOnClick) {
|
||||
this.id = id;
|
||||
this.menuIconName = menuIconName;
|
||||
this.menuTitle = menuTitle;
|
||||
this.lightIconName = lightIconName;
|
||||
this.darkIconName = darkIconName;
|
||||
this.text = text;
|
||||
this.description = description;
|
||||
this.order = order;
|
||||
this.intentOnClick = intentOnClick;
|
||||
}
|
||||
|
||||
public AMapWidget(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<AMapWidget> CREATOR = new
|
||||
Parcelable.Creator<AMapWidget>() {
|
||||
public AMapWidget createFromParcel(Parcel in) {
|
||||
return new AMapWidget(in);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeString(id);
|
||||
out.writeString(menuIconName);
|
||||
out.writeString(menuTitle);
|
||||
out.writeString(lightIconName);
|
||||
out.writeString(darkIconName);
|
||||
out.writeString(text);
|
||||
out.writeString(description);
|
||||
out.writeInt(order);
|
||||
out.writeParcelable(intentOnClick, flags);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
id = in.readString();
|
||||
menuIconName = in.readString();
|
||||
menuTitle = in.readString();
|
||||
lightIconName = in.readString();
|
||||
darkIconName = in.readString();
|
||||
text = in.readString();
|
||||
description = in.readString();
|
||||
order = in.readInt();
|
||||
intentOnClick = in.readParcelable(Intent.class.getClassLoader());
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue