From 8d9e9e84344da0c7621fc8f6ae7ffa70b0579d45 Mon Sep 17 00:00:00 2001 From: Nazar Date: Wed, 3 Jul 2019 19:04:35 +0300 Subject: [PATCH] remove useless changes part 6 --- .../net/osmand/aidl/IOsmAndAidlInterface.aidl | 7 ------- OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java | 20 +++---------------- .../net/osmand/aidl/OsmandAidlService.java | 14 ------------- .../src/net/osmand/plus/OsmandSettings.java | 3 --- .../net/osmand/plus/routing/VoiceRouter.java | 8 ++++---- 5 files changed, 7 insertions(+), 45 deletions(-) diff --git a/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl b/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl index 060108d202..02e3293374 100644 --- a/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl +++ b/OsmAnd/src/net/osmand/aidl/IOsmAndAidlInterface.aidl @@ -715,11 +715,4 @@ interface IOsmAndAidlInterface { * @params callback (IOsmAndAidlCallback) - callback to notify user on voice message */ long registerForVoiceRouterMessages(in ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback); - - /** - * Method to change MapActivity keyguard flags for screen unlock/lock functionality - * - * @params enable (boolean) - boolean flag to describe set or reset MapActivity keyguard flags - */ - boolean changeMapActivityKeyguardFlags(in boolean enable); } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java index 68f91821e5..20e694c179 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlApi.java @@ -204,7 +204,6 @@ public class OsmandAidlApi { private Map voiceRouterMessageCallbacks= new ConcurrentHashMap<>(); private AMapPointUpdateListener aMapPointUpdateListener; - private LockHelper.LockUIAdapter aMapActivityKeyguardFlagsUIAdapter; private boolean mapActivityActive = false; @@ -239,7 +238,6 @@ public class OsmandAidlApi { initOsmandTelegram(); app.getAppCustomization().addListener(mapActivity); aMapPointUpdateListener = mapActivity; - aMapActivityKeyguardFlagsUIAdapter = mapActivity; } public void onDestroyMapActivity(MapActivity mapActivity) { @@ -1887,7 +1885,7 @@ public class OsmandAidlApi { try { cb.getCallback().updateNavigationInfo(directionInfo); } catch (Exception e) { - LOG.debug(e.getMessage(), e); + LOG.error(e.getMessage(), e); } } } @@ -1913,7 +1911,7 @@ public class OsmandAidlApi { try { cb.getCallback().onVoiceRouterNotify(); } catch (Exception e) { - LOG.debug(e.getMessage(), e); + LOG.error(e.getMessage(), e); } } } @@ -1928,18 +1926,6 @@ public class OsmandAidlApi { app.getRoutingHelper().getVoiceRouter().removeVoiceMessageListener(voiceRouterMessageCallbacks.get(id)); voiceRouterMessageCallbacks.remove(id); } - - public boolean changeMapActivityKeyguardFlags(boolean enable) { - if (aMapActivityKeyguardFlagsUIAdapter != null) { - if (enable) { - aMapActivityKeyguardFlagsUIAdapter.unlock(); - } else { - aMapActivityKeyguardFlagsUIAdapter.lock(); - } - return true; - } - return false; - } public Map getContextMenuButtonsParams() { return contextMenuButtonsParams; @@ -2007,7 +1993,7 @@ public class OsmandAidlApi { try { cb.getCallback().onContextMenuButtonClicked(buttonId, pointId, layerId); } catch (Exception e) { - LOG.debug(e.getMessage(), e); + LOG.error(e.getMessage(), e); } } } diff --git a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java index 06ef56d82c..262a064a22 100644 --- a/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java +++ b/OsmAnd/src/net/osmand/aidl/OsmandAidlService.java @@ -1163,20 +1163,6 @@ public class OsmandAidlService extends Service implements AidlCallbackListener { return UNKNOWN_API_ERROR; } } - - @Override - public boolean changeMapActivityKeyguardFlags(boolean enable) { - try { - OsmandAidlApi api = getApi("changeMapActivityKeyguardFlags"); - if (api != null) { - return api.changeMapActivityKeyguardFlags(enable); - } - return false; - } catch (Exception e) { - handleException(e); - return false; - } - } }; public static class AidlCallbackParams { diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index ee9fbbdad6..ad2e6748a9 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1382,7 +1382,6 @@ public class OsmandSettings { public final CommonPreference KEEP_INFORMING = new IntPreference("keep_informing", 0).makeProfile(); { - // 0 means never KEEP_INFORMING.setModeDefaultValue(ApplicationMode.CAR, 0); KEEP_INFORMING.setModeDefaultValue(ApplicationMode.BICYCLE, 0); KEEP_INFORMING.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0); @@ -1391,7 +1390,6 @@ public class OsmandSettings { public final CommonPreference WAKE_ON_VOICE_TIME_INT = new IntPreference("wake_on_voice_time_int", 0).makeProfile(); { - // 0 means never WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.CAR, 0); WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.BICYCLE, 0); WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0); @@ -1400,7 +1398,6 @@ public class OsmandSettings { public final CommonPreference WAKE_ON_VOICE_SENSOR = new BooleanPreference("wake_on_voice_sensor", false).makeProfile(); { - // 0 means never WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.CAR, false); WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.BICYCLE, false); WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.PEDESTRIAN, false); diff --git a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java index 8039b4de2c..d9c6e93f94 100644 --- a/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java +++ b/OsmAnd/src/net/osmand/plus/routing/VoiceRouter.java @@ -861,11 +861,11 @@ public class VoiceRouter { // This is not needed, used are only arrivedIntermediatePoint (for points on the route) or announceWaypoint (for points near the route=) //public void arrivedWayPoint(String name) { - // CommandBuilder play = getNewCommandPlayerToPlay(); - // if (play != null) { - // notifyOnVoiceMessage(); - // play.arrivedAtWayPoint(getSpeakablePointName(name)).play(); + // CommandBuilder p = getNewCommandPlayerToPlay(); + // if (p != null) { + // p.arrivedAtWayPoint(getSpeakablePointName(name)); // } + // play(p); //} public void onApplicationTerminate() {