From 12e5bc2ff2b37b6c7cf0251fa51dcd4b9c744ecb Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 25 Oct 2015 22:31:29 +0100 Subject: [PATCH] Fix boolean conditions --- .../osmand/plus/development/SettingsDevelopmentActivity.java | 1 + OsmAnd/src/net/osmand/plus/download/DownloadActivity.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java index 27ffe3d2a1..105d073904 100644 --- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java @@ -67,6 +67,7 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity { @Override public boolean onPreferenceClick(Preference preference) { getMyApplication().getAppInitializer().resetFirstTimeRun(); + getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.set(false); getMyApplication().showToastMessage(R.string.shared_string_ok); return true; } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index fc44ca24e5..a623875a90 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -213,7 +213,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl public void downloadHasFinished() { visibleBanner.updateBannerInProgress(); if(downloadItem != null && !WorldRegion.WORLD_BASEMAP.equals(downloadItem.getRegionDownloadNameLC())) { - boolean firstMap = getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.get(); + boolean firstMap = !getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.get(); if(firstMap) { initSettingsFirstMap(downloadItem); } @@ -499,7 +499,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl private void initSettingsFirstMap(WorldRegion reg) { // TODO test set correctly (4 tests): when you download first Australia, Japan, Luxembourgh, US - getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.set(false); + getMyApplication().getSettings().FIRST_MAP_IS_DOWNLOADED.set(true); DrivingRegion drg = null; boolean americanSigns = "american".equals(reg.getRegionRoadSigns()); boolean leftHand = "yes".equals(reg.getRegionLeftHandDriving());