changes to aidl nav update method. need testing.

This commit is contained in:
madwasp79 2019-04-15 11:27:53 +03:00
parent 575e936d2e
commit f7f6dec1b3
2 changed files with 3 additions and 6 deletions

View file

@ -1943,7 +1943,7 @@ public class OsmandAidlApi {
}
}
for (Entry<Long, OsmandAidlService.AidlCallbackParams> 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) {

View file

@ -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<Long, AidlCallbackParams> callbacks;
private Handler mHandler = null;