Refresh map with aidl

This commit is contained in:
Alexander Sytnyk 2017-07-05 15:46:53 +03:00
parent 760e218475
commit 6cd6e7ea63
3 changed files with 16 additions and 0 deletions

View file

@ -41,6 +41,8 @@ import net.osmand.aidl.maplayer.UpdateMapLayerParams;
interface IOsmAndAidlInterface {
boolean refreshMap();
boolean addFavoriteGroup(in AddFavoriteGroupParams params);
boolean removeFavoriteGroup(in RemoveFavoriteGroupParams params);
boolean updateFavoriteGroup(in UpdateFavoriteGroupParams params);

View file

@ -350,6 +350,11 @@ public class OsmandAidlApi {
return control;
}
boolean reloadMap() {
refreshMap();
return true;
}
boolean addFavoriteGroup(AFavoriteGroup favoriteGroup) {
if (favoriteGroup != null) {
FavouritesDbHelper favoritesHelper = app.getFavorites();

View file

@ -52,6 +52,15 @@ public class OsmandAidlService extends Service {
private final IOsmAndAidlInterface.Stub mBinder = new IOsmAndAidlInterface.Stub() {
@Override
public boolean refreshMap() throws RemoteException {
try {
return getApi().reloadMap();
} catch (Exception e) {
return false;
}
}
@Override
public boolean addFavoriteGroup(AddFavoriteGroupParams params) throws RemoteException {
try {