remove useless changes part 6

This commit is contained in:
Nazar 2019-07-03 19:04:35 +03:00
parent 5a798e1ec1
commit 8d9e9e8434
5 changed files with 7 additions and 45 deletions

View file

@ -715,11 +715,4 @@ interface IOsmAndAidlInterface {
* @params callback (IOsmAndAidlCallback) - callback to notify user on voice message * @params callback (IOsmAndAidlCallback) - callback to notify user on voice message
*/ */
long registerForVoiceRouterMessages(in ANavigationVoiceRouterMessageParams params, IOsmAndAidlCallback callback); 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);
} }

View file

@ -204,7 +204,6 @@ public class OsmandAidlApi {
private Map<Long, VoiceRouter.VoiceMessageListener> voiceRouterMessageCallbacks= new ConcurrentHashMap<>(); private Map<Long, VoiceRouter.VoiceMessageListener> voiceRouterMessageCallbacks= new ConcurrentHashMap<>();
private AMapPointUpdateListener aMapPointUpdateListener; private AMapPointUpdateListener aMapPointUpdateListener;
private LockHelper.LockUIAdapter aMapActivityKeyguardFlagsUIAdapter;
private boolean mapActivityActive = false; private boolean mapActivityActive = false;
@ -239,7 +238,6 @@ public class OsmandAidlApi {
initOsmandTelegram(); initOsmandTelegram();
app.getAppCustomization().addListener(mapActivity); app.getAppCustomization().addListener(mapActivity);
aMapPointUpdateListener = mapActivity; aMapPointUpdateListener = mapActivity;
aMapActivityKeyguardFlagsUIAdapter = mapActivity;
} }
public void onDestroyMapActivity(MapActivity mapActivity) { public void onDestroyMapActivity(MapActivity mapActivity) {
@ -1887,7 +1885,7 @@ public class OsmandAidlApi {
try { try {
cb.getCallback().updateNavigationInfo(directionInfo); cb.getCallback().updateNavigationInfo(directionInfo);
} catch (Exception e) { } catch (Exception e) {
LOG.debug(e.getMessage(), e); LOG.error(e.getMessage(), e);
} }
} }
} }
@ -1913,7 +1911,7 @@ public class OsmandAidlApi {
try { try {
cb.getCallback().onVoiceRouterNotify(); cb.getCallback().onVoiceRouterNotify();
} catch (Exception e) { } catch (Exception e) {
LOG.debug(e.getMessage(), e); LOG.error(e.getMessage(), e);
} }
} }
} }
@ -1929,18 +1927,6 @@ public class OsmandAidlApi {
voiceRouterMessageCallbacks.remove(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<String, ContextMenuButtonsParams> getContextMenuButtonsParams() { public Map<String, ContextMenuButtonsParams> getContextMenuButtonsParams() {
return contextMenuButtonsParams; return contextMenuButtonsParams;
} }
@ -2007,7 +1993,7 @@ public class OsmandAidlApi {
try { try {
cb.getCallback().onContextMenuButtonClicked(buttonId, pointId, layerId); cb.getCallback().onContextMenuButtonClicked(buttonId, pointId, layerId);
} catch (Exception e) { } catch (Exception e) {
LOG.debug(e.getMessage(), e); LOG.error(e.getMessage(), e);
} }
} }
} }

View file

@ -1163,20 +1163,6 @@ public class OsmandAidlService extends Service implements AidlCallbackListener {
return UNKNOWN_API_ERROR; 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 { public static class AidlCallbackParams {

View file

@ -1382,7 +1382,6 @@ public class OsmandSettings {
public final CommonPreference<Integer> KEEP_INFORMING = new IntPreference("keep_informing", 0).makeProfile(); public final CommonPreference<Integer> KEEP_INFORMING = new IntPreference("keep_informing", 0).makeProfile();
{ {
// 0 means never
KEEP_INFORMING.setModeDefaultValue(ApplicationMode.CAR, 0); KEEP_INFORMING.setModeDefaultValue(ApplicationMode.CAR, 0);
KEEP_INFORMING.setModeDefaultValue(ApplicationMode.BICYCLE, 0); KEEP_INFORMING.setModeDefaultValue(ApplicationMode.BICYCLE, 0);
KEEP_INFORMING.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0); KEEP_INFORMING.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0);
@ -1391,7 +1390,6 @@ public class OsmandSettings {
public final CommonPreference<Integer> WAKE_ON_VOICE_TIME_INT = new IntPreference("wake_on_voice_time_int", 0).makeProfile(); public final CommonPreference<Integer> 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.CAR, 0);
WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.BICYCLE, 0); WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.BICYCLE, 0);
WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0); WAKE_ON_VOICE_TIME_INT.setModeDefaultValue(ApplicationMode.PEDESTRIAN, 0);
@ -1400,7 +1398,6 @@ public class OsmandSettings {
public final CommonPreference<Boolean> WAKE_ON_VOICE_SENSOR = new BooleanPreference("wake_on_voice_sensor", false).makeProfile(); public final CommonPreference<Boolean> 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.CAR, false);
WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.BICYCLE, false); WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.BICYCLE, false);
WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.PEDESTRIAN, false); WAKE_ON_VOICE_SENSOR.setModeDefaultValue(ApplicationMode.PEDESTRIAN, false);

View file

@ -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=) // 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) { //public void arrivedWayPoint(String name) {
// CommandBuilder play = getNewCommandPlayerToPlay(); // CommandBuilder p = getNewCommandPlayerToPlay();
// if (play != null) { // if (p != null) {
// notifyOnVoiceMessage(); // p.arrivedAtWayPoint(getSpeakablePointName(name));
// play.arrivedAtWayPoint(getSpeakablePointName(name)).play();
// } // }
// play(p);
//} //}
public void onApplicationTerminate() { public void onApplicationTerminate() {