Suppress debatable purpose trip recording notification

This commit is contained in:
sonora 2016-04-03 12:16:56 +02:00
parent c0dfb730aa
commit a88b9f12b0

View file

@ -106,11 +106,13 @@ public class NotificationHelper {
}
} else if(monitoringPlugin == null) {
return null;
} else if(app.getSavingTrackHelper().getDistance() > 0f){
notificationText = app.getString(R.string.shared_string_trip_recording);
float dst = app.getSavingTrackHelper().getDistance();
notificationText += ": "+OsmAndFormatter.getFormattedDistance(dst, app);
icon = R.drawable.ic_action_polygom_dark;
//} else if(app.getSavingTrackHelper().getDistance() > 0f){
//This produces system notification if unsaved GPX track exists, displaying recorded distance. But only while OsmAnd is in the foreground and while recording has been stopped (otherwise background notification caries this info anyway)
//Purpose is doubtful, we have widget for that. If we re-instante, we need to implement notification refresh upon track saved.
// notificationText = app.getString(R.string.shared_string_trip_recording);
// float dst = app.getSavingTrackHelper().getDistance();
// notificationText += ": "+OsmAndFormatter.getFormattedDistance(dst, app);
// icon = R.drawable.ic_action_polygom_dark;
} else {
return null;
}