Refresh map with aidl
This commit is contained in:
parent
760e218475
commit
6cd6e7ea63
3 changed files with 16 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue