Fix boolean conditions

This commit is contained in:
Victor Shcherb 2015-10-25 22:31:29 +01:00
parent ac91a8a4c2
commit 12e5bc2ff2
2 changed files with 3 additions and 2 deletions

View file

@ -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;
}

View file

@ -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());