Fix #6201 - problems without restart of app for 10 days

This commit is contained in:
Victor Shcherb 2020-03-25 11:57:49 +01:00
parent 01ea4253bf
commit 4e608d3c5c
3 changed files with 13 additions and 11 deletions

View file

@ -69,7 +69,6 @@ public class PerformLiveUpdateAsyncTask
@Override
protected void onPostExecute(IncrementalChangesManager.IncrementalUpdateList result) {
LOG.debug("onPostExecute");
if (context instanceof AbstractDownloadActivity) {
AbstractDownloadActivity activity = (AbstractDownloadActivity) context;
activity.setSupportProgressBarIndeterminateVisibility(false);

View file

@ -206,7 +206,9 @@ public class IncrementalChangesManager {
}
ll.addAll(n.getMonthUpdate());
} else {
if(n.isDayUpdateApplicable() && isPreferrableLimitForDayUpdates(n.monthYearPart, n.getDayUpdates())) {
// it causes problem when person doesn't restart application for 10 days so updates stop working
// && isPreferrableLimitForDayUpdates(n.monthYearPart, n.getDayUpdates())
if (n.isDayUpdateApplicable() ) {
ll.addAll(n.getDayUpdates());
} else if (n.isMonthUpdateApplicable()) {
ll.addAll(n.getMonthUpdate());

View file

@ -40,12 +40,13 @@ public class HillshadeLayer extends MapTileLayer {
private final static int MAX_TRANSPARENCY_ALPHA = 20;
private QuadTree<String> indexedResources = new QuadTree<String>(new QuadRect(0, 0, 1 << (ZOOM_BOUNDARY+1), 1 << (ZOOM_BOUNDARY+1)), 8, 0.55f);
private final int defaultAlpha;
public HillshadeLayer(MapActivity activity, SRTMPlugin srtmPlugin) {
super(false);
final OsmandApplication app = activity.getMyApplication();
indexHillshadeFiles(app);
setAlpha(DEFAULT_ALPHA);
setAlpha(defaultAlpha);
setMap(createTileSource(activity));
}