Remove old api from library
This commit is contained in:
parent
e2356d05da
commit
46c443255c
397 changed files with 699 additions and 703 deletions
|
@ -7,44 +7,44 @@ import android.content.ServiceConnection
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.os.RemoteException
|
import android.os.RemoteException
|
||||||
import net.osmand.aidl2.IOsmAndAidlCallback
|
import net.osmand.aidlapi.IOsmAndAidlCallback
|
||||||
import net.osmand.aidl2.IOsmAndAidlInterface
|
import net.osmand.aidlapi.IOsmAndAidlInterface
|
||||||
import net.osmand.aidl2.contextmenu.AContextMenuButton
|
import net.osmand.aidlapi.contextmenu.AContextMenuButton
|
||||||
import net.osmand.aidl2.contextmenu.ContextMenuButtonsParams
|
import net.osmand.aidlapi.contextmenu.ContextMenuButtonsParams
|
||||||
import net.osmand.aidl2.contextmenu.RemoveContextMenuButtonsParams
|
import net.osmand.aidlapi.contextmenu.RemoveContextMenuButtonsParams
|
||||||
import net.osmand.aidl2.favorite.AFavorite
|
import net.osmand.aidlapi.favorite.AFavorite
|
||||||
import net.osmand.aidl2.favorite.AddFavoriteParams
|
import net.osmand.aidlapi.favorite.AddFavoriteParams
|
||||||
import net.osmand.aidl2.favorite.RemoveFavoriteParams
|
import net.osmand.aidlapi.favorite.RemoveFavoriteParams
|
||||||
import net.osmand.aidl2.favorite.UpdateFavoriteParams
|
import net.osmand.aidlapi.favorite.UpdateFavoriteParams
|
||||||
import net.osmand.aidl2.favorite.group.AFavoriteGroup
|
import net.osmand.aidlapi.favorite.group.AFavoriteGroup
|
||||||
import net.osmand.aidl2.favorite.group.AddFavoriteGroupParams
|
import net.osmand.aidlapi.favorite.group.AddFavoriteGroupParams
|
||||||
import net.osmand.aidl2.favorite.group.RemoveFavoriteGroupParams
|
import net.osmand.aidlapi.favorite.group.RemoveFavoriteGroupParams
|
||||||
import net.osmand.aidl2.favorite.group.UpdateFavoriteGroupParams
|
import net.osmand.aidlapi.favorite.group.UpdateFavoriteGroupParams
|
||||||
import net.osmand.aidl2.gpx.*
|
import net.osmand.aidlapi.gpx.*
|
||||||
import net.osmand.aidl2.map.ALatLon
|
import net.osmand.aidlapi.map.ALatLon
|
||||||
import net.osmand.aidl2.map.SetMapLocationParams
|
import net.osmand.aidlapi.map.SetMapLocationParams
|
||||||
import net.osmand.aidl2.maplayer.AMapLayer
|
import net.osmand.aidlapi.maplayer.AMapLayer
|
||||||
import net.osmand.aidl2.maplayer.AddMapLayerParams
|
import net.osmand.aidlapi.maplayer.AddMapLayerParams
|
||||||
import net.osmand.aidl2.maplayer.RemoveMapLayerParams
|
import net.osmand.aidlapi.maplayer.RemoveMapLayerParams
|
||||||
import net.osmand.aidl2.maplayer.UpdateMapLayerParams
|
import net.osmand.aidlapi.maplayer.UpdateMapLayerParams
|
||||||
import net.osmand.aidl2.maplayer.point.*
|
import net.osmand.aidlapi.maplayer.point.*
|
||||||
import net.osmand.aidl2.mapmarker.AMapMarker
|
import net.osmand.aidlapi.mapmarker.AMapMarker
|
||||||
import net.osmand.aidl2.mapmarker.AddMapMarkerParams
|
import net.osmand.aidlapi.mapmarker.AddMapMarkerParams
|
||||||
import net.osmand.aidl2.mapmarker.RemoveMapMarkerParams
|
import net.osmand.aidlapi.mapmarker.RemoveMapMarkerParams
|
||||||
import net.osmand.aidl2.mapmarker.UpdateMapMarkerParams
|
import net.osmand.aidlapi.mapmarker.UpdateMapMarkerParams
|
||||||
import net.osmand.aidl2.mapwidget.AMapWidget
|
import net.osmand.aidlapi.mapwidget.AMapWidget
|
||||||
import net.osmand.aidl2.mapwidget.AddMapWidgetParams
|
import net.osmand.aidlapi.mapwidget.AddMapWidgetParams
|
||||||
import net.osmand.aidl2.mapwidget.RemoveMapWidgetParams
|
import net.osmand.aidlapi.mapwidget.RemoveMapWidgetParams
|
||||||
import net.osmand.aidl2.mapwidget.UpdateMapWidgetParams
|
import net.osmand.aidlapi.mapwidget.UpdateMapWidgetParams
|
||||||
import net.osmand.aidl2.navdrawer.NavDrawerItem
|
import net.osmand.aidlapi.navdrawer.NavDrawerItem
|
||||||
import net.osmand.aidl2.navdrawer.SetNavDrawerItemsParams
|
import net.osmand.aidlapi.navdrawer.SetNavDrawerItemsParams
|
||||||
import net.osmand.aidl2.navigation.*
|
import net.osmand.aidlapi.navigation.*
|
||||||
import net.osmand.aidl2.note.StartAudioRecordingParams
|
import net.osmand.aidlapi.note.StartAudioRecordingParams
|
||||||
import net.osmand.aidl2.note.StartVideoRecordingParams
|
import net.osmand.aidlapi.note.StartVideoRecordingParams
|
||||||
import net.osmand.aidl2.note.StopRecordingParams
|
import net.osmand.aidlapi.note.StopRecordingParams
|
||||||
import net.osmand.aidl2.note.TakePhotoNoteParams
|
import net.osmand.aidlapi.note.TakePhotoNoteParams
|
||||||
import net.osmand.aidl2.search.SearchParams
|
import net.osmand.aidlapi.search.SearchParams
|
||||||
import net.osmand.aidl2.search.SearchResult
|
import net.osmand.aidlapi.search.SearchResult
|
||||||
import net.osmand.telegram.TelegramApplication
|
import net.osmand.telegram.TelegramApplication
|
||||||
import net.osmand.telegram.helpers.ShowLocationHelper.Companion.MAP_LAYER_ID
|
import net.osmand.telegram.helpers.ShowLocationHelper.Companion.MAP_LAYER_ID
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
|
@ -6,10 +6,10 @@ import android.os.AsyncTask
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import net.osmand.GPXUtilities
|
import net.osmand.GPXUtilities
|
||||||
import net.osmand.PlatformUtil
|
import net.osmand.PlatformUtil
|
||||||
import net.osmand.aidl2.gpx.AGpxFile
|
import net.osmand.aidlapi.gpx.AGpxFile
|
||||||
import net.osmand.aidl2.map.ALatLon
|
import net.osmand.aidlapi.map.ALatLon
|
||||||
import net.osmand.aidl2.maplayer.point.AMapPoint
|
import net.osmand.aidlapi.maplayer.point.AMapPoint
|
||||||
import net.osmand.aidl2.mapmarker.AMapMarker
|
import net.osmand.aidlapi.mapmarker.AMapMarker
|
||||||
import net.osmand.telegram.R
|
import net.osmand.telegram.R
|
||||||
import net.osmand.telegram.TelegramApplication
|
import net.osmand.telegram.TelegramApplication
|
||||||
import net.osmand.telegram.helpers.OsmandAidlHelper.ContextMenuButtonsListener
|
import net.osmand.telegram.helpers.OsmandAidlHelper.ContextMenuButtonsListener
|
||||||
|
|
|
@ -24,7 +24,7 @@ import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import net.osmand.GPXUtilities
|
import net.osmand.GPXUtilities
|
||||||
import net.osmand.PlatformUtil
|
import net.osmand.PlatformUtil
|
||||||
import net.osmand.aidl2.gpx.AGpxBitmap
|
import net.osmand.aidlapi.gpx.AGpxBitmap
|
||||||
import net.osmand.telegram.R
|
import net.osmand.telegram.R
|
||||||
import net.osmand.telegram.TelegramApplication
|
import net.osmand.telegram.TelegramApplication
|
||||||
import net.osmand.telegram.TelegramSettings
|
import net.osmand.telegram.TelegramSettings
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package net.osmand.aidl;
|
package net.osmand.aidl;
|
||||||
|
|
||||||
import net.osmand.aidl2.IOsmAndAidlCallback;
|
import net.osmand.aidlapi.IOsmAndAidlCallback;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ public class AidlContextMenuButtonWrapper {
|
||||||
enabled = aContextMenuButton.isEnabled();
|
enabled = aContextMenuButton.isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AidlContextMenuButtonWrapper(net.osmand.aidl2.contextmenu.AContextMenuButton aContextMenuButton) {
|
public AidlContextMenuButtonWrapper(net.osmand.aidlapi.contextmenu.AContextMenuButton aContextMenuButton) {
|
||||||
buttonId = aContextMenuButton.getButtonId();
|
buttonId = aContextMenuButton.getButtonId();
|
||||||
leftTextCaption = aContextMenuButton.getLeftTextCaption();
|
leftTextCaption = aContextMenuButton.getLeftTextCaption();
|
||||||
rightTextCaption = aContextMenuButton.getRightTextCaption();
|
rightTextCaption = aContextMenuButton.getRightTextCaption();
|
||||||
|
|
|
@ -35,15 +35,15 @@ public class AidlContextMenuButtonsWrapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AidlContextMenuButtonsWrapper(net.osmand.aidl2.contextmenu.ContextMenuButtonsParams params) {
|
public AidlContextMenuButtonsWrapper(net.osmand.aidlapi.contextmenu.ContextMenuButtonsParams params) {
|
||||||
id = params.getId();
|
id = params.getId();
|
||||||
appPackage = params.getAppPackage();
|
appPackage = params.getAppPackage();
|
||||||
layerId = params.getLayerId();
|
layerId = params.getLayerId();
|
||||||
callbackId = params.getCallbackId();
|
callbackId = params.getCallbackId();
|
||||||
pointsIds = params.getPointsIds();
|
pointsIds = params.getPointsIds();
|
||||||
|
|
||||||
net.osmand.aidl2.contextmenu.AContextMenuButton leftButton = params.getLeftButton();
|
net.osmand.aidlapi.contextmenu.AContextMenuButton leftButton = params.getLeftButton();
|
||||||
net.osmand.aidl2.contextmenu.AContextMenuButton rightButton = params.getRightButton();
|
net.osmand.aidlapi.contextmenu.AContextMenuButton rightButton = params.getRightButton();
|
||||||
if (leftButton != null) {
|
if (leftButton != null) {
|
||||||
this.leftButton = new AidlContextMenuButtonWrapper(leftButton);
|
this.leftButton = new AidlContextMenuButtonWrapper(leftButton);
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class AidlMapLayerWrapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public AidlMapLayerWrapper(net.osmand.aidl2.maplayer.AMapLayer aMapLayer) {
|
public AidlMapLayerWrapper(net.osmand.aidlapi.maplayer.AMapLayer aMapLayer) {
|
||||||
id = aMapLayer.getId();
|
id = aMapLayer.getId();
|
||||||
name = aMapLayer.getName();
|
name = aMapLayer.getName();
|
||||||
zOrder = aMapLayer.getZOrder();
|
zOrder = aMapLayer.getZOrder();
|
||||||
|
@ -55,9 +55,9 @@ public class AidlMapLayerWrapper {
|
||||||
bigPointMinZoom = aMapLayer.getBigPointMinZoom();
|
bigPointMinZoom = aMapLayer.getBigPointMinZoom();
|
||||||
bigPointMaxZoom = aMapLayer.getBigPointMaxZoom();
|
bigPointMaxZoom = aMapLayer.getBigPointMaxZoom();
|
||||||
|
|
||||||
List<net.osmand.aidl2.maplayer.point.AMapPoint> pointList = aMapLayer.getPoints();
|
List<net.osmand.aidlapi.maplayer.point.AMapPoint> pointList = aMapLayer.getPoints();
|
||||||
if (pointList != null) {
|
if (pointList != null) {
|
||||||
for (net.osmand.aidl2.maplayer.point.AMapPoint p : pointList) {
|
for (net.osmand.aidlapi.maplayer.point.AMapPoint p : pointList) {
|
||||||
this.points.put(p.getId(), new AidlMapPointWrapper(p));
|
this.points.put(p.getId(), new AidlMapPointWrapper(p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class AidlMapPointWrapper {
|
||||||
params = aMapPoint.getParams();
|
params = aMapPoint.getParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AidlMapPointWrapper(net.osmand.aidl2.maplayer.point.AMapPoint aMapPoint) {
|
public AidlMapPointWrapper(net.osmand.aidlapi.maplayer.point.AMapPoint aMapPoint) {
|
||||||
id = aMapPoint.getId();
|
id = aMapPoint.getId();
|
||||||
shortName = aMapPoint.getShortName();
|
shortName = aMapPoint.getShortName();
|
||||||
fullName = aMapPoint.getFullName();
|
fullName = aMapPoint.getFullName();
|
||||||
|
@ -41,7 +41,7 @@ public class AidlMapPointWrapper {
|
||||||
layerId = aMapPoint.getLayerId();
|
layerId = aMapPoint.getLayerId();
|
||||||
color = aMapPoint.getColor();
|
color = aMapPoint.getColor();
|
||||||
|
|
||||||
net.osmand.aidl2.map.ALatLon aLatLon = aMapPoint.getLocation();
|
net.osmand.aidlapi.map.ALatLon aLatLon = aMapPoint.getLocation();
|
||||||
location = new LatLon(aLatLon.getLatitude(), aLatLon.getLongitude());
|
location = new LatLon(aLatLon.getLatitude(), aLatLon.getLongitude());
|
||||||
details = aMapPoint.getDetails();
|
details = aMapPoint.getDetails();
|
||||||
params = aMapPoint.getParams();
|
params = aMapPoint.getParams();
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class AidlMapWidgetWrapper {
|
||||||
this.intentOnClick = aMapWidget.getIntentOnClick();
|
this.intentOnClick = aMapWidget.getIntentOnClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
public AidlMapWidgetWrapper(net.osmand.aidl2.mapwidget.AMapWidget aMapWidget) {
|
public AidlMapWidgetWrapper(net.osmand.aidlapi.mapwidget.AMapWidget aMapWidget) {
|
||||||
this.id = aMapWidget.getId();
|
this.id = aMapWidget.getId();
|
||||||
this.menuIconName = aMapWidget.getMenuIconName();
|
this.menuIconName = aMapWidget.getMenuIconName();
|
||||||
this.menuTitle = aMapWidget.getMenuTitle();
|
this.menuTitle = aMapWidget.getMenuTitle();
|
||||||
|
|
|
@ -101,14 +101,14 @@ import java.util.Map;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_IO_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_IO_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_MAX_LOCK_TIME_MS;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_MAX_LOCK_TIME_MS;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_PARAMS_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_PARAMS_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_PART_SIZE_LIMIT;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_PART_SIZE_LIMIT;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_PART_SIZE_LIMIT_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_PART_SIZE_LIMIT_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_UNSUPPORTED_FILE_TYPE_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_UNSUPPORTED_FILE_TYPE_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.COPY_FILE_WRITE_LOCK_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.COPY_FILE_WRITE_LOCK_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.OK_RESPONSE;
|
import static net.osmand.aidlapi.OsmandAidlConstants.OK_RESPONSE;
|
||||||
import static net.osmand.aidl.OsmandAidlService.KEY_ON_CONTEXT_MENU_BUTTONS_CLICK;
|
import static net.osmand.aidl.OsmandAidlService.KEY_ON_CONTEXT_MENU_BUTTONS_CLICK;
|
||||||
import static net.osmand.aidl.OsmandAidlService.KEY_ON_NAV_DATA_UPDATE;
|
import static net.osmand.aidl.OsmandAidlService.KEY_ON_NAV_DATA_UPDATE;
|
||||||
import static net.osmand.aidl.OsmandAidlService.KEY_ON_VOICE_MESSAGE;
|
import static net.osmand.aidl.OsmandAidlService.KEY_ON_VOICE_MESSAGE;
|
||||||
|
@ -1414,7 +1414,7 @@ public class OsmandAidlApi {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean getActiveGpxV2(List<net.osmand.aidl2.gpx.ASelectedGpxFile> files) {
|
boolean getActiveGpxV2(List<net.osmand.aidlapi.gpx.ASelectedGpxFile> files) {
|
||||||
List<SelectedGpxFile> selectedGpxFiles = app.getSelectedGpxHelper().getSelectedGPXFiles();
|
List<SelectedGpxFile> selectedGpxFiles = app.getSelectedGpxHelper().getSelectedGPXFiles();
|
||||||
String gpxPath = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath();
|
String gpxPath = app.getAppPath(IndexConstants.GPX_INDEX_DIR).getAbsolutePath();
|
||||||
for (SelectedGpxFile selectedGpxFile : selectedGpxFiles) {
|
for (SelectedGpxFile selectedGpxFile : selectedGpxFiles) {
|
||||||
|
@ -1426,13 +1426,13 @@ public class OsmandAidlApi {
|
||||||
}
|
}
|
||||||
long modifiedTime = gpxFile.modifiedTime;
|
long modifiedTime = gpxFile.modifiedTime;
|
||||||
long fileSize = new File(gpxFile.path).length();
|
long fileSize = new File(gpxFile.path).length();
|
||||||
files.add(new net.osmand.aidl2.gpx.ASelectedGpxFile(path, modifiedTime, fileSize, createGpxFileDetailsV2(selectedGpxFile.getTrackAnalysis())));
|
files.add(new net.osmand.aidlapi.gpx.ASelectedGpxFile(path, modifiedTime, fileSize, createGpxFileDetailsV2(selectedGpxFile.getTrackAnalysis())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean getImportedGpxV2(List<net.osmand.aidl2.gpx.AGpxFile> files) {
|
boolean getImportedGpxV2(List<net.osmand.aidlapi.gpx.AGpxFile> files) {
|
||||||
List<GpxDataItem> gpxDataItems = app.getGpxDatabase().getItems();
|
List<GpxDataItem> gpxDataItems = app.getGpxDatabase().getItems();
|
||||||
for (GpxDataItem dataItem : gpxDataItems) {
|
for (GpxDataItem dataItem : gpxDataItems) {
|
||||||
File file = dataItem.getFile();
|
File file = dataItem.getFile();
|
||||||
|
@ -1441,12 +1441,12 @@ public class OsmandAidlApi {
|
||||||
boolean active = app.getSelectedGpxHelper().getSelectedFileByPath(file.getAbsolutePath()) != null;
|
boolean active = app.getSelectedGpxHelper().getSelectedFileByPath(file.getAbsolutePath()) != null;
|
||||||
long modifiedTime = dataItem.getFileLastModifiedTime();
|
long modifiedTime = dataItem.getFileLastModifiedTime();
|
||||||
long fileSize = file.length();
|
long fileSize = file.length();
|
||||||
net.osmand.aidl2.gpx.AGpxFileDetails details = null;
|
net.osmand.aidlapi.gpx.AGpxFileDetails details = null;
|
||||||
GPXTrackAnalysis analysis = dataItem.getAnalysis();
|
GPXTrackAnalysis analysis = dataItem.getAnalysis();
|
||||||
if (analysis != null) {
|
if (analysis != null) {
|
||||||
details = createGpxFileDetailsV2(analysis);
|
details = createGpxFileDetailsV2(analysis);
|
||||||
}
|
}
|
||||||
files.add(new net.osmand.aidl2.gpx.AGpxFile(fileName, modifiedTime, fileSize, active, details));
|
files.add(new net.osmand.aidlapi.gpx.AGpxFile(fileName, modifiedTime, fileSize, active, details));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1524,7 +1524,7 @@ public class OsmandAidlApi {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getSqliteDbFilesV2(List<net.osmand.aidl2.tiles.ASqliteDbFile> fileNames, boolean activeOnly) {
|
private boolean getSqliteDbFilesV2(List<net.osmand.aidlapi.tiles.ASqliteDbFile> fileNames, boolean activeOnly) {
|
||||||
File tilesPath = app.getAppPath(IndexConstants.TILES_INDEX_DIR);
|
File tilesPath = app.getAppPath(IndexConstants.TILES_INDEX_DIR);
|
||||||
if (tilesPath.canRead()) {
|
if (tilesPath.canRead()) {
|
||||||
File[] files = tilesPath.listFiles();
|
File[] files = tilesPath.listFiles();
|
||||||
|
@ -1536,7 +1536,7 @@ public class OsmandAidlApi {
|
||||||
if (tileFile.isFile() && !fileNameLC.startsWith("hillshade") && fileNameLC.endsWith(SQLiteTileSource.EXT)) {
|
if (tileFile.isFile() && !fileNameLC.startsWith("hillshade") && fileNameLC.endsWith(SQLiteTileSource.EXT)) {
|
||||||
boolean active = fileName.equals(activeFile);
|
boolean active = fileName.equals(activeFile);
|
||||||
if (!activeOnly || active) {
|
if (!activeOnly || active) {
|
||||||
fileNames.add(new net.osmand.aidl2.tiles.ASqliteDbFile(fileName, tileFile.lastModified(), tileFile.length(), active));
|
fileNames.add(new net.osmand.aidlapi.tiles.ASqliteDbFile(fileName, tileFile.lastModified(), tileFile.length(), active));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1553,11 +1553,11 @@ public class OsmandAidlApi {
|
||||||
return getSqliteDbFiles(fileNames, true);
|
return getSqliteDbFiles(fileNames, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean getSqliteDbFilesV2(List<net.osmand.aidl2.tiles.ASqliteDbFile> fileNames) {
|
boolean getSqliteDbFilesV2(List<net.osmand.aidlapi.tiles.ASqliteDbFile> fileNames) {
|
||||||
return getSqliteDbFilesV2(fileNames, false);
|
return getSqliteDbFilesV2(fileNames, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean getActiveSqliteDbFilesV2(List<net.osmand.aidl2.tiles.ASqliteDbFile> fileNames) {
|
boolean getActiveSqliteDbFilesV2(List<net.osmand.aidlapi.tiles.ASqliteDbFile> fileNames) {
|
||||||
return getSqliteDbFilesV2(fileNames, true);
|
return getSqliteDbFilesV2(fileNames, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1972,7 +1972,7 @@ public class OsmandAidlApi {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (aidlCallbackListenerV2 != null) {
|
if (aidlCallbackListenerV2 != null) {
|
||||||
net.osmand.aidl2.navigation.ADirectionInfo directionInfo = new net.osmand.aidl2.navigation.ADirectionInfo(-1, -1, false);
|
net.osmand.aidlapi.navigation.ADirectionInfo directionInfo = new net.osmand.aidlapi.navigation.ADirectionInfo(-1, -1, false);
|
||||||
RoutingHelper rh = app.getRoutingHelper();
|
RoutingHelper rh = app.getRoutingHelper();
|
||||||
if (rh.isDeviatedFromRoute()) {
|
if (rh.isDeviatedFromRoute()) {
|
||||||
directionInfo.setTurnType(TurnType.OFFR);
|
directionInfo.setTurnType(TurnType.OFFR);
|
||||||
|
@ -2024,7 +2024,7 @@ public class OsmandAidlApi {
|
||||||
for (OsmandAidlServiceV2.AidlCallbackParams cb : aidlCallbackListenerV2.getAidlCallbacks().values()) {
|
for (OsmandAidlServiceV2.AidlCallbackParams cb : aidlCallbackListenerV2.getAidlCallbacks().values()) {
|
||||||
if (!aidlCallbackListenerV2.getAidlCallbacks().isEmpty() && (cb.getKey() & KEY_ON_VOICE_MESSAGE) > 0) {
|
if (!aidlCallbackListenerV2.getAidlCallbacks().isEmpty() && (cb.getKey() & KEY_ON_VOICE_MESSAGE) > 0) {
|
||||||
try {
|
try {
|
||||||
cb.getCallback().onVoiceRouterNotify(new net.osmand.aidl2.navigation.OnVoiceNavigationParams(cmds, played));
|
cb.getCallback().onVoiceRouterNotify(new net.osmand.aidlapi.navigation.OnVoiceNavigationParams(cmds, played));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error(e.getMessage(), e);
|
LOG.error(e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
@ -2326,8 +2326,8 @@ public class OsmandAidlApi {
|
||||||
a.points, a.wptPoints, a.wptCategoryNames);
|
a.points, a.wptPoints, a.wptCategoryNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static net.osmand.aidl2.gpx.AGpxFileDetails createGpxFileDetailsV2(@NonNull GPXTrackAnalysis a) {
|
private static net.osmand.aidlapi.gpx.AGpxFileDetails createGpxFileDetailsV2(@NonNull GPXTrackAnalysis a) {
|
||||||
return new net.osmand.aidl2.gpx.AGpxFileDetails(a.totalDistance, a.totalTracks, a.startTime, a.endTime,
|
return new net.osmand.aidlapi.gpx.AGpxFileDetails(a.totalDistance, a.totalTracks, a.startTime, a.endTime,
|
||||||
a.timeSpan, a.timeMoving, a.totalDistanceMoving, a.diffElevationUp, a.diffElevationDown,
|
a.timeSpan, a.timeMoving, a.totalDistanceMoving, a.diffElevationUp, a.diffElevationDown,
|
||||||
a.avgElevation, a.minElevation, a.maxElevation, a.minSpeed, a.maxSpeed, a.avgSpeed,
|
a.avgElevation, a.minElevation, a.maxElevation, a.minSpeed, a.maxSpeed, a.avgSpeed,
|
||||||
a.points, a.wptPoints, a.wptCategoryNames);
|
a.points, a.wptPoints, a.wptCategoryNames);
|
||||||
|
|
|
@ -94,10 +94,10 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
import static net.osmand.OsmandAidlConstants.CANNOT_ACCESS_API_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.CANNOT_ACCESS_API_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.MIN_UPDATE_TIME_MS;
|
import static net.osmand.aidlapi.OsmandAidlConstants.MIN_UPDATE_TIME_MS;
|
||||||
import static net.osmand.OsmandAidlConstants.MIN_UPDATE_TIME_MS_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.MIN_UPDATE_TIME_MS_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.UNKNOWN_API_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.UNKNOWN_API_ERROR;
|
||||||
|
|
||||||
public class OsmandAidlService extends Service implements AidlCallbackListener {
|
public class OsmandAidlService extends Service implements AidlCallbackListener {
|
||||||
|
|
||||||
|
|
|
@ -14,75 +14,75 @@ import net.osmand.PlatformUtil;
|
||||||
import net.osmand.aidl.OsmandAidlApi.GpxBitmapCreatedCallback;
|
import net.osmand.aidl.OsmandAidlApi.GpxBitmapCreatedCallback;
|
||||||
import net.osmand.aidl.OsmandAidlApi.OsmandAppInitCallback;
|
import net.osmand.aidl.OsmandAidlApi.OsmandAppInitCallback;
|
||||||
import net.osmand.aidl.OsmandAidlApi.SearchCompleteCallback;
|
import net.osmand.aidl.OsmandAidlApi.SearchCompleteCallback;
|
||||||
import net.osmand.aidl2.IOsmAndAidlCallback;
|
import net.osmand.aidlapi.IOsmAndAidlCallback;
|
||||||
import net.osmand.aidl2.IOsmAndAidlInterface;
|
import net.osmand.aidlapi.IOsmAndAidlInterface;
|
||||||
import net.osmand.aidl2.calculateroute.CalculateRouteParams;
|
import net.osmand.aidlapi.calculateroute.CalculateRouteParams;
|
||||||
import net.osmand.aidl2.contextmenu.ContextMenuButtonsParams;
|
import net.osmand.aidlapi.contextmenu.ContextMenuButtonsParams;
|
||||||
import net.osmand.aidl2.contextmenu.RemoveContextMenuButtonsParams;
|
import net.osmand.aidlapi.contextmenu.RemoveContextMenuButtonsParams;
|
||||||
import net.osmand.aidl2.contextmenu.UpdateContextMenuButtonsParams;
|
import net.osmand.aidlapi.contextmenu.UpdateContextMenuButtonsParams;
|
||||||
import net.osmand.aidl2.copyfile.CopyFileParams;
|
import net.osmand.aidlapi.copyfile.CopyFileParams;
|
||||||
import net.osmand.aidl2.customization.CustomizationInfoParams;
|
import net.osmand.aidlapi.customization.CustomizationInfoParams;
|
||||||
import net.osmand.aidl2.customization.OsmandSettingsInfoParams;
|
import net.osmand.aidlapi.customization.OsmandSettingsInfoParams;
|
||||||
import net.osmand.aidl2.customization.OsmandSettingsParams;
|
import net.osmand.aidlapi.customization.OsmandSettingsParams;
|
||||||
import net.osmand.aidl2.customization.SetWidgetsParams;
|
import net.osmand.aidlapi.customization.SetWidgetsParams;
|
||||||
import net.osmand.aidl2.favorite.AFavorite;
|
import net.osmand.aidlapi.favorite.AFavorite;
|
||||||
import net.osmand.aidl2.favorite.AddFavoriteParams;
|
import net.osmand.aidlapi.favorite.AddFavoriteParams;
|
||||||
import net.osmand.aidl2.favorite.RemoveFavoriteParams;
|
import net.osmand.aidlapi.favorite.RemoveFavoriteParams;
|
||||||
import net.osmand.aidl2.favorite.UpdateFavoriteParams;
|
import net.osmand.aidlapi.favorite.UpdateFavoriteParams;
|
||||||
import net.osmand.aidl2.favorite.group.AFavoriteGroup;
|
import net.osmand.aidlapi.favorite.group.AFavoriteGroup;
|
||||||
import net.osmand.aidl2.favorite.group.AddFavoriteGroupParams;
|
import net.osmand.aidlapi.favorite.group.AddFavoriteGroupParams;
|
||||||
import net.osmand.aidl2.favorite.group.RemoveFavoriteGroupParams;
|
import net.osmand.aidlapi.favorite.group.RemoveFavoriteGroupParams;
|
||||||
import net.osmand.aidl2.favorite.group.UpdateFavoriteGroupParams;
|
import net.osmand.aidlapi.favorite.group.UpdateFavoriteGroupParams;
|
||||||
import net.osmand.aidl2.gpx.AGpxBitmap;
|
import net.osmand.aidlapi.gpx.AGpxBitmap;
|
||||||
import net.osmand.aidl2.gpx.AGpxFile;
|
import net.osmand.aidlapi.gpx.AGpxFile;
|
||||||
import net.osmand.aidl2.gpx.ASelectedGpxFile;
|
import net.osmand.aidlapi.gpx.ASelectedGpxFile;
|
||||||
import net.osmand.aidl2.gpx.CreateGpxBitmapParams;
|
import net.osmand.aidlapi.gpx.CreateGpxBitmapParams;
|
||||||
import net.osmand.aidl2.gpx.GpxColorParams;
|
import net.osmand.aidlapi.gpx.GpxColorParams;
|
||||||
import net.osmand.aidl2.gpx.HideGpxParams;
|
import net.osmand.aidlapi.gpx.HideGpxParams;
|
||||||
import net.osmand.aidl2.gpx.ImportGpxParams;
|
import net.osmand.aidlapi.gpx.ImportGpxParams;
|
||||||
import net.osmand.aidl2.gpx.RemoveGpxParams;
|
import net.osmand.aidlapi.gpx.RemoveGpxParams;
|
||||||
import net.osmand.aidl2.gpx.ShowGpxParams;
|
import net.osmand.aidlapi.gpx.ShowGpxParams;
|
||||||
import net.osmand.aidl2.gpx.StartGpxRecordingParams;
|
import net.osmand.aidlapi.gpx.StartGpxRecordingParams;
|
||||||
import net.osmand.aidl2.gpx.StopGpxRecordingParams;
|
import net.osmand.aidlapi.gpx.StopGpxRecordingParams;
|
||||||
import net.osmand.aidl2.map.ALatLon;
|
import net.osmand.aidlapi.map.ALatLon;
|
||||||
import net.osmand.aidl2.map.SetMapLocationParams;
|
import net.osmand.aidlapi.map.SetMapLocationParams;
|
||||||
import net.osmand.aidl2.maplayer.AddMapLayerParams;
|
import net.osmand.aidlapi.maplayer.AddMapLayerParams;
|
||||||
import net.osmand.aidl2.maplayer.RemoveMapLayerParams;
|
import net.osmand.aidlapi.maplayer.RemoveMapLayerParams;
|
||||||
import net.osmand.aidl2.maplayer.UpdateMapLayerParams;
|
import net.osmand.aidlapi.maplayer.UpdateMapLayerParams;
|
||||||
import net.osmand.aidl2.maplayer.point.AddMapPointParams;
|
import net.osmand.aidlapi.maplayer.point.AddMapPointParams;
|
||||||
import net.osmand.aidl2.maplayer.point.RemoveMapPointParams;
|
import net.osmand.aidlapi.maplayer.point.RemoveMapPointParams;
|
||||||
import net.osmand.aidl2.maplayer.point.ShowMapPointParams;
|
import net.osmand.aidlapi.maplayer.point.ShowMapPointParams;
|
||||||
import net.osmand.aidl2.maplayer.point.UpdateMapPointParams;
|
import net.osmand.aidlapi.maplayer.point.UpdateMapPointParams;
|
||||||
import net.osmand.aidl2.mapmarker.AMapMarker;
|
import net.osmand.aidlapi.mapmarker.AMapMarker;
|
||||||
import net.osmand.aidl2.mapmarker.AddMapMarkerParams;
|
import net.osmand.aidlapi.mapmarker.AddMapMarkerParams;
|
||||||
import net.osmand.aidl2.mapmarker.RemoveMapMarkerParams;
|
import net.osmand.aidlapi.mapmarker.RemoveMapMarkerParams;
|
||||||
import net.osmand.aidl2.mapmarker.RemoveMapMarkersParams;
|
import net.osmand.aidlapi.mapmarker.RemoveMapMarkersParams;
|
||||||
import net.osmand.aidl2.mapmarker.UpdateMapMarkerParams;
|
import net.osmand.aidlapi.mapmarker.UpdateMapMarkerParams;
|
||||||
import net.osmand.aidl2.mapwidget.AddMapWidgetParams;
|
import net.osmand.aidlapi.mapwidget.AddMapWidgetParams;
|
||||||
import net.osmand.aidl2.mapwidget.RemoveMapWidgetParams;
|
import net.osmand.aidlapi.mapwidget.RemoveMapWidgetParams;
|
||||||
import net.osmand.aidl2.mapwidget.UpdateMapWidgetParams;
|
import net.osmand.aidlapi.mapwidget.UpdateMapWidgetParams;
|
||||||
import net.osmand.aidl2.navdrawer.NavDrawerFooterParams;
|
import net.osmand.aidlapi.navdrawer.NavDrawerFooterParams;
|
||||||
import net.osmand.aidl2.navdrawer.NavDrawerHeaderParams;
|
import net.osmand.aidlapi.navdrawer.NavDrawerHeaderParams;
|
||||||
import net.osmand.aidl2.navdrawer.NavDrawerItem;
|
import net.osmand.aidlapi.navdrawer.NavDrawerItem;
|
||||||
import net.osmand.aidl2.navdrawer.SetNavDrawerItemsParams;
|
import net.osmand.aidlapi.navdrawer.SetNavDrawerItemsParams;
|
||||||
import net.osmand.aidl2.navigation.ANavigationUpdateParams;
|
import net.osmand.aidlapi.navigation.ANavigationUpdateParams;
|
||||||
import net.osmand.aidl2.navigation.ANavigationVoiceRouterMessageParams;
|
import net.osmand.aidlapi.navigation.ANavigationVoiceRouterMessageParams;
|
||||||
import net.osmand.aidl2.navigation.MuteNavigationParams;
|
import net.osmand.aidlapi.navigation.MuteNavigationParams;
|
||||||
import net.osmand.aidl2.navigation.NavigateGpxParams;
|
import net.osmand.aidlapi.navigation.NavigateGpxParams;
|
||||||
import net.osmand.aidl2.navigation.NavigateParams;
|
import net.osmand.aidlapi.navigation.NavigateParams;
|
||||||
import net.osmand.aidl2.navigation.NavigateSearchParams;
|
import net.osmand.aidlapi.navigation.NavigateSearchParams;
|
||||||
import net.osmand.aidl2.navigation.PauseNavigationParams;
|
import net.osmand.aidlapi.navigation.PauseNavigationParams;
|
||||||
import net.osmand.aidl2.navigation.ResumeNavigationParams;
|
import net.osmand.aidlapi.navigation.ResumeNavigationParams;
|
||||||
import net.osmand.aidl2.navigation.StopNavigationParams;
|
import net.osmand.aidlapi.navigation.StopNavigationParams;
|
||||||
import net.osmand.aidl2.navigation.UnmuteNavigationParams;
|
import net.osmand.aidlapi.navigation.UnmuteNavigationParams;
|
||||||
import net.osmand.aidl2.note.StartAudioRecordingParams;
|
import net.osmand.aidlapi.note.StartAudioRecordingParams;
|
||||||
import net.osmand.aidl2.note.StartVideoRecordingParams;
|
import net.osmand.aidlapi.note.StartVideoRecordingParams;
|
||||||
import net.osmand.aidl2.note.StopRecordingParams;
|
import net.osmand.aidlapi.note.StopRecordingParams;
|
||||||
import net.osmand.aidl2.note.TakePhotoNoteParams;
|
import net.osmand.aidlapi.note.TakePhotoNoteParams;
|
||||||
import net.osmand.aidl2.plugins.PluginParams;
|
import net.osmand.aidlapi.plugins.PluginParams;
|
||||||
import net.osmand.aidl2.search.SearchParams;
|
import net.osmand.aidlapi.search.SearchParams;
|
||||||
import net.osmand.aidl2.search.SearchResult;
|
import net.osmand.aidlapi.search.SearchResult;
|
||||||
import net.osmand.aidl2.tiles.ASqliteDbFile;
|
import net.osmand.aidlapi.tiles.ASqliteDbFile;
|
||||||
import net.osmand.data.LatLon;
|
import net.osmand.data.LatLon;
|
||||||
import net.osmand.plus.OsmAndAppCustomization;
|
import net.osmand.plus.OsmAndAppCustomization;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
|
@ -96,10 +96,10 @@ import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
|
|
||||||
import static net.osmand.OsmandAidlConstants.CANNOT_ACCESS_API_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.CANNOT_ACCESS_API_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.MIN_UPDATE_TIME_MS;
|
import static net.osmand.aidlapi.OsmandAidlConstants.MIN_UPDATE_TIME_MS;
|
||||||
import static net.osmand.OsmandAidlConstants.MIN_UPDATE_TIME_MS_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.MIN_UPDATE_TIME_MS_ERROR;
|
||||||
import static net.osmand.OsmandAidlConstants.UNKNOWN_API_ERROR;
|
import static net.osmand.aidlapi.OsmandAidlConstants.UNKNOWN_API_ERROR;
|
||||||
|
|
||||||
public class OsmandAidlServiceV2 extends Service implements AidlCallbackListenerV2 {
|
public class OsmandAidlServiceV2 extends Service implements AidlCallbackListenerV2 {
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue