From f7f6dec1b3dba9e97c41af5002f502bf6962ae64 Mon Sep 17 00:00:00 2001 From: madwasp79 Date: Mon, 15 Apr 2019 11:27:53 +0300 Subject: [PATCH] changes to aidl nav update method. need testing. --- OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java | 2 +- OsmAnd/src/net/osmand/aidl/OsmandAidlService.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index c8f56080fe..8777f9a91e 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -1943,7 +1943,7 @@ public class OsmandAidlApi { } } for (Entry cb : OsmandAidlService.getAidlCallbacks().entrySet()) { - if (cb.getValue().getKey() == KEY_ON_NAV_DATA_UPDATE) { //add bitwise check instead + if ((cb.getValue().getKey() & KEY_ON_NAV_DATA_UPDATE) > 0) { try { cb.getValue().getCallback().updateNavigationInfo(directionInfo); } catch (Exception e) { diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java index 8165a9b932..832bb281b2 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java @@ -89,11 +89,8 @@ public class OsmandAidlService extends Service { private static final String DATA_KEY_RESULT_SET = "resultSet"; - public static final int KEY_ON_SEARCH_COMPLETE = 1; - public static final int KEY_ON_UPDATE = 2; - public static final int KEY_ON_APP_INIT = 3; - public static final int KEY_ON_GPX_BMP_CREATED = 4; - public static final int KEY_ON_NAV_DATA_UPDATE = 5; + public static final int KEY_ON_UPDATE = 1; + public static final int KEY_ON_NAV_DATA_UPDATE = 2; private static Map callbacks; private Handler mHandler = null;