diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a44b9268b6..266f117475 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,6 +1,6 @@ -import java.util.Properties import java.io.FileInputStream import java.io.FileWriter +import java.util.Properties plugins { id("com.android.application") diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDaoTest.kt index 79af625ecf..48ee2eb7b8 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDaoTest.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.data.download.tiles -import org.junit.Before -import org.junit.Test - import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.util.TilePos import de.westnordost.streetcomplete.util.TilesRect - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test class DownloadedTilesDaoTest : ApplicationDbTestCase() { private lateinit var dao: DownloadedTilesDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDaoTest.kt index aac69f415a..2c7f54a6a5 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDaoTest.kt @@ -3,7 +3,8 @@ package de.westnordost.streetcomplete.data.osm.created_elements import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey import de.westnordost.streetcomplete.data.osm.mapdata.ElementType -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsDaoTest.kt index 77e18ac28c..2bf02f74a7 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsDaoTest.kt @@ -6,16 +6,29 @@ import de.westnordost.streetcomplete.data.osm.edits.delete.RevertDeletePoiNodeAc import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitAtLinePosition import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitAtPoint import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitWayAction -import de.westnordost.streetcomplete.data.osm.edits.update_tags.* +import de.westnordost.streetcomplete.data.osm.edits.update_tags.RevertUpdateElementTagsAction +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChanges +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify +import de.westnordost.streetcomplete.data.osm.edits.update_tags.UpdateElementTagsAction import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.TestQuestType import de.westnordost.streetcomplete.data.osm.osmquests.TestQuestType2 import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementIdProviderDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementIdProviderDaoTest.kt index e7720a4f97..decfbeb587 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementIdProviderDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/ElementIdProviderDaoTest.kt @@ -1,7 +1,9 @@ package de.westnordost.streetcomplete.data.osm.edits import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue +import org.junit.Assert.fail import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDaoTest.kt index b3c20798fe..9fc926e028 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDaoTest.kt @@ -1,12 +1,13 @@ package de.westnordost.streetcomplete.data.osm.edits.upload.changesets +import de.westnordost.streetcomplete.data.ApplicationDbTestCase +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test -import de.westnordost.streetcomplete.data.ApplicationDbTestCase - -import org.junit.Assert.* - class OpenChangesetsDaoTest : ApplicationDbTestCase() { private lateinit var dao: OpenChangesetsDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDaoTest.kt index 82e853bdba..5e947d489d 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDaoTest.kt @@ -1,13 +1,17 @@ package de.westnordost.streetcomplete.data.osm.geometry -import org.junit.Before -import org.junit.Test - import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test class ElementGeometryDaoTest : ApplicationDbTestCase() { private lateinit var dao: ElementGeometryDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDaoTest.kt index 45bd1d80d5..8922f9957d 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDaoTest.kt @@ -1,11 +1,14 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import org.junit.Before -import org.junit.Test - import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test import java.lang.System.currentTimeMillis class NodeDaoTest : ApplicationDbTestCase() { diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDaoTest.kt index 41914ecbe1..fdebce3fcc 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDaoTest.kt @@ -1,11 +1,17 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import org.junit.Before -import org.junit.Test import de.westnordost.streetcomplete.data.ApplicationDbTestCase +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import org.junit.Assert.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test class RelationDaoTest : ApplicationDbTestCase() { private lateinit var dao: RelationDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDaoTest.kt index 7ca6949407..cf9b6dc1b8 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDaoTest.kt @@ -1,11 +1,14 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import org.junit.Before -import org.junit.Test - import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test class WayDaoTest : ApplicationDbTestCase() { private lateinit var dao: WayDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDaoTest.kt index 383870383f..54065aa085 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDaoTest.kt @@ -6,7 +6,10 @@ import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestsHiddenDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestsHiddenDaoTest.kt index c3ff91c709..b0fb74a96a 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestsHiddenDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestsHiddenDaoTest.kt @@ -6,7 +6,9 @@ import de.westnordost.streetcomplete.data.quest.OsmQuestKey import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/TestQuestType.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/TestQuestType.kt index 8b1b800bb0..83bb2af7d5 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/TestQuestType.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osm/osmquests/TestQuestType.kt @@ -1,8 +1,7 @@ package de.westnordost.streetcomplete.data.osm.osmquests -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/NoteDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/NoteDaoTest.kt index 7e02c7ea9b..5470725b0f 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/NoteDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/NoteDaoTest.kt @@ -1,15 +1,17 @@ package de.westnordost.streetcomplete.data.osmnotes -import org.junit.Before -import org.junit.Test - import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.user.User import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test class NoteDaoTest : ApplicationDbTestCase() { private lateinit var dao: NoteDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDaoTest.kt index f5913c1081..729e4bbb5d 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDaoTest.kt @@ -3,7 +3,11 @@ package de.westnordost.streetcomplete.data.osmnotes.edits import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/notequests/NoteQuestsHiddenDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/notequests/NoteQuestsHiddenDaoTest.kt index ad3ad2570c..e836f00b8b 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/notequests/NoteQuestsHiddenDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/osmnotes/notequests/NoteQuestsHiddenDaoTest.kt @@ -4,7 +4,9 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder import kotlinx.coroutines.delay import kotlinx.coroutines.runBlocking -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDaoTest.kt index 3f869eede2..9ac600b458 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDaoTest.kt @@ -1,7 +1,7 @@ package de.westnordost.streetcomplete.data.user.achievements import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDaoTest.kt index 3dadde1ea3..60f631286c 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDaoTest.kt @@ -1,7 +1,7 @@ package de.westnordost.streetcomplete.data.user.achievements import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDaoTest.kt index ecea64a489..056b7ef5dd 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDaoTest.kt @@ -1,7 +1,7 @@ package de.westnordost.streetcomplete.data.user.statistics import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDaoTest.kt index 4725ce6f00..0747fdfb6f 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDaoTest.kt @@ -1,12 +1,10 @@ package de.westnordost.streetcomplete.data.user.statistics +import de.westnordost.streetcomplete.data.ApplicationDbTestCase +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test -import de.westnordost.streetcomplete.data.ApplicationDbTestCase - -import org.junit.Assert.* - class QuestTypeStatisticsDaoTest : ApplicationDbTestCase() { private lateinit var daoType: QuestTypeStatisticsDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetDaoTest.kt index cf379000c2..c7af9d6186 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetDaoTest.kt @@ -1,7 +1,9 @@ package de.westnordost.streetcomplete.data.visiblequests import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderDaoTest.kt index b99340edba..2b4cbb3816 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderDaoTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.visiblequests import de.westnordost.streetcomplete.data.ApplicationDbTestCase -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDaoTest.kt index 72a8f8f78b..dbe245af5c 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDaoTest.kt @@ -1,12 +1,11 @@ package de.westnordost.streetcomplete.data.visiblequests +import de.westnordost.streetcomplete.data.ApplicationDbTestCase +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test -import de.westnordost.streetcomplete.data.ApplicationDbTestCase - -import org.junit.Assert.* - class VisibleQuestTypeDaoTest : ApplicationDbTestCase() { private lateinit var dao: VisibleQuestTypeDao diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/TrafficFlowSegmentsApiTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/TrafficFlowSegmentsApiTest.kt index d14bf069e1..ca2d52858d 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/TrafficFlowSegmentsApiTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/TrafficFlowSegmentsApiTest.kt @@ -5,8 +5,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegment import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsApi import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsModule.ONEWAY_API_URL - -import org.assertj.core.api.Assertions.* +import org.assertj.core.api.Assertions.assertThat import org.junit.Assert.assertTrue import org.junit.Test diff --git a/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/WayTrafficFlowDaoTest.kt b/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/WayTrafficFlowDaoTest.kt index 9458ac29f6..f4d28206af 100644 --- a/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/WayTrafficFlowDaoTest.kt +++ b/app/src/androidTest/java/de/westnordost/streetcomplete/quests/oneway_suspects/WayTrafficFlowDaoTest.kt @@ -4,7 +4,9 @@ import de.westnordost.streetcomplete.data.ApplicationDbTestCase import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.mapdata.WayDao import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowDao -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/main/java/de/westnordost/streetcomplete/ApplicationComponent.kt b/app/src/main/java/de/westnordost/streetcomplete/ApplicationComponent.kt index ea8609a850..805628b203 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ApplicationComponent.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ApplicationComponent.kt @@ -2,7 +2,12 @@ package de.westnordost.streetcomplete import dagger.Component import de.westnordost.streetcomplete.about.PrivacyStatementFragment -import de.westnordost.streetcomplete.controls.* +import de.westnordost.streetcomplete.controls.AnswersCounterFragment +import de.westnordost.streetcomplete.controls.DownloadProgressFragment +import de.westnordost.streetcomplete.controls.MainMenuButtonFragment +import de.westnordost.streetcomplete.controls.NotificationButtonFragment +import de.westnordost.streetcomplete.controls.UndoButtonFragment +import de.westnordost.streetcomplete.controls.UploadButtonFragment import de.westnordost.streetcomplete.data.CleanerWorker import de.westnordost.streetcomplete.data.DbModule import de.westnordost.streetcomplete.data.OsmApiModule @@ -13,8 +18,8 @@ import de.westnordost.streetcomplete.data.edithistory.EditHistoryModule import de.westnordost.streetcomplete.data.meta.MetadataModule import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsModule import de.westnordost.streetcomplete.data.osm.edits.ElementEditsModule -import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestModule import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.ChangesetAutoCloserWorker +import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestModule import de.westnordost.streetcomplete.data.osmnotes.NotesModule import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsModule import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestModule @@ -37,14 +42,24 @@ import de.westnordost.streetcomplete.quests.SplitWayFragment import de.westnordost.streetcomplete.quests.address.AddAddressStreetForm import de.westnordost.streetcomplete.quests.building_levels.AddBuildingLevelsForm import de.westnordost.streetcomplete.quests.level.AddLevelForm -import de.westnordost.streetcomplete.quests.road_name.AddRoadNameForm import de.westnordost.streetcomplete.quests.note_discussion.NoteDiscussionForm import de.westnordost.streetcomplete.quests.oneway_suspects.AddSuspectedOnewayForm import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsModule -import de.westnordost.streetcomplete.settings.* +import de.westnordost.streetcomplete.quests.road_name.AddRoadNameForm +import de.westnordost.streetcomplete.settings.OAuthFragment +import de.westnordost.streetcomplete.settings.SettingsActivity +import de.westnordost.streetcomplete.settings.SettingsFragment +import de.westnordost.streetcomplete.settings.ShowQuestFormsActivity import de.westnordost.streetcomplete.settings.questselection.QuestPresetsFragment import de.westnordost.streetcomplete.settings.questselection.QuestSelectionFragment -import de.westnordost.streetcomplete.user.* +import de.westnordost.streetcomplete.user.AchievementsFragment +import de.westnordost.streetcomplete.user.LinksFragment +import de.westnordost.streetcomplete.user.LoginFragment +import de.westnordost.streetcomplete.user.ProfileFragment +import de.westnordost.streetcomplete.user.QuestStatisticsByCountryFragment +import de.westnordost.streetcomplete.user.QuestStatisticsByQuestTypeFragment +import de.westnordost.streetcomplete.user.QuestStatisticsFragment +import de.westnordost.streetcomplete.user.UserActivity import javax.inject.Singleton @Singleton diff --git a/app/src/main/java/de/westnordost/streetcomplete/BaseActivity.kt b/app/src/main/java/de/westnordost/streetcomplete/BaseActivity.kt index e7adc71099..5b1c69f5ab 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/BaseActivity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/BaseActivity.kt @@ -10,7 +10,7 @@ import de.westnordost.streetcomplete.util.getSelectedLocale import de.westnordost.streetcomplete.util.getSystemLocales import de.westnordost.streetcomplete.util.setDefaultLocales import de.westnordost.streetcomplete.util.setLocales -import java.util.* +import java.util.Locale open class BaseActivity : AppCompatActivity { constructor() : super() diff --git a/app/src/main/java/de/westnordost/streetcomplete/MainActivity.kt b/app/src/main/java/de/westnordost/streetcomplete/MainActivity.kt index 9f39afdbdf..1234192c8f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/MainActivity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/MainActivity.kt @@ -1,6 +1,10 @@ package de.westnordost.streetcomplete -import android.content.* +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.SharedPreferences import android.content.res.Configuration import android.graphics.Point import android.location.LocationManager @@ -23,22 +27,24 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager import androidx.preference.PreferenceManager import de.westnordost.streetcomplete.Injector.applicationComponent import de.westnordost.streetcomplete.controls.NotificationButtonFragment +import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource +import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.download.DownloadController import de.westnordost.streetcomplete.data.download.DownloadProgressListener import de.westnordost.streetcomplete.data.notifications.Notification -import de.westnordost.streetcomplete.data.quest.Quest -import de.westnordost.streetcomplete.data.quest.QuestAutoSyncer -import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource -import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osmnotes.ImageUploadServerException +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestAutoSyncer import de.westnordost.streetcomplete.data.upload.UploadController import de.westnordost.streetcomplete.data.upload.UploadProgressListener import de.westnordost.streetcomplete.data.upload.VersionBannedException import de.westnordost.streetcomplete.data.user.AuthorizationException import de.westnordost.streetcomplete.data.user.UserLoginStatusController import de.westnordost.streetcomplete.data.user.UserUpdater -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.hasLocationPermission +import de.westnordost.streetcomplete.ktx.isLocationEnabled +import de.westnordost.streetcomplete.ktx.toast import de.westnordost.streetcomplete.location.LocationRequester import de.westnordost.streetcomplete.location.LocationRequester.Companion.REQUEST_LOCATION_PERMISSION_RESULT import de.westnordost.streetcomplete.map.MainFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/StreetCompleteApplication.kt b/app/src/main/java/de/westnordost/streetcomplete/StreetCompleteApplication.kt index c786ecbeb4..25d218d94c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/StreetCompleteApplication.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/StreetCompleteApplication.kt @@ -16,10 +16,14 @@ import de.westnordost.streetcomplete.util.CrashReportExceptionHandler import de.westnordost.streetcomplete.util.getSelectedLocale import de.westnordost.streetcomplete.util.getSystemLocales import de.westnordost.streetcomplete.util.setDefaultLocales -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import java.lang.System.currentTimeMillis import java.util.concurrent.TimeUnit import javax.inject.Inject -import java.lang.System.currentTimeMillis class StreetCompleteApplication : Application() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/about/AboutFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/about/AboutFragment.kt index a5a040ec1f..ffb9d64ca3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/about/AboutFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/about/AboutFragment.kt @@ -16,7 +16,7 @@ import de.westnordost.streetcomplete.databinding.CellLabeledIconSelectRightBindi import de.westnordost.streetcomplete.databinding.DialogDonateBinding import de.westnordost.streetcomplete.ktx.tryStartActivity import de.westnordost.streetcomplete.view.ListAdapter -import java.util.* +import java.util.Locale /** Shows the about screen */ class AboutFragment : PreferenceFragmentCompat() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/about/ChangelogFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/about/ChangelogFragment.kt index 7889d0fdb1..4af0bbcf78 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/about/ChangelogFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/about/ChangelogFragment.kt @@ -4,13 +4,12 @@ import android.content.Context import android.content.DialogInterface import android.content.res.Resources import android.os.Bundle -import androidx.fragment.app.Fragment import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AlertDialog +import androidx.fragment.app.Fragment import androidx.recyclerview.widget.DividerItemDecoration - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.FragmentChangelogBinding import de.westnordost.streetcomplete.databinding.RowChangelogBinding @@ -18,7 +17,11 @@ import de.westnordost.streetcomplete.ktx.getYamlObject import de.westnordost.streetcomplete.ktx.viewBinding import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.view.ListAdapter -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext /** Shows the full changelog */ class ChangelogFragment : Fragment(R.layout.fragment_changelog) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/about/CreditsFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/about/CreditsFragment.kt index 7f57cb5203..df79891e70 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/about/CreditsFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/about/CreditsFragment.kt @@ -18,8 +18,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.sufficientlysecure.htmltextview.HtmlTextView -import java.util.* -import kotlin.collections.LinkedHashMap +import java.util.Locale /** Shows the credits of this app */ class CreditsFragment : Fragment(R.layout.fragment_credits) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/controls/IconsDownloadProgressView.kt b/app/src/main/java/de/westnordost/streetcomplete/controls/IconsDownloadProgressView.kt index 6069f25b00..0b6225dd31 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/controls/IconsDownloadProgressView.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/controls/IconsDownloadProgressView.kt @@ -8,8 +8,8 @@ import android.widget.RelativeLayout import de.westnordost.streetcomplete.databinding.ViewIconsDownloadProgressBinding import de.westnordost.streetcomplete.ktx.toPx import de.westnordost.streetcomplete.view.CircularMaskFrameLayout -import java.util.Queue import java.util.LinkedList +import java.util.Queue /** view that shows a queue of IconProgressViews moving in from the right and moving out to the * left when they are done */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/controls/MainMenuButtonFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/controls/MainMenuButtonFragment.kt index 2fdc442672..55caee8dc1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/controls/MainMenuButtonFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/controls/MainMenuButtonFragment.kt @@ -12,7 +12,11 @@ import de.westnordost.streetcomplete.data.download.DownloadController import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.visiblequests.TeamModeQuestFilter import de.westnordost.streetcomplete.databinding.FragmentMainMenuButtonBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.popIn +import de.westnordost.streetcomplete.ktx.popOut +import de.westnordost.streetcomplete.ktx.toast +import de.westnordost.streetcomplete.ktx.viewBinding +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import kotlinx.coroutines.launch import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/controls/NotificationButtonFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/controls/NotificationButtonFragment.kt index 7304813166..c9c7b7b9ef 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/controls/NotificationButtonFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/controls/NotificationButtonFragment.kt @@ -7,7 +7,8 @@ import androidx.core.view.isVisible import androidx.fragment.app.Fragment import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.notifications.* +import de.westnordost.streetcomplete.data.notifications.Notification +import de.westnordost.streetcomplete.data.notifications.NotificationsSource import de.westnordost.streetcomplete.ktx.popIn import de.westnordost.streetcomplete.ktx.popOut import de.westnordost.streetcomplete.ktx.viewLifecycleScope diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt b/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt index e3962131b1..9815416e1f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/AndroidDatabase.kt @@ -3,11 +3,33 @@ package de.westnordost.streetcomplete.data import android.annotation.SuppressLint import android.content.ContentValues import android.database.Cursor -import android.database.sqlite.SQLiteDatabase.* +import android.database.sqlite.SQLiteDatabase.CONFLICT_ABORT +import android.database.sqlite.SQLiteDatabase.CONFLICT_FAIL +import android.database.sqlite.SQLiteDatabase.CONFLICT_IGNORE +import android.database.sqlite.SQLiteDatabase.CONFLICT_NONE +import android.database.sqlite.SQLiteDatabase.CONFLICT_REPLACE +import android.database.sqlite.SQLiteDatabase.CONFLICT_ROLLBACK import android.database.sqlite.SQLiteOpenHelper import android.database.sqlite.SQLiteStatement -import de.westnordost.streetcomplete.data.ConflictAlgorithm.* -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.data.ConflictAlgorithm.ABORT +import de.westnordost.streetcomplete.data.ConflictAlgorithm.FAIL +import de.westnordost.streetcomplete.data.ConflictAlgorithm.IGNORE +import de.westnordost.streetcomplete.data.ConflictAlgorithm.REPLACE +import de.westnordost.streetcomplete.data.ConflictAlgorithm.ROLLBACK +import de.westnordost.streetcomplete.ktx.getBlob +import de.westnordost.streetcomplete.ktx.getBlobOrNull +import de.westnordost.streetcomplete.ktx.getDouble +import de.westnordost.streetcomplete.ktx.getDoubleOrNull +import de.westnordost.streetcomplete.ktx.getFloat +import de.westnordost.streetcomplete.ktx.getFloatOrNull +import de.westnordost.streetcomplete.ktx.getInt +import de.westnordost.streetcomplete.ktx.getIntOrNull +import de.westnordost.streetcomplete.ktx.getLong +import de.westnordost.streetcomplete.ktx.getLongOrNull +import de.westnordost.streetcomplete.ktx.getShort +import de.westnordost.streetcomplete.ktx.getShortOrNull +import de.westnordost.streetcomplete.ktx.getString +import de.westnordost.streetcomplete.ktx.getStringOrNull import javax.inject.Inject @SuppressLint("Recycle") diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/Preloader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/Preloader.kt index 1f2346d5d6..38133df019 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/Preloader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/Preloader.kt @@ -4,7 +4,10 @@ import android.util.Log import de.westnordost.countryboundaries.CountryBoundaries import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.ktx.format -import kotlinx.coroutines.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import java.lang.System.currentTimeMillis import java.util.concurrent.FutureTask import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt b/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt index 3b89b98e9e..62fa31e912 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/StreetCompleteSQLiteOpenHelper.kt @@ -3,30 +3,29 @@ package de.westnordost.streetcomplete.data import android.content.Context import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper -import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable -import de.westnordost.streetcomplete.data.user.achievements.UserLinksTable - -import javax.inject.Singleton - +import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable +import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable +import de.westnordost.streetcomplete.data.osm.edits.ElementEditsTable +import de.westnordost.streetcomplete.data.osm.edits.ElementIdProviderTable import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable import de.westnordost.streetcomplete.data.osm.mapdata.NodeTable -import de.westnordost.streetcomplete.data.osmnotes.NoteTable import de.westnordost.streetcomplete.data.osm.mapdata.RelationTables import de.westnordost.streetcomplete.data.osm.mapdata.WayTables -import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable -import de.westnordost.streetcomplete.data.user.statistics.QuestTypeStatisticsTable -import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable -import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable -import de.westnordost.streetcomplete.data.osm.edits.ElementEditsTable -import de.westnordost.streetcomplete.data.osm.edits.ElementIdProviderTable -import de.westnordost.streetcomplete.data.osm.osmquests.* +import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable +import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestsHiddenTable +import de.westnordost.streetcomplete.data.osmnotes.NoteTable import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable import de.westnordost.streetcomplete.data.osmnotes.notequests.NoteQuestsHiddenTable +import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable +import de.westnordost.streetcomplete.data.user.achievements.UserLinksTable import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTable +import de.westnordost.streetcomplete.data.user.statistics.QuestTypeStatisticsTable import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderTable +import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable +import javax.inject.Singleton @Singleton class StreetCompleteSQLiteOpenHelper(context: Context, dbName: String) : SQLiteOpenHelper(context, dbName, null, DB_VERSION) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/AVariableRadiusStrategy.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/AVariableRadiusStrategy.kt index 575283bde5..65a46a9fc4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/AVariableRadiusStrategy.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/AVariableRadiusStrategy.kt @@ -1,14 +1,17 @@ package de.westnordost.streetcomplete.data.download import android.util.Log - import de.westnordost.streetcomplete.ApplicationConstants import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesDao import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesType import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController -import de.westnordost.streetcomplete.util.* +import de.westnordost.streetcomplete.util.TilesRect +import de.westnordost.streetcomplete.util.area +import de.westnordost.streetcomplete.util.enclosingBoundingBox +import de.westnordost.streetcomplete.util.enclosingTilePos +import de.westnordost.streetcomplete.util.enclosingTilesRect import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import kotlin.math.PI diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/DownloadService.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/DownloadService.kt index dbf2965bae..00a6625531 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/DownloadService.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/DownloadService.kt @@ -13,7 +13,7 @@ import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.data.sync.CoroutineIntentService import de.westnordost.streetcomplete.data.sync.createSyncNotification import de.westnordost.streetcomplete.util.TilesRect -import kotlinx.coroutines.* +import kotlinx.coroutines.CancellationException import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/Downloader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/Downloader.kt index 2e4d5b654a..7c4d80ee32 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/Downloader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/Downloader.kt @@ -10,7 +10,8 @@ import de.westnordost.streetcomplete.data.osmnotes.NotesDownloader import de.westnordost.streetcomplete.ktx.format import de.westnordost.streetcomplete.util.TilesRect import de.westnordost.streetcomplete.util.area -import kotlinx.coroutines.* +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import java.lang.System.currentTimeMillis diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.kt index 6037481146..d5344f4411 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/MobileDataAutoDownloadStrategy.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.data.download -import javax.inject.Inject import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesDao import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import javax.inject.Inject /** Download strategy if user is on mobile data */ class MobileDataAutoDownloadStrategy @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.kt index 27a90d85d9..32c182ccf3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/WifiAutoDownloadStrategy.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.data.download -import javax.inject.Inject import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesDao import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import javax.inject.Inject /** Download strategy if user is on wifi */ class WifiAutoDownloadStrategy @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDao.kt index 34d0c82d12..24deaab1e4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/download/tiles/DownloadedTilesDao.kt @@ -1,15 +1,14 @@ package de.westnordost.streetcomplete.data.download.tiles import de.westnordost.streetcomplete.data.Database +import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.DATE +import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.TYPE import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.X import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.Y -import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.TYPE -import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.Columns.DATE import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesTable.NAME import de.westnordost.streetcomplete.util.TilePos import de.westnordost.streetcomplete.util.TilesRect import java.lang.System.currentTimeMillis - import javax.inject.Inject /** Keeps info in which areas things have been downloaded already in a tile grid */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/edithistory/EditItem.kt b/app/src/main/java/de/westnordost/streetcomplete/data/edithistory/EditItem.kt index dad4212b10..04423f397f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/edithistory/EditItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/edithistory/EditItem.kt @@ -6,7 +6,8 @@ import de.westnordost.streetcomplete.data.osm.edits.delete.DeletePoiNodeAction import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitWayAction import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestHidden import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEdit -import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.* +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.COMMENT +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.CREATE import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestHidden val Edit.icon: Int get() = when(this) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpression.kt b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpression.kt index 4554cb0a76..6910b3326c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpression.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpression.kt @@ -1,9 +1,23 @@ package de.westnordost.streetcomplete.data.elementfilter import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.NODES -import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.WAYS import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.RELATIONS -import de.westnordost.streetcomplete.data.elementfilter.filters.* +import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.WAYS +import de.westnordost.streetcomplete.data.elementfilter.filters.CombineFilters +import de.westnordost.streetcomplete.data.elementfilter.filters.CompareDateTagValue +import de.westnordost.streetcomplete.data.elementfilter.filters.CompareElementAge +import de.westnordost.streetcomplete.data.elementfilter.filters.CompareTagAge +import de.westnordost.streetcomplete.data.elementfilter.filters.CompareTagValue +import de.westnordost.streetcomplete.data.elementfilter.filters.ElementFilter +import de.westnordost.streetcomplete.data.elementfilter.filters.HasKey +import de.westnordost.streetcomplete.data.elementfilter.filters.HasKeyLike +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTag +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagLike +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagValueLike +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasKey +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasKeyLike +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasTag +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasTagValueLike import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import java.util.EnumSet diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParser.kt b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParser.kt index 04218d6201..3b228ed21e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParser.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParser.kt @@ -1,12 +1,35 @@ package de.westnordost.streetcomplete.data.elementfilter -import de.westnordost.streetcomplete.data.elementfilter.filters.* +import de.westnordost.streetcomplete.data.elementfilter.filters.CombineFilters +import de.westnordost.streetcomplete.data.elementfilter.filters.DateFilter +import de.westnordost.streetcomplete.data.elementfilter.filters.ElementFilter +import de.westnordost.streetcomplete.data.elementfilter.filters.ElementNewerThan +import de.westnordost.streetcomplete.data.elementfilter.filters.ElementOlderThan +import de.westnordost.streetcomplete.data.elementfilter.filters.FixedDate +import de.westnordost.streetcomplete.data.elementfilter.filters.HasDateTagGreaterOrEqualThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasDateTagGreaterThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasDateTagLessOrEqualThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasDateTagLessThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasKey +import de.westnordost.streetcomplete.data.elementfilter.filters.HasKeyLike +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTag +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagGreaterOrEqualThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagGreaterThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagLessOrEqualThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagLessThan +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagLike +import de.westnordost.streetcomplete.data.elementfilter.filters.HasTagValueLike +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasKey +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasKeyLike +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasTag +import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasTagValueLike +import de.westnordost.streetcomplete.data.elementfilter.filters.RelativeDate +import de.westnordost.streetcomplete.data.elementfilter.filters.TagNewerThan +import de.westnordost.streetcomplete.data.elementfilter.filters.TagOlderThan import de.westnordost.streetcomplete.data.meta.toCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element -import java.lang.NumberFormatException import java.text.ParseException import java.util.EnumSet -import kotlin.collections.ArrayList import kotlin.math.min /** diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/OverpassQueryCreator.kt b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/OverpassQueryCreator.kt index 6651b56f88..700e51fcf2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/OverpassQueryCreator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/elementfilter/OverpassQueryCreator.kt @@ -1,7 +1,10 @@ package de.westnordost.streetcomplete.data.elementfilter -import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.* -import de.westnordost.streetcomplete.data.elementfilter.filters.* +import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.NODES +import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.RELATIONS +import de.westnordost.streetcomplete.data.elementfilter.ElementsTypeFilter.WAYS +import de.westnordost.streetcomplete.data.elementfilter.filters.ElementFilter +import de.westnordost.streetcomplete.data.elementfilter.filters.toOverpassString import de.westnordost.streetcomplete.data.osm.mapdata.Element import java.util.EnumSet diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloadCacheConfig.kt b/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloadCacheConfig.kt index aa02102507..d84cf63c34 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloadCacheConfig.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloadCacheConfig.kt @@ -4,7 +4,8 @@ import android.content.Context import androidx.preference.PreferenceManager import de.westnordost.streetcomplete.ApplicationConstants.DELETE_OLD_DATA_AFTER import de.westnordost.streetcomplete.Prefs -import okhttp3.* +import okhttp3.Cache +import okhttp3.CacheControl import java.io.File import java.util.concurrent.TimeUnit import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloader.kt index 46b13d45c9..6447fbae33 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/maptiles/MapTilesDownloader.kt @@ -6,8 +6,17 @@ import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.ktx.format import de.westnordost.streetcomplete.map.VectorTileProvider import de.westnordost.streetcomplete.util.enclosingTilesRect -import kotlinx.coroutines.* -import okhttp3.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.launch +import kotlinx.coroutines.suspendCancellableCoroutine +import kotlinx.coroutines.withContext +import okhttp3.Call +import okhttp3.Callback +import okhttp3.HttpUrl +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Response import okhttp3.internal.Version import java.io.IOException import java.lang.System.currentTimeMillis diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/notifications/QuestSelectionHintController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/notifications/QuestSelectionHintController.kt index 9aac0dec0f..34a2bfc5d4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/notifications/QuestSelectionHintController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/notifications/QuestSelectionHintController.kt @@ -3,10 +3,11 @@ package de.westnordost.streetcomplete.data.notifications import android.content.SharedPreferences import de.westnordost.streetcomplete.ApplicationConstants.QUEST_COUNT_AT_WHICH_TO_SHOW_QUEST_SELECTION_HINT import de.westnordost.streetcomplete.Prefs +import de.westnordost.streetcomplete.data.notifications.QuestSelectionHintState.NOT_SHOWN +import de.westnordost.streetcomplete.data.notifications.QuestSelectionHintState.SHOULD_SHOW import de.westnordost.streetcomplete.data.quest.Quest import de.westnordost.streetcomplete.data.quest.QuestKey import de.westnordost.streetcomplete.data.quest.VisibleQuestsSource -import de.westnordost.streetcomplete.data.notifications.QuestSelectionHintState.* import java.util.concurrent.CopyOnWriteArrayList import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDao.kt index 12f957b8fd..599d68fd00 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/created_elements/CreatedElementsDao.kt @@ -2,9 +2,9 @@ package de.westnordost.streetcomplete.data.osm.created_elements import de.westnordost.streetcomplete.data.CursorPosition import de.westnordost.streetcomplete.data.Database -import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable.NAME -import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable.Columns.ELEMENT_TYPE import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable.Columns.ELEMENT_ID +import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable.Columns.ELEMENT_TYPE +import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsTable.NAME import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsController.kt index d22af024ce..400a201f57 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsController.kt @@ -2,7 +2,8 @@ package de.westnordost.streetcomplete.data.osm.edits import de.westnordost.streetcomplete.data.osm.edits.upload.LastEditTimeStore import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import java.lang.System.currentTimeMillis import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt index 2058952a86..c1d27f3d27 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSource.kt @@ -1,13 +1,26 @@ package de.westnordost.streetcomplete.data.osm.edits -import de.westnordost.streetcomplete.data.osm.mapdata.MapData -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryCreator import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryEntry -import de.westnordost.streetcomplete.data.osm.mapdata.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY +import de.westnordost.streetcomplete.data.osm.mapdata.MapData +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataChanges +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.util.intersect import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/delete/RevertDeletePoiNodeAction.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/delete/RevertDeletePoiNodeAction.kt index 92cdcb6122..0ddcb730e6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/delete/RevertDeletePoiNodeAction.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/delete/RevertDeletePoiNodeAction.kt @@ -4,7 +4,10 @@ import de.westnordost.streetcomplete.data.osm.edits.ElementEditAction import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider import de.westnordost.streetcomplete.data.osm.edits.IsRevertAction import de.westnordost.streetcomplete.data.osm.edits.NewElementsCount -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataChanges +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository +import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.upload.ConflictException import kotlinx.serialization.Serializable import java.lang.System.currentTimeMillis diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayAction.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayAction.kt index 5b4f646802..0cdf7e0f23 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayAction.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayAction.kt @@ -1,15 +1,25 @@ package de.westnordost.streetcomplete.data.osm.edits.split_way import de.westnordost.streetcomplete.data.osm.edits.ElementEditAction -import de.westnordost.streetcomplete.data.osm.edits.NewElementsCount import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider +import de.westnordost.streetcomplete.data.osm.edits.NewElementsCount import de.westnordost.streetcomplete.data.osm.edits.update_tags.isGeometrySubstantiallyDifferent -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataChanges +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.RelationMember +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.upload.ConflictException -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.containsAny +import de.westnordost.streetcomplete.ktx.findNext +import de.westnordost.streetcomplete.ktx.findPrevious +import de.westnordost.streetcomplete.ktx.firstAndLast +import de.westnordost.streetcomplete.ktx.indexOfMaxBy import kotlinx.serialization.Serializable import java.lang.System.currentTimeMillis -import kotlin.collections.ArrayList /** Action that performs a split on a way. * diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/SpatialPartsOfElement.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/SpatialPartsOfElement.kt index b1c7322776..88d220f474 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/SpatialPartsOfElement.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/SpatialPartsOfElement.kt @@ -1,6 +1,9 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.util.distanceTo internal fun isGeometrySubstantiallyDifferent(element: Element, newElement: Element) = diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsAction.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsAction.kt index 39f8f18f3e..10141586b4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsAction.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsAction.kt @@ -1,6 +1,9 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags -import de.westnordost.streetcomplete.data.osm.edits.* +import de.westnordost.streetcomplete.data.osm.edits.ElementEditAction +import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider +import de.westnordost.streetcomplete.data.osm.edits.IsActionRevertable +import de.westnordost.streetcomplete.data.osm.edits.NewElementsCount import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataChanges import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploader.kt index e41670f1ba..081912c351 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploader.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.data.osm.edits.upload import de.westnordost.streetcomplete.data.osm.edits.ElementEdit import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenQuestChangesetsManager -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates import de.westnordost.streetcomplete.data.upload.ConflictException import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploader.kt index a68121fe94..c8232f4adb 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploader.kt @@ -1,16 +1,27 @@ package de.westnordost.streetcomplete.data.osm.edits.upload import android.util.Log +import de.westnordost.streetcomplete.data.osm.edits.ElementEdit +import de.westnordost.streetcomplete.data.osm.edits.ElementEditsController +import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider +import de.westnordost.streetcomplete.data.osm.edits.IsRevertAction +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.MapData import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi -import de.westnordost.streetcomplete.data.osm.edits.* -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.upload.OnUploadedChangeListener import de.westnordost.streetcomplete.data.user.statistics.StatisticsController -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock - +import kotlinx.coroutines.withContext import javax.inject.Inject class ElementEditsUploader @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloser.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloser.kt index 83c55e12d5..bae8195671 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloser.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloser.kt @@ -1,16 +1,13 @@ package de.westnordost.streetcomplete.data.osm.edits.upload.changesets import android.content.Context -import java.util.concurrent.TimeUnit - -import javax.inject.Inject - import androidx.work.Constraints +import androidx.work.ExistingWorkPolicy.REPLACE import androidx.work.NetworkType import androidx.work.OneTimeWorkRequest import androidx.work.WorkManager - -import androidx.work.ExistingWorkPolicy.REPLACE +import java.util.concurrent.TimeUnit +import javax.inject.Inject class ChangesetAutoCloser @Inject constructor(private val context: Context) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloserWorker.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloserWorker.kt index f0749dcbeb..c68b21ecc5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloserWorker.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/ChangesetAutoCloserWorker.kt @@ -1,14 +1,12 @@ package de.westnordost.streetcomplete.data.osm.edits.upload.changesets import android.content.Context - -import javax.inject.Inject - import androidx.work.Worker import androidx.work.WorkerParameters import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.user.AuthorizationException +import javax.inject.Inject class ChangesetAutoCloserWorker(context: Context, workerParams: WorkerParameters) : Worker(context, workerParams) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDao.kt index 47959d13b0..8bafcd05b6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenChangesetsDao.kt @@ -2,13 +2,11 @@ package de.westnordost.streetcomplete.data.osm.edits.upload.changesets import de.westnordost.streetcomplete.data.CursorPosition import de.westnordost.streetcomplete.data.Database - -import javax.inject.Inject - import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable.Columns.CHANGESET_ID import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable.Columns.QUEST_TYPE import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable.Columns.SOURCE import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenChangesetsTable.NAME +import javax.inject.Inject /** Keep track of changesets and the date of the last change that has been made to them */ class OpenChangesetsDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometry.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometry.kt index 0a56e915f4..b12ce67e44 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometry.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometry.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.data.osm.geometry import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon - import de.westnordost.streetcomplete.util.enclosingBoundingBox import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreator.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreator.kt index 1036dcb83e..300536edb9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreator.kt @@ -1,13 +1,17 @@ package de.westnordost.streetcomplete.data.osm.geometry +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osm.mapdata.MapData -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.ktx.isArea import de.westnordost.streetcomplete.util.centerPointOfPolygon import de.westnordost.streetcomplete.util.centerPointOfPolyline import de.westnordost.streetcomplete.util.isRingDefinedClockwise import javax.inject.Inject -import kotlin.collections.ArrayList /** Creates an ElementGeometry from an element and a collection of positions. */ class ElementGeometryCreator @Inject constructor() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDao.kt index 388cfb57fa..b7066126d2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryDao.kt @@ -1,15 +1,13 @@ package de.westnordost.streetcomplete.data.osm.geometry -import javax.inject.Inject - import de.westnordost.streetcomplete.data.CursorPosition import de.westnordost.streetcomplete.data.Database +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.CENTER_LATITUDE +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.CENTER_LONGITUDE import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.ELEMENT_ID import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.ELEMENT_TYPE import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.GEOMETRY_POLYGONS import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.GEOMETRY_POLYLINES -import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.CENTER_LATITUDE -import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.CENTER_LONGITUDE import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.MAX_LATITUDE import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.MAX_LONGITUDE import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryTable.Columns.MIN_LATITUDE @@ -20,6 +18,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.queryIn +import javax.inject.Inject /** Stores the geometry of elements */ class ElementGeometryDao @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDao.kt index b042ff10ba..8b644f7656 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDao.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.data.osm.mapdata +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY import javax.inject.Inject -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* - /** Stores OSM elements. Actually, stores nothing, but delegates the work to a NodeDao, WayDao and * a RelationDao. :-P */ class ElementDao @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataApiImpl.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataApiImpl.kt index cfa0d4c662..fafa6eb337 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataApiImpl.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataApiImpl.kt @@ -1,24 +1,33 @@ package de.westnordost.streetcomplete.data.osm.mapdata import de.westnordost.osmapi.OsmConnection -import de.westnordost.osmapi.common.errors.* -import de.westnordost.osmapi.map.data.* - -import de.westnordost.osmapi.map.MapDataApi as OsmApiMapDataApi -import de.westnordost.osmapi.map.data.Element as OsmApiElement -import de.westnordost.osmapi.map.data.Node as OsmApiNode -import de.westnordost.osmapi.map.data.Way as OsmApiWay -import de.westnordost.osmapi.map.data.Relation as OsmApiRelation -import de.westnordost.osmapi.map.data.RelationMember as OsmApiRelationMember -import de.westnordost.osmapi.map.data.BoundingBox as OsmApiBoundingBox -import de.westnordost.osmapi.map.changes.DiffElement as OsmApiDiffElement - +import de.westnordost.osmapi.common.errors.OsmApiException +import de.westnordost.osmapi.common.errors.OsmApiReadResponseException +import de.westnordost.osmapi.common.errors.OsmAuthorizationException +import de.westnordost.osmapi.common.errors.OsmConflictException +import de.westnordost.osmapi.common.errors.OsmConnectionException +import de.westnordost.osmapi.common.errors.OsmNotFoundException +import de.westnordost.osmapi.common.errors.OsmQueryTooBigException +import de.westnordost.osmapi.map.data.OsmElement +import de.westnordost.osmapi.map.data.OsmLatLon +import de.westnordost.osmapi.map.data.OsmNode +import de.westnordost.osmapi.map.data.OsmRelation +import de.westnordost.osmapi.map.data.OsmRelationMember +import de.westnordost.osmapi.map.data.OsmWay import de.westnordost.osmapi.map.handler.MapDataHandler import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.download.QueryTooBigException import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.user.AuthorizationException import java.time.Instant +import de.westnordost.osmapi.map.MapDataApi as OsmApiMapDataApi +import de.westnordost.osmapi.map.changes.DiffElement as OsmApiDiffElement +import de.westnordost.osmapi.map.data.BoundingBox as OsmApiBoundingBox +import de.westnordost.osmapi.map.data.Element as OsmApiElement +import de.westnordost.osmapi.map.data.Node as OsmApiNode +import de.westnordost.osmapi.map.data.Relation as OsmApiRelation +import de.westnordost.osmapi.map.data.RelationMember as OsmApiRelationMember +import de.westnordost.osmapi.map.data.Way as OsmApiWay class MapDataApiImpl(osm: OsmConnection) : MapDataApi { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataController.kt index 03dec587c1..1579ceba36 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataController.kt @@ -2,7 +2,10 @@ package de.westnordost.streetcomplete.data.osm.mapdata import android.util.Log import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsController -import de.westnordost.streetcomplete.data.osm.geometry.* +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryCreator +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryDao +import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryEntry import de.westnordost.streetcomplete.ktx.format import java.lang.System.currentTimeMillis import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDao.kt index 22343c7da9..0ae2912e54 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/NodeDao.kt @@ -1,7 +1,5 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import javax.inject.Inject - import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.NodeTable.Columns.ID import de.westnordost.streetcomplete.data.osm.mapdata.NodeTable.Columns.LAST_SYNC @@ -15,6 +13,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.lang.System.currentTimeMillis +import javax.inject.Inject /** Stores OSM nodes */ class NodeDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDao.kt index e49d67c4ff..d9d565b512 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/RelationDao.kt @@ -1,7 +1,5 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import javax.inject.Inject - import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.RelationTables.Columns.ID import de.westnordost.streetcomplete.data.osm.mapdata.RelationTables.Columns.INDEX @@ -18,6 +16,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.lang.System.currentTimeMillis +import javax.inject.Inject /** Stores OSM relations */ class RelationDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDao.kt index 6941e92bac..f500b8fe3a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/mapdata/WayDao.kt @@ -1,7 +1,5 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import javax.inject.Inject - import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.WayTables.Columns.ID import de.westnordost.streetcomplete.data.osm.mapdata.WayTables.Columns.INDEX @@ -16,6 +14,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.lang.System.currentTimeMillis +import javax.inject.Inject /** Stores OSM ways */ class WayDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmElementQuestType.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmElementQuestType.kt index 24a5e0f757..19f0bd66cd 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmElementQuestType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmElementQuestType.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.data.osm.osmquests +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder +import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry -import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.quest.AllCountries import de.westnordost.streetcomplete.data.quest.Countries +import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.ktx.arrayOfNotNull -import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder -import de.westnordost.streetcomplete.data.osm.mapdata.Element /** Quest type where each quest refers to an OSM element */ interface OsmElementQuestType : QuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmFilterQuestType.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmFilterQuestType.kt index a9bed3fb9f..c3fe3b42b2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmFilterQuestType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmFilterQuestType.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.data.osm.osmquests import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter /** Quest type that's based on a simple element filter expression */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuest.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuest.kt index f6c3105d45..9ff5f76646 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuest.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuest.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.data.osm.osmquests -import de.westnordost.streetcomplete.data.quest.Quest -import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.util.measuredLength import de.westnordost.streetcomplete.util.pointOnPolylineFromStart diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestController.kt index be70f3adf9..37c3216441 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestController.kt @@ -7,7 +7,11 @@ import de.westnordost.countryboundaries.isInAny import de.westnordost.streetcomplete.ApplicationConstants import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osmnotes.Note import de.westnordost.streetcomplete.data.osmnotes.edits.NotesWithEditsSource import de.westnordost.streetcomplete.data.quest.OsmQuestKey @@ -22,7 +26,14 @@ import de.westnordost.streetcomplete.quests.place_name.AddPlaceName import de.westnordost.streetcomplete.util.contains import de.westnordost.streetcomplete.util.enclosingBoundingBox import de.westnordost.streetcomplete.util.enlargedBy -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Deferred +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.async +import kotlinx.coroutines.awaitAll +import kotlinx.coroutines.runBlocking +import kotlinx.coroutines.withContext import java.lang.System.currentTimeMillis import java.util.concurrent.CopyOnWriteArrayList import java.util.concurrent.FutureTask diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDao.kt index 261fde4547..e30cbb7684 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestDao.kt @@ -6,11 +6,11 @@ import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import de.westnordost.streetcomplete.data.osm.mapdata.LatLon -import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.QUEST_TYPE -import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.ELEMENT_TYPE import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.ELEMENT_ID +import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.ELEMENT_TYPE import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.LATITUDE import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.LONGITUDE +import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.Columns.QUEST_TYPE import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestTable.NAME import de.westnordost.streetcomplete.data.queryIn import de.westnordost.streetcomplete.data.quest.OsmQuestKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NoteDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NoteDao.kt index 146217fa49..0149597dd5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NoteDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NoteDao.kt @@ -1,7 +1,5 @@ package de.westnordost.streetcomplete.data.osmnotes -import javax.inject.Inject - import de.westnordost.streetcomplete.data.CursorPosition import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox @@ -19,6 +17,7 @@ import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import java.lang.System.currentTimeMillis +import javax.inject.Inject /** Stores OSM notes */ class NoteDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApi.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApi.kt index 75c2a62244..8d973914c1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApi.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApi.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.data.osmnotes -import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox -import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.download.QueryTooBigException +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.user.AuthorizationException diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApiImpl.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApiImpl.kt index bc16800bc7..9d8ad6282d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApiImpl.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesApiImpl.kt @@ -11,14 +11,15 @@ import de.westnordost.osmapi.common.errors.OsmQueryTooBigException import de.westnordost.osmapi.map.data.OsmLatLon import de.westnordost.streetcomplete.data.download.ConnectionException import de.westnordost.streetcomplete.data.download.QueryTooBigException -import de.westnordost.osmapi.notes.NotesApi as OsmApiNotesApi -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.user.AuthorizationException import de.westnordost.streetcomplete.data.user.User import de.westnordost.osmapi.map.data.BoundingBox as OsmApiBoundingBox import de.westnordost.osmapi.notes.Note as OsmApiNote import de.westnordost.osmapi.notes.NoteComment as OsmApiNoteComment +import de.westnordost.osmapi.notes.NotesApi as OsmApiNotesApi import de.westnordost.osmapi.user.User as OsmApiUser class NotesApiImpl(osm: OsmConnection) : NotesApi { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloader.kt index 0b088a39a3..035147fd07 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloader.kt @@ -2,14 +2,12 @@ package de.westnordost.streetcomplete.data.osmnotes import android.util.Log import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox - -import javax.inject.Inject - import de.westnordost.streetcomplete.ktx.format import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import kotlinx.coroutines.yield import java.lang.System.currentTimeMillis +import javax.inject.Inject /** Takes care of downloading notes and referenced avatar pictures into persistent storage */ class NotesDownloader @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/StreetCompleteImageUploader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/StreetCompleteImageUploader.kt index ee99088a1e..bc05dc3731 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/StreetCompleteImageUploader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/StreetCompleteImageUploader.kt @@ -1,17 +1,15 @@ package de.westnordost.streetcomplete.data.osmnotes +import de.westnordost.streetcomplete.ApplicationConstants +import de.westnordost.streetcomplete.data.download.ConnectionException import org.json.JSONException import org.json.JSONObject - import java.io.File import java.io.IOException import java.net.HttpURLConnection import java.net.URL import java.net.URLConnection -import de.westnordost.streetcomplete.ApplicationConstants -import de.westnordost.streetcomplete.data.download.ConnectionException - /** Upload and activate a list of image paths to an instance of the * StreetComplete image hosting service */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDao.kt index da169595e6..f7d3082f52 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsDao.kt @@ -5,7 +5,6 @@ import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.CREATED_TIMESTAMP -import javax.inject.Inject import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.ID import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.IMAGES_NEED_ACTIVATION import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.IMAGE_PATHS @@ -16,10 +15,10 @@ import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns. import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.TEXT import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.Columns.TYPE import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsTable.NAME -import de.westnordost.streetcomplete.ktx.* import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json +import javax.inject.Inject class NoteEditsDao @Inject constructor(private val db: Database) { fun add(edit: NoteEdit): Boolean = diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploader.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploader.kt index 786a9c8dcb..7f9ef2e903 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploader.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploader.kt @@ -1,13 +1,21 @@ package de.westnordost.streetcomplete.data.osmnotes.edits import android.util.Log -import de.westnordost.streetcomplete.data.osmnotes.* +import de.westnordost.streetcomplete.data.osmnotes.NoteController +import de.westnordost.streetcomplete.data.osmnotes.NotesApi +import de.westnordost.streetcomplete.data.osmnotes.StreetCompleteImageUploader +import de.westnordost.streetcomplete.data.osmnotes.deleteImages +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.COMMENT +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.CREATE import de.westnordost.streetcomplete.data.upload.ConflictException -import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.* import de.westnordost.streetcomplete.data.upload.OnUploadedChangeListener -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.withContext import javax.inject.Inject class NoteEditsUploader @Inject constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSource.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSource.kt index 0c95b0daa7..67cdb1b6aa 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSource.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSource.kt @@ -5,7 +5,8 @@ import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osmnotes.Note import de.westnordost.streetcomplete.data.osmnotes.NoteComment import de.westnordost.streetcomplete.data.osmnotes.NoteController -import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.* +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.COMMENT +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.CREATE import de.westnordost.streetcomplete.data.user.User import de.westnordost.streetcomplete.data.user.UserDataSource import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuest.kt b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuest.kt index 0713cdbf7f..3fcd41e04a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuest.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuest.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.data.osmnotes.notequests -import de.westnordost.streetcomplete.data.quest.Quest -import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.quest.OsmNoteQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestType /** Represents one task for the user to contribute to a public OSM note */ data class OsmNoteQuest( diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestAutoSyncer.kt b/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestAutoSyncer.kt index c420fc6c87..a6fb835571 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestAutoSyncer.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestAutoSyncer.kt @@ -1,7 +1,11 @@ package de.westnordost.streetcomplete.data.quest import android.annotation.SuppressLint -import android.content.* +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.SharedPreferences import android.net.ConnectivityManager import android.util.Log import androidx.core.content.getSystemService @@ -9,8 +13,12 @@ import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent import de.westnordost.streetcomplete.Prefs -import de.westnordost.streetcomplete.data.download.* import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource +import de.westnordost.streetcomplete.data.download.DownloadController +import de.westnordost.streetcomplete.data.download.DownloadProgressListener +import de.westnordost.streetcomplete.data.download.DownloadProgressSource +import de.westnordost.streetcomplete.data.download.MobileDataAutoDownloadStrategy +import de.westnordost.streetcomplete.data.download.WifiAutoDownloadStrategy import de.westnordost.streetcomplete.data.download.tiles.DownloadedTilesDao import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.upload.UploadController @@ -19,7 +27,11 @@ import de.westnordost.streetcomplete.data.visiblequests.TeamModeQuestFilter import de.westnordost.streetcomplete.ktx.format import de.westnordost.streetcomplete.ktx.toLatLon import de.westnordost.streetcomplete.location.FineLocationManager -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancelChildren +import kotlinx.coroutines.launch import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestController.kt b/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestController.kt index ef5a4a5dc0..530c87635d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/quest/QuestController.kt @@ -4,11 +4,14 @@ import android.util.Log import de.westnordost.streetcomplete.ApplicationConstants import de.westnordost.streetcomplete.data.meta.KEYS_THAT_SHOULD_BE_REMOVED_WHEN_SHOP_IS_REPLACED import de.westnordost.streetcomplete.data.meta.removeCheckDates -import de.westnordost.streetcomplete.data.osm.edits.* +import de.westnordost.streetcomplete.data.osm.edits.ElementEditsController +import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.edits.delete.DeletePoiNodeAction import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitPolylineAtPosition import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitWayAction -import de.westnordost.streetcomplete.data.osm.edits.update_tags.* +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChanges +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder +import de.westnordost.streetcomplete.data.osm.edits.update_tags.UpdateElementTagsAction import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.LatLon @@ -24,7 +27,6 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import javax.inject.Inject import javax.inject.Singleton -import kotlin.collections.ArrayList /** Controls the workflow of quests: Solving them, hiding them instead, splitting the way instead, * undoing, etc. */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/sync/CoroutineIntentService.kt b/app/src/main/java/de/westnordost/streetcomplete/data/sync/CoroutineIntentService.kt index 90753f7917..a3276cf44a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/sync/CoroutineIntentService.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/sync/CoroutineIntentService.kt @@ -2,11 +2,18 @@ package de.westnordost.streetcomplete.data.sync import android.app.Service import android.content.Intent -import android.os.* +import android.os.IBinder import androidx.annotation.WorkerThread -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.Job +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock +import kotlinx.coroutines.yield /** * CoroutineIntentService is similar to IntentService only that it is coroutines enabled and diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/sync/SyncNotification.kt b/app/src/main/java/de/westnordost/streetcomplete/data/sync/SyncNotification.kt index 728ea4fe1a..0a2ab03c1e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/sync/SyncNotification.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/sync/SyncNotification.kt @@ -1,14 +1,15 @@ package de.westnordost.streetcomplete.data.sync -import android.app.* +import android.app.Notification +import android.app.PendingIntent import android.app.PendingIntent.FLAG_IMMUTABLE import android.content.Context import android.content.Intent import android.os.Build import androidx.core.app.NotificationChannelCompat -import androidx.core.app.NotificationManagerCompat.IMPORTANCE_LOW import androidx.core.app.NotificationCompat import androidx.core.app.NotificationManagerCompat +import androidx.core.app.NotificationManagerCompat.IMPORTANCE_LOW import de.westnordost.streetcomplete.ApplicationConstants.NAME import de.westnordost.streetcomplete.ApplicationConstants.NOTIFICATIONS_CHANNEL_SYNC import de.westnordost.streetcomplete.MainActivity diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/upload/UploadService.kt b/app/src/main/java/de/westnordost/streetcomplete/data/upload/UploadService.kt index 18e589c6d1..14945dcc64 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/upload/UploadService.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/upload/UploadService.kt @@ -9,13 +9,11 @@ import android.os.Build import android.os.IBinder import android.util.Log import de.westnordost.streetcomplete.ApplicationConstants.NOTIFICATIONS_ID_SYNC - -import javax.inject.Inject - import de.westnordost.streetcomplete.Injector -import de.westnordost.streetcomplete.data.sync.CoroutineIntentService import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.sync.CoroutineIntentService import de.westnordost.streetcomplete.data.sync.createSyncNotification +import javax.inject.Inject /** Collects and uploads all changes the user has done: notes he left, comments he left on existing * notes and quests he answered */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDao.kt index b186ab86a1..34e6a1a694 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserAchievementsDao.kt @@ -4,7 +4,6 @@ import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable.Columns.ACHIEVEMENT import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable.Columns.LEVEL import de.westnordost.streetcomplete.data.user.achievements.UserAchievementsTable.NAME - import javax.inject.Inject /** Stores which achievement ids have been unlocked by the user and at which level */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDao.kt index 03a7b48f04..c91310299a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/user/achievements/UserLinksDao.kt @@ -3,7 +3,6 @@ package de.westnordost.streetcomplete.data.user.achievements import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.user.achievements.UserLinksTable.Columns.LINK import de.westnordost.streetcomplete.data.user.achievements.UserLinksTable.NAME - import javax.inject.Inject /** Stores which link ids have been unlocked by the user */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDao.kt index 63aaed18e3..abb4eb421b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/CountryStatisticsDao.kt @@ -6,7 +6,6 @@ import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTable import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTable.Columns.RANK import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTable.Columns.SUCCEEDED import de.westnordost.streetcomplete.data.user.statistics.CountryStatisticsTable.NAME - import javax.inject.Inject /** Stores how many quests the user solved in which country */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDao.kt index 2604a87660..b7faed1690 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/user/statistics/QuestTypeStatisticsDao.kt @@ -1,12 +1,10 @@ package de.westnordost.streetcomplete.data.user.statistics import de.westnordost.streetcomplete.data.Database - -import javax.inject.Inject - import de.westnordost.streetcomplete.data.user.statistics.QuestTypeStatisticsTable.Columns.QUEST_TYPE import de.westnordost.streetcomplete.data.user.statistics.QuestTypeStatisticsTable.Columns.SUCCEEDED import de.westnordost.streetcomplete.data.user.statistics.QuestTypeStatisticsTable.NAME +import javax.inject.Inject /** Stores how many quests of which quest types the user solved */ class QuestTypeStatisticsDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetsDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetsDao.kt index 22b033ff36..f0da72820d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetsDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetsDao.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.data.visiblequests import de.westnordost.streetcomplete.data.Database -import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable.NAME import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable.Columns.QUEST_PRESET_ID import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable.Columns.QUEST_PRESET_NAME +import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsTable.NAME import javax.inject.Inject class QuestPresetsDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDao.kt b/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDao.kt index 09bee1c401..be6629e050 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeDao.kt @@ -2,12 +2,10 @@ package de.westnordost.streetcomplete.data.visiblequests import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable.Columns.QUEST_PRESET_ID - -import javax.inject.Inject - import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable.Columns.QUEST_TYPE import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable.Columns.VISIBILITY import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeTable.NAME +import javax.inject.Inject /** Stores which quest types are visible by user selection and which are not */ class VisibleQuestTypeDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/edithistory/UndoDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/edithistory/UndoDialog.kt index 04f9a19c2a..c2c70e591f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/edithistory/UndoDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/edithistory/UndoDialog.kt @@ -22,11 +22,16 @@ import de.westnordost.streetcomplete.data.osm.edits.ElementEdit import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.edits.delete.DeletePoiNodeAction import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitWayAction -import de.westnordost.streetcomplete.data.osm.edits.update_tags.* +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryChange +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete +import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify +import de.westnordost.streetcomplete.data.osm.edits.update_tags.UpdateElementTagsAction import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestHidden import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEdit -import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.* +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.COMMENT +import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditAction.CREATE import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestHidden import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.databinding.DialogUndoBinding @@ -35,7 +40,11 @@ import de.westnordost.streetcomplete.view.CharSequenceText import de.westnordost.streetcomplete.view.ResText import de.westnordost.streetcomplete.view.Text import de.westnordost.streetcomplete.view.setText -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import org.sufficientlysecure.htmltextview.HtmlTextView import java.util.MissingFormatArgumentException import java.util.concurrent.FutureTask diff --git a/app/src/main/java/de/westnordost/streetcomplete/ktx/Context.kt b/app/src/main/java/de/westnordost/streetcomplete/ktx/Context.kt index 0d8ded8fd3..89a4352694 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ktx/Context.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ktx/Context.kt @@ -1,5 +1,6 @@ package de.westnordost.streetcomplete.ktx +import android.Manifest.permission.ACCESS_FINE_LOCATION import android.content.BroadcastReceiver import android.content.Context import android.content.Intent @@ -16,7 +17,6 @@ import androidx.core.content.getSystemService import androidx.core.location.LocationManagerCompat import kotlinx.coroutines.suspendCancellableCoroutine import kotlin.coroutines.resume -import android.Manifest.permission.ACCESS_FINE_LOCATION fun Context.toast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/ktx/Cursor.kt b/app/src/main/java/de/westnordost/streetcomplete/ktx/Cursor.kt index 4d1c15fcd9..69c0560093 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ktx/Cursor.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ktx/Cursor.kt @@ -1,7 +1,13 @@ package de.westnordost.streetcomplete.ktx import android.database.Cursor -import androidx.core.database.* +import androidx.core.database.getBlobOrNull +import androidx.core.database.getDoubleOrNull +import androidx.core.database.getFloatOrNull +import androidx.core.database.getIntOrNull +import androidx.core.database.getLongOrNull +import androidx.core.database.getShortOrNull +import androidx.core.database.getStringOrNull fun Cursor.getLong(columnName: String): Long = getLong(getColumnIndexOrThrow(columnName)) fun Cursor.getInt(columnName: String): Int = getInt(getColumnIndexOrThrow(columnName)) diff --git a/app/src/main/java/de/westnordost/streetcomplete/ktx/Element.kt b/app/src/main/java/de/westnordost/streetcomplete/ktx/Element.kt index 35d92b6da6..9b7c92124f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ktx/Element.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ktx/Element.kt @@ -3,7 +3,11 @@ package de.westnordost.streetcomplete.ktx import de.westnordost.osmfeatures.GeometryType import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.osm.Level import de.westnordost.streetcomplete.osm.LevelRange import de.westnordost.streetcomplete.osm.SingleLevel diff --git a/app/src/main/java/de/westnordost/streetcomplete/ktx/Resources.kt b/app/src/main/java/de/westnordost/streetcomplete/ktx/Resources.kt index 8df9300d6f..08c01e39f4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ktx/Resources.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ktx/Resources.kt @@ -7,7 +7,9 @@ import android.graphics.drawable.Drawable import androidx.annotation.DrawableRes import androidx.annotation.RawRes import com.esotericsoftware.yamlbeans.YamlReader -import de.westnordost.streetcomplete.view.* +import de.westnordost.streetcomplete.view.DrawableImage +import de.westnordost.streetcomplete.view.Image +import de.westnordost.streetcomplete.view.ResImage import java.io.BufferedReader import java.io.InputStreamReader diff --git a/app/src/main/java/de/westnordost/streetcomplete/ktx/View.kt b/app/src/main/java/de/westnordost/streetcomplete/ktx/View.kt index 2e7941a7c8..28739ed254 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/ktx/View.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/ktx/View.kt @@ -9,7 +9,9 @@ import android.view.animation.AccelerateInterpolator import android.view.animation.DecelerateInterpolator import androidx.core.graphics.Insets import androidx.core.os.postDelayed -import androidx.core.view.* +import androidx.core.view.OneShotPreDrawListener +import androidx.core.view.ViewCompat +import androidx.core.view.updateLayoutParams import kotlinx.coroutines.suspendCancellableCoroutine import kotlin.coroutines.resume diff --git a/app/src/main/java/de/westnordost/streetcomplete/location/LocationRequester.kt b/app/src/main/java/de/westnordost/streetcomplete/location/LocationRequester.kt index d576396b2d..e001608085 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/location/LocationRequester.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/location/LocationRequester.kt @@ -12,7 +12,9 @@ import androidx.appcompat.app.AlertDialog import androidx.core.app.ActivityCompat import androidx.localbroadcastmanager.content.LocalBroadcastManager import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.awaitReceiverCall +import de.westnordost.streetcomplete.ktx.hasLocationPermission +import de.westnordost.streetcomplete.ktx.isLocationEnabled import de.westnordost.streetcomplete.util.ActivityForResultLauncher import kotlinx.coroutines.async import kotlinx.coroutines.coroutineScope diff --git a/app/src/main/java/de/westnordost/streetcomplete/location/LocationStateButton.kt b/app/src/main/java/de/westnordost/streetcomplete/location/LocationStateButton.kt index 698cae9bb1..77b562bda8 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/location/LocationStateButton.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/location/LocationStateButton.kt @@ -11,7 +11,11 @@ import android.view.View import androidx.annotation.Keep import androidx.appcompat.widget.AppCompatImageButton import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.location.LocationState.* +import de.westnordost.streetcomplete.location.LocationState.ALLOWED +import de.westnordost.streetcomplete.location.LocationState.DENIED +import de.westnordost.streetcomplete.location.LocationState.ENABLED +import de.westnordost.streetcomplete.location.LocationState.SEARCHING +import de.westnordost.streetcomplete.location.LocationState.UPDATING /** * An image button which shows the current location state diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/Compass.kt b/app/src/main/java/de/westnordost/streetcomplete/map/Compass.kt index dabea5393d..4e49144a19 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/Compass.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/Compass.kt @@ -1,6 +1,10 @@ package de.westnordost.streetcomplete.map -import android.hardware.* +import android.hardware.GeomagneticField +import android.hardware.Sensor +import android.hardware.SensorEvent +import android.hardware.SensorEventListener +import android.hardware.SensorManager import android.location.Location import android.os.Handler import android.os.HandlerThread diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/EditHistoryPinsManager.kt b/app/src/main/java/de/westnordost/streetcomplete/map/EditHistoryPinsManager.kt index 6f9d080aa3..9920c1b9df 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/EditHistoryPinsManager.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/EditHistoryPinsManager.kt @@ -4,7 +4,14 @@ import android.content.res.Resources import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent -import de.westnordost.streetcomplete.data.edithistory.* +import de.westnordost.streetcomplete.data.edithistory.Edit +import de.westnordost.streetcomplete.data.edithistory.EditHistorySource +import de.westnordost.streetcomplete.data.edithistory.EditKey +import de.westnordost.streetcomplete.data.edithistory.ElementEditKey +import de.westnordost.streetcomplete.data.edithistory.NoteEditKey +import de.westnordost.streetcomplete.data.edithistory.OsmNoteQuestHiddenKey +import de.westnordost.streetcomplete.data.edithistory.OsmQuestHiddenKey +import de.westnordost.streetcomplete.data.edithistory.icon import de.westnordost.streetcomplete.data.osm.edits.ElementEdit import de.westnordost.streetcomplete.data.osm.mapdata.ElementType import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestHidden @@ -14,7 +21,13 @@ import de.westnordost.streetcomplete.data.quest.OsmNoteQuestKey import de.westnordost.streetcomplete.data.quest.OsmQuestKey import de.westnordost.streetcomplete.map.components.Pin import de.westnordost.streetcomplete.map.components.PinsMapComponent -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.cancelChildren +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext class EditHistoryPinsManager( private val pinsMapComponent: PinsMapComponent, diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/MainFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/map/MainFragment.kt index 123fc61a9d..e54c9ba995 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/MainFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/MainFragment.kt @@ -1,7 +1,11 @@ package de.westnordost.streetcomplete.map import android.annotation.SuppressLint -import android.content.* +import android.content.BroadcastReceiver +import android.content.Context +import android.content.Intent +import android.content.IntentFilter +import android.content.SharedPreferences import android.content.res.Configuration import android.graphics.Point import android.graphics.PointF @@ -30,7 +34,11 @@ import androidx.fragment.app.FragmentManager.POP_BACK_STACK_INCLUSIVE import androidx.fragment.app.commit import androidx.lifecycle.lifecycleScope import androidx.localbroadcastmanager.content.LocalBroadcastManager -import de.westnordost.streetcomplete.* +import de.westnordost.streetcomplete.ApplicationConstants +import de.westnordost.streetcomplete.HandlesOnBackPressed +import de.westnordost.streetcomplete.Injector +import de.westnordost.streetcomplete.Prefs +import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.controls.MainMenuButtonFragment import de.westnordost.streetcomplete.controls.UndoButtonFragment import de.westnordost.streetcomplete.data.edithistory.Edit @@ -39,27 +47,61 @@ import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.edits.split_way.SplitPolylineAtPosition import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuest -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestController +import de.westnordost.streetcomplete.data.quest.QuestKey +import de.westnordost.streetcomplete.data.quest.VisibleQuestsSource import de.westnordost.streetcomplete.databinding.EffectQuestPlopBinding import de.westnordost.streetcomplete.databinding.FragmentMainBinding import de.westnordost.streetcomplete.edithistory.EditHistoryFragment -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.childFragmentManagerOrNull +import de.westnordost.streetcomplete.ktx.getLevelsOrNull +import de.westnordost.streetcomplete.ktx.getLocationInWindow +import de.westnordost.streetcomplete.ktx.hasLocationPermission +import de.westnordost.streetcomplete.ktx.hideKeyboard +import de.westnordost.streetcomplete.ktx.isLocationEnabled +import de.westnordost.streetcomplete.ktx.setMargins +import de.westnordost.streetcomplete.ktx.toPx +import de.westnordost.streetcomplete.ktx.toast +import de.westnordost.streetcomplete.ktx.viewBinding +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.location.FineLocationManager -import de.westnordost.streetcomplete.location.LocationState import de.westnordost.streetcomplete.location.LocationRequester import de.westnordost.streetcomplete.location.LocationRequester.Companion.REQUEST_LOCATION_PERMISSION_RESULT +import de.westnordost.streetcomplete.location.LocationState import de.westnordost.streetcomplete.map.tangram.CameraPosition import de.westnordost.streetcomplete.osm.levelsIntersect -import de.westnordost.streetcomplete.quests.* -import de.westnordost.streetcomplete.util.* +import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment +import de.westnordost.streetcomplete.quests.CreateNoteFragment +import de.westnordost.streetcomplete.quests.IsCloseableBottomSheet +import de.westnordost.streetcomplete.quests.IsLockable +import de.westnordost.streetcomplete.quests.IsShowingQuestDetails +import de.westnordost.streetcomplete.quests.LeaveNoteInsteadFragment +import de.westnordost.streetcomplete.quests.ShowsGeometryMarkers +import de.westnordost.streetcomplete.quests.SplitWayFragment +import de.westnordost.streetcomplete.util.SoundFx +import de.westnordost.streetcomplete.util.area +import de.westnordost.streetcomplete.util.asBoundingBoxOfEnclosingTiles +import de.westnordost.streetcomplete.util.buildGeoUri +import de.westnordost.streetcomplete.util.enclosingBoundingBox +import de.westnordost.streetcomplete.util.initialBearingTo import de.westnordost.streetcomplete.view.insets_animation.respectSystemInsets import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import javax.inject.Inject -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.cos +import kotlin.math.sin +import kotlin.math.sqrt import kotlin.random.Random /** Contains the quests map and the controls for it. diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt index 686f5ecacb..398f8e43f1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/MapFragment.kt @@ -16,7 +16,13 @@ import androidx.appcompat.app.AlertDialog import androidx.core.content.edit import androidx.core.net.toUri import androidx.fragment.app.Fragment -import com.mapzen.tangram.TouchInput.* +import com.mapzen.tangram.TouchInput.DoubleTapResponder +import com.mapzen.tangram.TouchInput.LongPressResponder +import com.mapzen.tangram.TouchInput.PanResponder +import com.mapzen.tangram.TouchInput.RotateResponder +import com.mapzen.tangram.TouchInput.ScaleResponder +import com.mapzen.tangram.TouchInput.ShoveResponder +import com.mapzen.tangram.TouchInput.TapResponder import com.mapzen.tangram.networking.DefaultHttpHandler import com.mapzen.tangram.networking.HttpHandler import de.westnordost.streetcomplete.ApplicationConstants @@ -27,9 +33,18 @@ import de.westnordost.streetcomplete.data.maptiles.MapTilesDownloadCacheConfig import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.databinding.FragmentMapBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.awaitLayout +import de.westnordost.streetcomplete.ktx.containsAll +import de.westnordost.streetcomplete.ktx.setMargins +import de.westnordost.streetcomplete.ktx.tryStartActivity +import de.westnordost.streetcomplete.ktx.viewBinding +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.map.components.SceneMapComponent -import de.westnordost.streetcomplete.map.tangram.* +import de.westnordost.streetcomplete.map.tangram.CameraPosition +import de.westnordost.streetcomplete.map.tangram.CameraUpdate +import de.westnordost.streetcomplete.map.tangram.KtMapController +import de.westnordost.streetcomplete.map.tangram.MapChangingListener +import de.westnordost.streetcomplete.map.tangram.initMap import de.westnordost.streetcomplete.view.insets_animation.respectSystemInsets import kotlinx.coroutines.delay import kotlinx.coroutines.launch diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/QuestPinsManager.kt b/app/src/main/java/de/westnordost/streetcomplete/map/QuestPinsManager.kt index 6042d17283..1ae061b4e1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/QuestPinsManager.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/QuestPinsManager.kt @@ -6,13 +6,28 @@ import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent import de.westnordost.streetcomplete.data.osm.mapdata.ElementType -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.quest.OsmNoteQuestKey +import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestKey +import de.westnordost.streetcomplete.data.quest.QuestType +import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry +import de.westnordost.streetcomplete.data.quest.VisibleQuestsSource import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderSource import de.westnordost.streetcomplete.map.components.Pin import de.westnordost.streetcomplete.map.components.PinsMapComponent import de.westnordost.streetcomplete.map.tangram.KtMapController -import de.westnordost.streetcomplete.util.* -import kotlinx.coroutines.* +import de.westnordost.streetcomplete.util.TilePos +import de.westnordost.streetcomplete.util.TilesRect +import de.westnordost.streetcomplete.util.enclosingTilesRect +import de.westnordost.streetcomplete.util.minTileRect +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.cancelChildren +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext /** Manages the layer of quest pins in the map view: * Gets told by the QuestsMapFragment when a new area is in view and independently pulls the quests diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/QuestsMapFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/map/QuestsMapFragment.kt index 448d36c1dd..98cce2d708 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/QuestsMapFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/QuestsMapFragment.kt @@ -22,8 +22,8 @@ import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderSource import de.westnordost.streetcomplete.ktx.toPx import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.map.components.FocusGeometryMapComponent -import de.westnordost.streetcomplete.map.components.PinsMapComponent import de.westnordost.streetcomplete.map.components.GeometryMarkersMapComponent +import de.westnordost.streetcomplete.map.components.PinsMapComponent import de.westnordost.streetcomplete.map.components.SelectedPinsMapComponent import de.westnordost.streetcomplete.quests.ShowsGeometryMarkers import de.westnordost.streetcomplete.util.distanceTo diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/tangram/CameraManager.kt b/app/src/main/java/de/westnordost/streetcomplete/map/tangram/CameraManager.kt index 5da3667ed6..aa35c03f2a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/tangram/CameraManager.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/tangram/CameraManager.kt @@ -1,6 +1,10 @@ package de.westnordost.streetcomplete.map.tangram -import android.animation.* +import android.animation.Animator +import android.animation.ObjectAnimator +import android.animation.PropertyValuesHolder +import android.animation.TypeEvaluator +import android.animation.ValueAnimator import android.content.ContentResolver import android.os.Handler import android.os.Looper diff --git a/app/src/main/java/de/westnordost/streetcomplete/map/tangram/KtMapController.kt b/app/src/main/java/de/westnordost/streetcomplete/map/tangram/KtMapController.kt index d73a435806..0046567c77 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/map/tangram/KtMapController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/map/tangram/KtMapController.kt @@ -10,15 +10,33 @@ import android.view.animation.Interpolator import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent -import com.mapzen.tangram.* +import com.mapzen.tangram.FeaturePickResult +import com.mapzen.tangram.LabelPickResult +import com.mapzen.tangram.MapChangeListener +import com.mapzen.tangram.MapController +import com.mapzen.tangram.MapData +import com.mapzen.tangram.MapView +import com.mapzen.tangram.SceneError +import com.mapzen.tangram.SceneUpdate +import com.mapzen.tangram.TouchInput import com.mapzen.tangram.networking.HttpHandler import com.mapzen.tangram.viewholder.GLSurfaceViewHolderFactory import com.mapzen.tangram.viewholder.GLViewHolder import com.mapzen.tangram.viewholder.GLViewHolderFactory import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon -import de.westnordost.streetcomplete.util.* -import kotlinx.coroutines.* +import de.westnordost.streetcomplete.util.centerPointOfPolyline +import de.westnordost.streetcomplete.util.distanceTo +import de.westnordost.streetcomplete.util.enclosingBoundingBox +import de.westnordost.streetcomplete.util.initialBearingTo +import de.westnordost.streetcomplete.util.normalizeLongitude +import de.westnordost.streetcomplete.util.translate +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch +import kotlinx.coroutines.suspendCancellableCoroutine import java.util.concurrent.ConcurrentLinkedQueue import kotlin.coroutines.Continuation import kotlin.coroutines.resume diff --git a/app/src/main/java/de/westnordost/streetcomplete/notifications/NotificationsContainerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/notifications/NotificationsContainerFragment.kt index ca84014b56..c3aa2496dd 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/notifications/NotificationsContainerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/notifications/NotificationsContainerFragment.kt @@ -5,7 +5,11 @@ import androidx.fragment.app.Fragment import de.westnordost.streetcomplete.HandlesOnBackPressed import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.about.WhatsNewDialog -import de.westnordost.streetcomplete.data.notifications.* +import de.westnordost.streetcomplete.data.notifications.NewAchievementNotification +import de.westnordost.streetcomplete.data.notifications.NewVersionNotification +import de.westnordost.streetcomplete.data.notifications.Notification +import de.westnordost.streetcomplete.data.notifications.OsmUnreadMessagesNotification +import de.westnordost.streetcomplete.data.notifications.QuestSelectionHintNotification import de.westnordost.streetcomplete.settings.SettingsActivity import de.westnordost.streetcomplete.user.AchievementInfoFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/Cycleway.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/Cycleway.kt index 772fe682a9..bfb168d10d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/Cycleway.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/Cycleway.kt @@ -1,6 +1,14 @@ package de.westnordost.streetcomplete.osm.cycleway -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_SHARED_LANE enum class Cycleway { // a.k.a. exclusive lane, dedicated lane or simply (proper) lane diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParser.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParser.kt index 1ff42540eb..36a5990336 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParser.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParser.kt @@ -1,7 +1,24 @@ package de.westnordost.streetcomplete.osm.cycleway import de.westnordost.streetcomplete.ktx.containsAny -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.BUSWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.INVALID +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE_NO_ONEWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.PICTOGRAMS +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SEPARATE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SIDEWALK_EXPLICIT +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN_SHARED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_SHARED_LANE import de.westnordost.streetcomplete.osm.isForwardOneway import de.westnordost.streetcomplete.osm.isReversedOneway diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/kerb/KerbUtil.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/kerb/KerbUtil.kt index 58bd2b1d3b..7c6f5b7946 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/kerb/KerbUtil.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/kerb/KerbUtil.kt @@ -1,8 +1,11 @@ package de.westnordost.streetcomplete.osm.kerb -import de.westnordost.streetcomplete.data.osm.mapdata.MapData import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.meta.* +import de.westnordost.streetcomplete.data.meta.ALL_PATHS +import de.westnordost.streetcomplete.data.meta.ALL_ROADS +import de.westnordost.streetcomplete.data.meta.LAST_CHECK_DATE_KEYS +import de.westnordost.streetcomplete.data.meta.getLastCheckDateKeys +import de.westnordost.streetcomplete.data.osm.mapdata.MapData import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.ktx.allExceptFirstAndLast diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/model/Weekdays.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/model/Weekdays.kt index cd65a273e5..4c748e6b3d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/model/Weekdays.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/model/Weekdays.kt @@ -1,11 +1,9 @@ package de.westnordost.streetcomplete.osm.opening_hours.model import android.content.res.Resources - -import java.text.DateFormatSymbols - import de.westnordost.streetcomplete.R import kotlinx.serialization.Serializable +import java.text.DateFormatSymbols /** A selection of weekdays */ @Serializable diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursGenerator.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursGenerator.kt index cd5e842dec..9c1b727c3c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursGenerator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursGenerator.kt @@ -1,12 +1,24 @@ package de.westnordost.streetcomplete.osm.opening_hours.parser -import ch.poole.openinghoursparser.* +import ch.poole.openinghoursparser.DateRange +import ch.poole.openinghoursparser.DateWithOffset +import ch.poole.openinghoursparser.Holiday +import ch.poole.openinghoursparser.Month +import ch.poole.openinghoursparser.Rule +import ch.poole.openinghoursparser.RuleModifier +import ch.poole.openinghoursparser.TimeSpan +import ch.poole.openinghoursparser.WeekDay +import ch.poole.openinghoursparser.WeekDayRange +import de.westnordost.streetcomplete.osm.opening_hours.model.CircularSection +import de.westnordost.streetcomplete.osm.opening_hours.model.Months +import de.westnordost.streetcomplete.osm.opening_hours.model.NumberSystem +import de.westnordost.streetcomplete.osm.opening_hours.model.TimeRange +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.PUBLIC_HOLIDAY import de.westnordost.streetcomplete.quests.opening_hours.adapter.OffDaysRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningHoursRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningMonthsRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningWeekdaysRow -import de.westnordost.streetcomplete.osm.opening_hours.model.* -import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.PUBLIC_HOLIDAY import de.westnordost.streetcomplete.quests.postbox_collection_times.CollectionTimesRow @JvmName("openingHoursRowsToOpeningHoursRules") diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursParser.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursParser.kt index b5827af0c3..3116f7ce1a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursParser.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/opening_hours/parser/OpeningHoursParser.kt @@ -1,13 +1,26 @@ package de.westnordost.streetcomplete.osm.opening_hours.parser -import ch.poole.openinghoursparser.* +import ch.poole.openinghoursparser.DateRange +import ch.poole.openinghoursparser.DateWithOffset +import ch.poole.openinghoursparser.Holiday +import ch.poole.openinghoursparser.OpeningHoursParser +import ch.poole.openinghoursparser.ParseException +import ch.poole.openinghoursparser.Rule +import ch.poole.openinghoursparser.RuleModifier +import ch.poole.openinghoursparser.TimeSpan +import ch.poole.openinghoursparser.WeekDay +import ch.poole.openinghoursparser.WeekDayRange +import ch.poole.openinghoursparser.YearRange +import de.westnordost.streetcomplete.osm.opening_hours.model.CircularSection +import de.westnordost.streetcomplete.osm.opening_hours.model.Months +import de.westnordost.streetcomplete.osm.opening_hours.model.TimeRange +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.OSM_ABBR_WEEKDAYS +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.PUBLIC_HOLIDAY import de.westnordost.streetcomplete.quests.opening_hours.adapter.OffDaysRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningHoursRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningMonthsRow import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningWeekdaysRow -import de.westnordost.streetcomplete.osm.opening_hours.model.* -import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.OSM_ABBR_WEEKDAYS -import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays.Companion.PUBLIC_HOLIDAY import de.westnordost.streetcomplete.quests.postbox_collection_times.CollectionTimesRow import java.io.ByteArrayInputStream diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParking.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParking.kt index 4d308995a8..06f2595e56 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParking.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParking.kt @@ -1,7 +1,13 @@ package de.westnordost.streetcomplete.osm.street_parking -import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.* -import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.DIAGONAL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PARALLEL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PERPENDICULAR +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.HALF_ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_STREET +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.PAINTED_AREA_ONLY +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.STREET_SIDE data class LeftAndRightStreetParking(val left: StreetParking?, val right: StreetParking?) diff --git a/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParser.kt b/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParser.kt index 201f5c1b81..daae4104a3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParser.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParser.kt @@ -1,7 +1,13 @@ package de.westnordost.streetcomplete.osm.street_parking -import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* -import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.* +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.DIAGONAL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PARALLEL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PERPENDICULAR +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.HALF_ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_STREET +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.PAINTED_AREA_ONLY +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.STREET_SIDE fun createStreetParkingSides(tags: Map): LeftAndRightStreetParking? { val expandedTags = expandRelevantSidesTags(tags) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AGroupedImageListQuestAnswerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AGroupedImageListQuestAnswerFragment.kt index 2450d88e4c..8d9bdcdd94 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AGroupedImageListQuestAnswerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AGroupedImageListQuestAnswerFragment.kt @@ -2,13 +2,12 @@ package de.westnordost.streetcomplete.quests import android.content.Context import android.os.Bundle -import androidx.appcompat.app.AlertDialog -import androidx.recyclerview.widget.GridLayoutManager -import androidx.recyclerview.widget.RecyclerView import android.view.View +import androidx.appcompat.app.AlertDialog import androidx.core.view.postDelayed import androidx.preference.PreferenceManager - +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestGenericListBinding import de.westnordost.streetcomplete.view.image_select.GroupableDisplayItem diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AImageListQuestAnswerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AImageListQuestAnswerFragment.kt index 5b588eac56..9fd94789f9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AImageListQuestAnswerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AImageListQuestAnswerFragment.kt @@ -2,11 +2,10 @@ package de.westnordost.streetcomplete.quests import android.content.Context import android.os.Bundle -import androidx.recyclerview.widget.GridLayoutManager import android.view.View import androidx.core.view.isGone import androidx.preference.PreferenceManager - +import androidx.recyclerview.widget.GridLayoutManager import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestGenericListBinding import de.westnordost.streetcomplete.view.image_select.DisplayItem diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AStreetSideSelectFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AStreetSideSelectFragment.kt index fca99c2aef..d80cb8a493 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AStreetSideSelectFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AStreetSideSelectFragment.kt @@ -12,11 +12,15 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestStreetSidePuzzleWithLastAnswerButtonBinding import de.westnordost.streetcomplete.util.normalizeDegrees -import de.westnordost.streetcomplete.view.* +import de.westnordost.streetcomplete.view.Image +import de.westnordost.streetcomplete.view.ResImage +import de.westnordost.streetcomplete.view.ResText +import de.westnordost.streetcomplete.view.Text import de.westnordost.streetcomplete.view.image_select.DisplayItem import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog import de.westnordost.streetcomplete.view.image_select.Item import de.westnordost.streetcomplete.view.image_select.Item2 +import de.westnordost.streetcomplete.view.setImage import kotlin.math.absoluteValue abstract class AStreetSideSelectFragment : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt index fac90869d4..aba79ab6ef 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractBottomSheetFragment.kt @@ -8,7 +8,9 @@ import android.view.ViewGroup import android.view.animation.AnimationUtils import androidx.annotation.UiThread import androidx.appcompat.app.AlertDialog -import androidx.core.view.* +import androidx.core.view.isInvisible +import androidx.core.view.updateLayoutParams +import androidx.core.view.updatePadding import androidx.fragment.app.Fragment import com.google.android.material.bottomsheet.BottomSheetBehavior import com.google.android.material.bottomsheet.BottomSheetBehavior.STATE_COLLAPSED diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractCreateNoteFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractCreateNoteFragment.kt index 6fd91d6410..918dc974fa 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractCreateNoteFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractCreateNoteFragment.kt @@ -2,12 +2,11 @@ package de.westnordost.streetcomplete.quests import android.content.res.Configuration import android.os.Bundle -import com.google.android.material.bottomsheet.BottomSheetBehavior import android.view.View import android.widget.EditText import androidx.fragment.app.add import androidx.fragment.app.commit - +import com.google.android.material.bottomsheet.BottomSheetBehavior import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.ktx.popIn import de.westnordost.streetcomplete.ktx.popOut diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt index a442084616..56cc80ebca 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.kt @@ -22,12 +22,22 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.CountryInfo import de.westnordost.streetcomplete.data.meta.CountryInfos import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestKey +import de.westnordost.streetcomplete.data.quest.QuestType +import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry import de.westnordost.streetcomplete.databinding.ButtonPanelButtonBinding import de.westnordost.streetcomplete.databinding.FragmentQuestAnswerBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.FragmentViewBindingPropertyDelegate +import de.westnordost.streetcomplete.ktx.geometryType +import de.westnordost.streetcomplete.ktx.isArea +import de.westnordost.streetcomplete.ktx.isSomeKindOfShop +import de.westnordost.streetcomplete.ktx.updateConfiguration import de.westnordost.streetcomplete.quests.shop_type.ShopGoneDialog import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestFormAnswerFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestFormAnswerFragment.kt index e16c1844de..5546d55a47 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestFormAnswerFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestFormAnswerFragment.kt @@ -4,7 +4,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.FragmentQuestAnswerBinding import de.westnordost.streetcomplete.ktx.popIn diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/CreateNoteFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/CreateNoteFragment.kt index 8885f4c356..768afc32ba 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/CreateNoteFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/CreateNoteFragment.kt @@ -13,7 +13,6 @@ import android.view.animation.AnimationSet import android.view.animation.BounceInterpolator import android.view.animation.TranslateAnimation import androidx.core.view.isGone - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.FormLeaveNoteBinding import de.westnordost.streetcomplete.databinding.FragmentCreateNoteBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/LastPickedValuesStore.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/LastPickedValuesStore.kt index efcabe845a..3cdd0b6ca3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/LastPickedValuesStore.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/LastPickedValuesStore.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.quests import android.content.SharedPreferences import androidx.core.content.edit - import de.westnordost.streetcomplete.Prefs class LastPickedValuesStore( diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/LeaveNoteInsteadFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/LeaveNoteInsteadFragment.kt index 42adc718ce..4dceab22d7 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/LeaveNoteInsteadFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/LeaveNoteInsteadFragment.kt @@ -6,7 +6,6 @@ import android.view.View import android.view.ViewGroup import androidx.core.os.bundleOf import androidx.core.view.isGone - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.quest.QuestKey import de.westnordost.streetcomplete.databinding.FormLeaveNoteBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/QuestModule.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/QuestModule.kt index 22347b0db2..e6b0ad1be3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/QuestModule.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/QuestModule.kt @@ -11,42 +11,61 @@ import de.westnordost.streetcomplete.quests.accepts_cash.AddAcceptsCash import de.westnordost.streetcomplete.quests.address.AddAddressStreet import de.westnordost.streetcomplete.quests.address.AddHousenumber import de.westnordost.streetcomplete.quests.air_conditioning.AddAirConditioning +import de.westnordost.streetcomplete.quests.atm_operator.AddAtmOperator import de.westnordost.streetcomplete.quests.baby_changing_table.AddBabyChangingTable +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.AddBicycleBarrierType +import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierOnPath +import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierOnRoad +import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierType +import de.westnordost.streetcomplete.quests.barrier_type.AddStileType import de.westnordost.streetcomplete.quests.bench_backrest.AddBenchBackrest import de.westnordost.streetcomplete.quests.bike_parking_capacity.AddBikeParkingCapacity import de.westnordost.streetcomplete.quests.bike_parking_cover.AddBikeParkingCover import de.westnordost.streetcomplete.quests.bike_parking_type.AddBikeParkingType -import de.westnordost.streetcomplete.quests.cycleway.AddCycleway import de.westnordost.streetcomplete.quests.board_type.AddBoardType +import de.westnordost.streetcomplete.quests.bollard_type.AddBollardType import de.westnordost.streetcomplete.quests.bridge_structure.AddBridgeStructure import de.westnordost.streetcomplete.quests.building_levels.AddBuildingLevels import de.westnordost.streetcomplete.quests.building_type.AddBuildingType import de.westnordost.streetcomplete.quests.building_underground.AddIsBuildingUnderground import de.westnordost.streetcomplete.quests.bus_stop_bench.AddBenchStatusOnBusStop +import de.westnordost.streetcomplete.quests.bus_stop_bin.AddBinStatusOnBusStop import de.westnordost.streetcomplete.quests.bus_stop_lit.AddBusStopLit +import de.westnordost.streetcomplete.quests.bus_stop_name.AddBusStopName +import de.westnordost.streetcomplete.quests.bus_stop_ref.AddBusStopRef import de.westnordost.streetcomplete.quests.bus_stop_shelter.AddBusStopShelter +import de.westnordost.streetcomplete.quests.camera_type.AddCameraType import de.westnordost.streetcomplete.quests.car_wash_type.AddCarWashType +import de.westnordost.streetcomplete.quests.charging_station_capacity.AddChargingStationCapacity +import de.westnordost.streetcomplete.quests.charging_station_operator.AddChargingStationOperator +import de.westnordost.streetcomplete.quests.clothing_bin_operator.AddClothingBinOperator import de.westnordost.streetcomplete.quests.construction.MarkCompletedBuildingConstruction import de.westnordost.streetcomplete.quests.construction.MarkCompletedHighwayConstruction -import de.westnordost.streetcomplete.quests.crossing_type.AddCrossingType +import de.westnordost.streetcomplete.quests.crossing.AddCrossing import de.westnordost.streetcomplete.quests.crossing_island.AddCrossingIsland +import de.westnordost.streetcomplete.quests.crossing_type.AddCrossingType +import de.westnordost.streetcomplete.quests.cycleway.AddCycleway import de.westnordost.streetcomplete.quests.defibrillator.AddIsDefibrillatorIndoor +import de.westnordost.streetcomplete.quests.diet_type.AddHalal +import de.westnordost.streetcomplete.quests.diet_type.AddKosher import de.westnordost.streetcomplete.quests.diet_type.AddVegan import de.westnordost.streetcomplete.quests.diet_type.AddVegetarian +import de.westnordost.streetcomplete.quests.drinking_water.AddDrinkingWater +import de.westnordost.streetcomplete.quests.existence.CheckExistence import de.westnordost.streetcomplete.quests.ferry.AddFerryAccessMotorVehicle import de.westnordost.streetcomplete.quests.ferry.AddFerryAccessPedestrian import de.westnordost.streetcomplete.quests.fire_hydrant.AddFireHydrantType -import de.westnordost.streetcomplete.quests.fire_hydrant_position.AddFireHydrantPosition import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.AddFireHydrantDiameter +import de.westnordost.streetcomplete.quests.fire_hydrant_position.AddFireHydrantPosition import de.westnordost.streetcomplete.quests.foot.AddProhibitedForPedestrians +import de.westnordost.streetcomplete.quests.fuel_service.AddFuelSelfService import de.westnordost.streetcomplete.quests.general_fee.AddGeneralFee import de.westnordost.streetcomplete.quests.handrail.AddHandrail -import de.westnordost.streetcomplete.quests.step_count.AddStepCount import de.westnordost.streetcomplete.quests.internet_access.AddInternetAccess +import de.westnordost.streetcomplete.quests.kerb_height.AddKerbHeight +import de.westnordost.streetcomplete.quests.lanes.AddLanes import de.westnordost.streetcomplete.quests.leaf_detail.AddForestLeafType -import de.westnordost.streetcomplete.quests.bus_stop_name.AddBusStopName -import de.westnordost.streetcomplete.quests.bus_stop_ref.AddBusStopRef -import de.westnordost.streetcomplete.quests.road_name.AddRoadName +import de.westnordost.streetcomplete.quests.level.AddLevel import de.westnordost.streetcomplete.quests.max_height.AddMaxHeight import de.westnordost.streetcomplete.quests.max_speed.AddMaxSpeed import de.westnordost.streetcomplete.quests.max_weight.AddMaxWeight @@ -57,49 +76,29 @@ import de.westnordost.streetcomplete.quests.oneway_suspects.AddSuspectedOneway import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsApi import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowDao import de.westnordost.streetcomplete.quests.opening_hours.AddOpeningHours -import de.westnordost.streetcomplete.quests.atm_operator.AddAtmOperator -import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.AddBicycleBarrierType -import de.westnordost.streetcomplete.quests.barrier_type.* -import de.westnordost.streetcomplete.quests.traffic_calming_type.AddTrafficCalmingType -import de.westnordost.streetcomplete.quests.bollard_type.AddBollardType -import de.westnordost.streetcomplete.quests.bus_stop_bin.AddBinStatusOnBusStop -import de.westnordost.streetcomplete.quests.camera_type.AddCameraType -import de.westnordost.streetcomplete.quests.charging_station_capacity.AddChargingStationCapacity -import de.westnordost.streetcomplete.quests.charging_station_operator.AddChargingStationOperator -import de.westnordost.streetcomplete.quests.clothing_bin_operator.AddClothingBinOperator -import de.westnordost.streetcomplete.quests.crossing.AddCrossing -import de.westnordost.streetcomplete.quests.diet_type.AddKosher -import de.westnordost.streetcomplete.quests.diet_type.AddHalal -import de.westnordost.streetcomplete.quests.drinking_water.AddDrinkingWater -import de.westnordost.streetcomplete.quests.existence.CheckExistence -import de.westnordost.streetcomplete.quests.fuel_service.AddFuelSelfService -import de.westnordost.streetcomplete.quests.lanes.AddLanes -import de.westnordost.streetcomplete.quests.kerb_height.AddKerbHeight -import de.westnordost.streetcomplete.quests.level.AddLevel import de.westnordost.streetcomplete.quests.opening_hours_signed.CheckOpeningHoursSigned import de.westnordost.streetcomplete.quests.orchard_produce.AddOrchardProduce import de.westnordost.streetcomplete.quests.parking_access.AddBikeParkingAccess import de.westnordost.streetcomplete.quests.parking_access.AddParkingAccess import de.westnordost.streetcomplete.quests.parking_fee.AddBikeParkingFee import de.westnordost.streetcomplete.quests.parking_fee.AddParkingFee -import de.westnordost.streetcomplete.quests.street_parking.AddStreetParking import de.westnordost.streetcomplete.quests.parking_type.AddParkingType import de.westnordost.streetcomplete.quests.picnic_table_cover.AddPicnicTableCover import de.westnordost.streetcomplete.quests.pitch_lit.AddPitchLit import de.westnordost.streetcomplete.quests.place_name.AddPlaceName import de.westnordost.streetcomplete.quests.playground_access.AddPlaygroundAccess +import de.westnordost.streetcomplete.quests.police_type.AddPoliceType import de.westnordost.streetcomplete.quests.postbox_collection_times.AddPostboxCollectionTimes import de.westnordost.streetcomplete.quests.postbox_ref.AddPostboxRef import de.westnordost.streetcomplete.quests.postbox_royal_cypher.AddPostboxRoyalCypher -import de.westnordost.streetcomplete.quests.police_type.AddPoliceType import de.westnordost.streetcomplete.quests.powerpoles_material.AddPowerPolesMaterial import de.westnordost.streetcomplete.quests.railway_crossing.AddRailwayCrossingBarrier -import de.westnordost.streetcomplete.quests.summit_register.AddSummitRegister import de.westnordost.streetcomplete.quests.recycling.AddRecyclingType import de.westnordost.streetcomplete.quests.recycling_glass.DetermineRecyclingGlass import de.westnordost.streetcomplete.quests.recycling_material.AddRecyclingContainerMaterials import de.westnordost.streetcomplete.quests.religion.AddReligionToPlaceOfWorship import de.westnordost.streetcomplete.quests.religion.AddReligionToWaysideShrine +import de.westnordost.streetcomplete.quests.road_name.AddRoadName import de.westnordost.streetcomplete.quests.roof_shape.AddRoofShape import de.westnordost.streetcomplete.quests.segregated.AddCyclewaySegregation import de.westnordost.streetcomplete.quests.self_service.AddSelfServiceLaundry @@ -107,11 +106,18 @@ import de.westnordost.streetcomplete.quests.shop_type.CheckShopType import de.westnordost.streetcomplete.quests.shop_type.SpecifyShopType import de.westnordost.streetcomplete.quests.shoulder.AddShoulder import de.westnordost.streetcomplete.quests.sidewalk.AddSidewalk -import de.westnordost.streetcomplete.quests.smoothness.* +import de.westnordost.streetcomplete.quests.smoothness.AddPathSmoothness +import de.westnordost.streetcomplete.quests.smoothness.AddRoadSmoothness import de.westnordost.streetcomplete.quests.sport.AddSport +import de.westnordost.streetcomplete.quests.step_count.AddStepCount import de.westnordost.streetcomplete.quests.steps_incline.AddStepsIncline import de.westnordost.streetcomplete.quests.steps_ramp.AddStepsRamp -import de.westnordost.streetcomplete.quests.surface.* +import de.westnordost.streetcomplete.quests.summit_register.AddSummitRegister +import de.westnordost.streetcomplete.quests.surface.AddCyclewayPartSurface +import de.westnordost.streetcomplete.quests.surface.AddFootwayPartSurface +import de.westnordost.streetcomplete.quests.surface.AddPathSurface +import de.westnordost.streetcomplete.quests.surface.AddPitchSurface +import de.westnordost.streetcomplete.quests.surface.AddRoadSurface import de.westnordost.streetcomplete.quests.tactile_paving.AddTactilePavingBusStop import de.westnordost.streetcomplete.quests.tactile_paving.AddTactilePavingCrosswalk import de.westnordost.streetcomplete.quests.tactile_paving.AddTactilePavingKerb @@ -119,11 +125,16 @@ import de.westnordost.streetcomplete.quests.toilet_availability.AddToiletAvailab import de.westnordost.streetcomplete.quests.toilets_fee.AddToiletsFee import de.westnordost.streetcomplete.quests.tourism_information.AddInformationToTourism import de.westnordost.streetcomplete.quests.tracktype.AddTracktype +import de.westnordost.streetcomplete.quests.traffic_calming_type.AddTrafficCalmingType import de.westnordost.streetcomplete.quests.traffic_signals_button.AddTrafficSignalsButton -import de.westnordost.streetcomplete.quests.traffic_signals_vibrate.AddTrafficSignalsVibration import de.westnordost.streetcomplete.quests.traffic_signals_sound.AddTrafficSignalsSound +import de.westnordost.streetcomplete.quests.traffic_signals_vibrate.AddTrafficSignalsVibration import de.westnordost.streetcomplete.quests.way_lit.AddWayLit -import de.westnordost.streetcomplete.quests.wheelchair_access.* +import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessBusiness +import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessOutside +import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessPublicTransport +import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessToilets +import de.westnordost.streetcomplete.quests.wheelchair_access.AddWheelchairAccessToiletsPart import java.util.concurrent.FutureTask import javax.inject.Singleton diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/SplitWayFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/SplitWayFragment.kt index 43c38af398..dd418bc8e2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/SplitWayFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/SplitWayFragment.kt @@ -27,7 +27,13 @@ import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.quest.OsmQuestKey import de.westnordost.streetcomplete.data.quest.QuestKey import de.westnordost.streetcomplete.databinding.FragmentSplitWayBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.forEachLine +import de.westnordost.streetcomplete.ktx.popIn +import de.westnordost.streetcomplete.ktx.popOut +import de.westnordost.streetcomplete.ktx.setMargins +import de.westnordost.streetcomplete.ktx.toast +import de.westnordost.streetcomplete.ktx.viewBinding +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.util.SoundFx import de.westnordost.streetcomplete.util.alongTrackDistanceTo import de.westnordost.streetcomplete.util.crossTrackDistanceTo diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt index 5d87277b0c..577b03fecc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt @@ -2,9 +2,9 @@ package de.westnordost.streetcomplete.quests.accepts_cash import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.toYesNo diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreet.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreet.kt index be48b2f0d3..98ea73181f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreet.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreet.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.address -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Relation -import de.westnordost.streetcomplete.data.quest.AllCountriesExcept import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.quest.AllCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetForm.kt index d8c31cca20..47a42bfed6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetForm.kt @@ -2,9 +2,7 @@ package de.westnordost.streetcomplete.quests.address import android.os.Bundle import android.text.Html -import android.view.LayoutInflater import android.view.View -import android.view.ViewGroup import android.widget.EditText import androidx.appcompat.app.AlertDialog import androidx.core.text.parseAsHtml diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumber.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumber.kt index 4be18acc79..a533f43ed2 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumber.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumber.kt @@ -2,10 +2,15 @@ package de.westnordost.streetcomplete.quests.address import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.geometry.ElementPolygonsGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.AllCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN import de.westnordost.streetcomplete.ktx.isArea diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumberForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumberForm.kt index edc570f4c8..e8a8c8fa13 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumberForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/address/AddHousenumberForm.kt @@ -2,14 +2,12 @@ package de.westnordost.streetcomplete.quests.address import android.content.res.ColorStateList import android.os.Bundle -import androidx.appcompat.app.AlertDialog import android.text.InputType import android.text.method.DigitsKeyListener -import android.view.LayoutInflater import android.view.View -import android.view.ViewGroup import android.widget.Button import android.widget.EditText +import androidx.appcompat.app.AlertDialog import androidx.core.view.isInvisible import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.DialogQuestAddressNoHousenumberBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/atm_operator/AddAtmOperator.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/atm_operator/AddAtmOperator.kt index 8d95577cb0..acf98b8e1e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/atm_operator/AddAtmOperator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/atm_operator/AddAtmOperator.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.atm_operator import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN class AddAtmOperator : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierType.kt index 767e83b102..d22d360f89 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierType.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierTypeForm.kt index dd91ab2255..dea2b2934a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_bicycle_barrier_type/AddBicycleBarrierTypeForm.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.* +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.DIAGONAL +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.DOUBLE +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.SINGLE +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.TILTED +import de.westnordost.streetcomplete.quests.barrier_bicycle_barrier_type.BicycleBarrierType.TRIPLE import de.westnordost.streetcomplete.view.image_select.Item class AddBicycleBarrierTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnPath.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnPath.kt index 13f429a0c4..d702b1b5ba 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnPath.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnPath.kt @@ -3,14 +3,14 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.ALL_PATHS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS class AddBarrierOnPath: OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnRoad.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnRoad.kt index 1851f21533..4eeee83159 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnRoad.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierOnRoad.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.ALL_ROADS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR class AddBarrierOnRoad: OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierType.kt index d4c33542bb..822b6b3603 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierType.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierTypeForm.kt index 809666314c..4f7a96cbc5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddBarrierTypeForm.kt @@ -2,7 +2,29 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.* +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.BICYCLE_BARRIER +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.BLOCK +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.BOLLARD +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.CATTLE_GRID +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.CHAIN +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.DEBRIS_PILE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.FULL_HEIGHT_TURNSTILE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.GATE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.HEIGHT_RESTRICTOR +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.JERSEY_BARRIER +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.KERB +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.KISSING_GATE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.LIFT_GATE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.LOG +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.PASSAGE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.ROPE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.STILE_LADDER +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.STILE_SQUEEZER +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.STILE_STEPOVER_STONE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.STILE_STEPOVER_WOODEN +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.SWING_GATE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.TURNSTILE +import de.westnordost.streetcomplete.quests.barrier_type.BarrierType.WIRE_GATE import de.westnordost.streetcomplete.view.image_select.Item class AddBarrierTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileType.kt index cd74f5659e..bb5a0b769a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileType.kt @@ -4,10 +4,10 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.hasCheckDate import de.westnordost.streetcomplete.data.meta.updateCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS class AddStileType : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeForm.kt index e9639b60ad..9124fb6891 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeForm.kt @@ -2,7 +2,10 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.barrier_type.StileType.* +import de.westnordost.streetcomplete.quests.barrier_type.StileType.LADDER +import de.westnordost.streetcomplete.quests.barrier_type.StileType.SQUEEZER +import de.westnordost.streetcomplete.quests.barrier_type.StileType.STEPOVER_STONE +import de.westnordost.streetcomplete.quests.barrier_type.StileType.STEPOVER_WOODEN import de.westnordost.streetcomplete.view.image_select.DisplayItem import de.westnordost.streetcomplete.view.image_select.Item diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/DetectWayBarrierIntersectionUtil.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/DetectWayBarrierIntersectionUtil.kt index d65a13989f..d510ca44a0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/DetectWayBarrierIntersectionUtil.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/barrier_type/DetectWayBarrierIntersectionUtil.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.data.elementfilter.ElementFilterExpression -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.quests.findNodesAtCrossingsOf fun detectWayBarrierIntersection(mapData: MapDataWithGeometry, barrierFilter: ElementFilterExpression, pathsFilter: ElementFilterExpression): Iterable { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrest.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrest.kt index 0dd97c1c3b..bc27e44616 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrest.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrest.kt @@ -1,14 +1,16 @@ package de.westnordost.streetcomplete.quests.bench_backrest import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN -import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.* +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.NO +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.PICNIC_TABLE +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.YES class AddBenchBackrest : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrestForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrestForm.kt index 626cd51df9..01b5b60e07 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrestForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bench_backrest/AddBenchBackrestForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.bench_backrest import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.* +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.NO +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.PICNIC_TABLE +import de.westnordost.streetcomplete.quests.bench_backrest.BenchBackrestAnswer.YES class AddBenchBackrestForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_capacity/AddBikeParkingCapacity.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_capacity/AddBikeParkingCapacity.kt index fc9d443bcd..94239cc9c0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_capacity/AddBikeParkingCapacity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_capacity/AddBikeParkingCapacity.kt @@ -2,11 +2,11 @@ package de.westnordost.streetcomplete.quests.bike_parking_capacity import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST class AddBikeParkingCapacity : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_cover/AddBikeParkingCover.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_cover/AddBikeParkingCover.kt index c52820918b..9be87950f9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_cover/AddBikeParkingCover.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_cover/AddBikeParkingCover.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.bike_parking_cover import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingType.kt index 8f2d3951dc..63695a6ec4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingType.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.bike_parking_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST class AddBikeParkingType : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingTypeForm.kt index 1510b24872..c92b9fcf88 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bike_parking_type/AddBikeParkingTypeForm.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.quests.bike_parking_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.* +import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.BUILDING +import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.LOCKERS +import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.SHED +import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.STANDS +import de.westnordost.streetcomplete.quests.bike_parking_type.BikeParkingType.WALL_LOOPS import de.westnordost.streetcomplete.view.image_select.Item class AddBikeParkingTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardType.kt index 5620f0f8fd..a4b3d30edf 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardType.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.board_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.RARE import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.RARE class AddBoardType : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardTypeForm.kt index 0c62e74712..ba58b833d7 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/board_type/AddBoardTypeForm.kt @@ -5,7 +5,15 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.board_type.BoardType.* +import de.westnordost.streetcomplete.quests.board_type.BoardType.GEOLOGY +import de.westnordost.streetcomplete.quests.board_type.BoardType.HISTORY +import de.westnordost.streetcomplete.quests.board_type.BoardType.MAP +import de.westnordost.streetcomplete.quests.board_type.BoardType.NATURE +import de.westnordost.streetcomplete.quests.board_type.BoardType.NOTICE +import de.westnordost.streetcomplete.quests.board_type.BoardType.PLANTS +import de.westnordost.streetcomplete.quests.board_type.BoardType.PUBLIC_TRANSPORT +import de.westnordost.streetcomplete.quests.board_type.BoardType.SPORT +import de.westnordost.streetcomplete.quests.board_type.BoardType.WILDLIFE class AddBoardTypeForm : AListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardType.kt index 5d983dcff3..1ae75ede73 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardType.kt @@ -2,11 +2,11 @@ package de.westnordost.streetcomplete.quests.bollard_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.LIFESAVER diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardTypeForm.kt index c6c558788a..3284292649 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bollard_type/AddBollardTypeForm.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.quests.bollard_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.bollard_type.BollardType.* +import de.westnordost.streetcomplete.quests.bollard_type.BollardType.FIXED +import de.westnordost.streetcomplete.quests.bollard_type.BollardType.FLEXIBLE +import de.westnordost.streetcomplete.quests.bollard_type.BollardType.FOLDABLE +import de.westnordost.streetcomplete.quests.bollard_type.BollardType.REMOVABLE +import de.westnordost.streetcomplete.quests.bollard_type.BollardType.RISING import de.westnordost.streetcomplete.view.image_select.Item class AddBollardTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bridge_structure/AddBridgeStructureForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bridge_structure/AddBridgeStructureForm.kt index f09371304d..9cf6c6e3b5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bridge_structure/AddBridgeStructureForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bridge_structure/AddBridgeStructureForm.kt @@ -2,7 +2,15 @@ package de.westnordost.streetcomplete.quests.bridge_structure import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.* +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.ARCH +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.BEAM +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.CABLE_STAYED +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.FLOATING +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.HUMPBACK +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.SIMPLE_SUSPENSION +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.SUSPENSION +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.TIED_ARCH +import de.westnordost.streetcomplete.quests.bridge_structure.BridgeStructure.TRUSS import de.westnordost.streetcomplete.view.image_select.Item class AddBridgeStructureForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/building_levels/AddBuildingLevelsForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/building_levels/AddBuildingLevelsForm.kt index 7f7f0da31a..eb94c2afc3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/building_levels/AddBuildingLevelsForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/building_levels/AddBuildingLevelsForm.kt @@ -3,18 +3,17 @@ package de.westnordost.streetcomplete.quests.building_levels import android.content.Context import android.os.Bundle import android.view.LayoutInflater -import androidx.appcompat.app.AlertDialog import android.view.View import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.preference.PreferenceManager import androidx.recyclerview.widget.RecyclerView - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestBuildingLevelsBinding import de.westnordost.streetcomplete.databinding.QuestBuildingLevelsLastPickedButtonBinding import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment -import de.westnordost.streetcomplete.quests.LastPickedValuesStore import de.westnordost.streetcomplete.quests.AnswerItem +import de.westnordost.streetcomplete.quests.LastPickedValuesStore import de.westnordost.streetcomplete.quests.mostCommonWithin import de.westnordost.streetcomplete.util.TextChangedWatcher diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/AddBuildingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/AddBuildingTypeForm.kt index 704fb2282b..98c5eb7c49 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/AddBuildingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/AddBuildingTypeForm.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.quests.building_type import android.os.Bundle import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AGroupedImageListQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingType.kt index 51843c666f..c17e53e7d5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingType.kt @@ -1,6 +1,62 @@ package de.westnordost.streetcomplete.quests.building_type -import de.westnordost.streetcomplete.quests.building_type.BuildingType.* +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ABANDONED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ALLOTMENT_HOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.APARTMENTS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BOATHOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BRIDGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BUNGALOW +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BUNKER +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CARPORT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CATHEDRAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CHAPEL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CHURCH +import de.westnordost.streetcomplete.quests.building_type.BuildingType.COLLEGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.DETACHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.DORMITORY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FARM +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FARM_AUXILIARY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FIRE_STATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GARAGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GARAGES +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GOVERNMENT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GRANDSTAND +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GREENHOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HANGAR +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HISTORIC +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOSPITAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOTEL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOUSEBOAT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HUT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.INDUSTRIAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.KINDERGARTEN +import de.westnordost.streetcomplete.quests.building_type.BuildingType.KIOSK +import de.westnordost.streetcomplete.quests.building_type.BuildingType.MOSQUE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.OFFICE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.PAGODA +import de.westnordost.streetcomplete.quests.building_type.BuildingType.PARKING +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RETAIL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ROOF +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RUINS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SCHOOL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SEMI_DETACHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SERVICE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SHRINE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SILO +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SPORTS_CENTRE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STADIUM +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STATIC_CARAVAN +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STORAGE_TANK +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SYNAGOGUE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TEMPLE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TERRACE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TOILETS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TRAIN_STATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TRANSPORTATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.UNIVERSITY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.WAREHOUSE enum class BuildingType(val osmKey: String, val osmValue: String) { HOUSE ("building", "house"), diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingTypeItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingTypeItem.kt index d4ede3b531..b7350bd3b3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingTypeItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/building_type/BuildingTypeItem.kt @@ -1,8 +1,69 @@ package de.westnordost.streetcomplete.quests.building_type import de.westnordost.streetcomplete.R +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ABANDONED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ALLOTMENT_HOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.APARTMENTS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BOATHOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BRIDGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BUNGALOW +import de.westnordost.streetcomplete.quests.building_type.BuildingType.BUNKER +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CARPORT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CATHEDRAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CHAPEL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CHURCH +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CIVIC +import de.westnordost.streetcomplete.quests.building_type.BuildingType.COLLEGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.COMMERCIAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.CONSTRUCTION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.DETACHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.DORMITORY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FARM +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FARM_AUXILIARY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.FIRE_STATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GARAGE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GARAGES +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GOVERNMENT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GRANDSTAND +import de.westnordost.streetcomplete.quests.building_type.BuildingType.GREENHOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HANGAR +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HISTORIC +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOSPITAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOTEL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOUSE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HOUSEBOAT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.HUT +import de.westnordost.streetcomplete.quests.building_type.BuildingType.INDUSTRIAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.KINDERGARTEN +import de.westnordost.streetcomplete.quests.building_type.BuildingType.KIOSK +import de.westnordost.streetcomplete.quests.building_type.BuildingType.MOSQUE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.OFFICE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.PAGODA +import de.westnordost.streetcomplete.quests.building_type.BuildingType.PARKING +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RELIGIOUS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RESIDENTIAL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RETAIL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.ROOF +import de.westnordost.streetcomplete.quests.building_type.BuildingType.RUINS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SCHOOL +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SEMI_DETACHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SERVICE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SHED +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SHRINE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SILO +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SPORTS_CENTRE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STADIUM +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STATIC_CARAVAN +import de.westnordost.streetcomplete.quests.building_type.BuildingType.STORAGE_TANK +import de.westnordost.streetcomplete.quests.building_type.BuildingType.SYNAGOGUE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TEMPLE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TERRACE +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TOILETS +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TRAIN_STATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.TRANSPORTATION +import de.westnordost.streetcomplete.quests.building_type.BuildingType.UNIVERSITY +import de.westnordost.streetcomplete.quests.building_type.BuildingType.WAREHOUSE import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.quests.building_type.BuildingType.* fun List.toItems() = this.map { it.asItem() } diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bench/AddBenchStatusOnBusStop.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bench/AddBenchStatusOnBusStop.kt index 6a5d3fb15a..194004e6e3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bench/AddBenchStatusOnBusStop.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bench/AddBenchStatusOnBusStop.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.quests.bus_stop_bench import de.westnordost.streetcomplete.R +import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bin/AddBinStatusOnBusStop.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bin/AddBinStatusOnBusStop.kt index d7355eff60..01b55d345a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bin/AddBinStatusOnBusStop.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_bin/AddBinStatusOnBusStop.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.quests.bus_stop_bin import de.westnordost.streetcomplete.R +import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_lit/AddBusStopLit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_lit/AddBusStopLit.kt index 184926744d..a76fa4385d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_lit/AddBusStopLit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_lit/AddBusStopLit.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.bus_stop_lit import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameForm.kt index b8667300d3..577086e0d6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_name/AddBusStopNameForm.kt @@ -1,11 +1,10 @@ package de.westnordost.streetcomplete.quests.bus_stop_name import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestLocalizednameBinding -import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.AAddLocalizedNameForm +import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.LocalizedName diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_ref/AddBusStopRefForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_ref/AddBusStopRefForm.kt index 27c6cc8da4..b6f8c26eb9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_ref/AddBusStopRefForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_ref/AddBusStopRefForm.kt @@ -3,11 +3,10 @@ package de.westnordost.streetcomplete.quests.bus_stop_ref import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestRefBinding -import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment +import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.util.TextChangedWatcher class AddBusStopRefForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelter.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelter.kt index 65e05a78d7..741e94d310 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelter.kt @@ -7,7 +7,9 @@ import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey -import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.* +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.COVERED +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.NO_SHELTER +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.SHELTER class AddBusStopShelter : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterForm.kt index cb8d6a7b8d..f9fe47eb5f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/bus_stop_shelter/AddBusStopShelterForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.bus_stop_shelter import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.* +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.COVERED +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.NO_SHELTER +import de.westnordost.streetcomplete.quests.bus_stop_shelter.BusStopShelterAnswer.SHELTER class AddBusStopShelterForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraType.kt index 8c744d795d..b58a03faa7 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraType.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.camera_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraTypeForm.kt index 4beef3dcfe..c284976be0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/camera_type/AddCameraTypeForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.camera_type import android.os.Bundle import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.camera_type.CameraType.* +import de.westnordost.streetcomplete.quests.camera_type.CameraType.DOME +import de.westnordost.streetcomplete.quests.camera_type.CameraType.FIXED +import de.westnordost.streetcomplete.quests.camera_type.CameraType.PANNING import de.westnordost.streetcomplete.view.image_select.Item class AddCameraTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashType.kt index 93ff77f73d..5b9e03f27d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashType.kt @@ -5,7 +5,8 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.toYesNo -import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.* +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.AUTOMATED +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SELF_SERVICE class AddCarWashType : OsmFilterQuestType>() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeForm.kt index 3b83a14ec2..9d1d41f81a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeForm.kt @@ -2,8 +2,10 @@ package de.westnordost.streetcomplete.quests.car_wash_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.AUTOMATED +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SELF_SERVICE +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SERVICE import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.* class AddCarWashTypeForm : AImageListQuestAnswerFragment>() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_capacity/AddChargingStationCapacity.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_capacity/AddChargingStationCapacity.kt index 1f4319c60c..f2f261bd98 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_capacity/AddChargingStationCapacity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_capacity/AddChargingStationCapacity.kt @@ -2,11 +2,11 @@ package de.westnordost.streetcomplete.quests.charging_station_capacity import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_operator/AddChargingStationOperator.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_operator/AddChargingStationOperator.kt index e97e16daad..8ddac01d9b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_operator/AddChargingStationOperator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/charging_station_operator/AddChargingStationOperator.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.charging_station_operator import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR class AddChargingStationOperator : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperator.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperator.kt index 89417c2c24..6012662503 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperator.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperator.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.clothing_bin_operator -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN class AddClothingBinOperator : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedBuildingConstruction.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedBuildingConstruction.kt index 19055e2e67..adeefe52d1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedBuildingConstruction.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedBuildingConstruction.kt @@ -3,8 +3,8 @@ package de.westnordost.streetcomplete.quests.construction import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.meta.updateCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BUILDING class MarkCompletedBuildingConstruction : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedHighwayConstruction.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedHighwayConstruction.kt index 1da52ccdbe..480a4831e9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedHighwayConstruction.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/construction/MarkCompletedHighwayConstruction.kt @@ -4,8 +4,8 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.ALL_ROADS import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.meta.updateCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR class MarkCompletedHighwayConstruction : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing/AddCrossing.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing/AddCrossing.kt index ed69f02d31..999d473766 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing/AddCrossing.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing/AddCrossing.kt @@ -3,9 +3,11 @@ package de.westnordost.streetcomplete.quests.crossing import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.osm.isCrossing import de.westnordost.streetcomplete.quests.findNodesAtCrossingsOf diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIsland.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIsland.kt index 6ebf001c87..ac23aa25e4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIsland.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIsland.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.crossing_island -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.ktx.toYesNo diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingType.kt index a58c86f008..bb2ba98714 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingType.kt @@ -4,10 +4,10 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.updateCheckDateForKey import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.osm.isCrossing diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeForm.kt index 4d9bf1c1bd..2d7bf3b01f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/crossing_type/AddCrossingTypeForm.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.quests.crossing_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.* +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.MARKED +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.TRAFFIC_SIGNALS +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.UNMARKED import de.westnordost.streetcomplete.view.image_select.Item class AddCrossingTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCycleway.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCycleway.kt index 49588a0bb1..31fc56b516 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCycleway.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCycleway.kt @@ -1,19 +1,37 @@ package de.westnordost.streetcomplete.quests.cycleway -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.filters.RelativeDate import de.westnordost.streetcomplete.data.elementfilter.filters.TagOlderThan import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.meta.* -import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.quest.NoCountriesExcept +import de.westnordost.streetcomplete.data.meta.ANYTHING_UNPAVED +import de.westnordost.streetcomplete.data.meta.CountryInfos +import de.westnordost.streetcomplete.data.meta.MAXSPEED_TYPE_KEYS +import de.westnordost.streetcomplete.data.meta.hasCheckDateForKey +import de.westnordost.streetcomplete.data.meta.updateCheckDateForKey import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.osm.cycleway.Cycleway -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.BUSWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.INVALID +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE_NO_ONEWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.PICTOGRAMS +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SEPARATE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SIDEWALK_EXPLICIT +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_SHARED_LANE import de.westnordost.streetcomplete.osm.cycleway.LeftAndRightCycleway import de.westnordost.streetcomplete.osm.cycleway.createCyclewaySides import de.westnordost.streetcomplete.osm.cycleway.isAmbiguous diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCyclewayForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCyclewayForm.kt index 58dc3f9d99..978a3d34f1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCyclewayForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/AddCyclewayForm.kt @@ -1,21 +1,20 @@ package de.westnordost.streetcomplete.quests.cycleway import android.os.Bundle -import androidx.annotation.AnyThread import android.view.View +import androidx.annotation.AnyThread import androidx.appcompat.app.AlertDialog import androidx.core.view.isGone - import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression +import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestStreetSidePuzzleWithLastAnswerButtonBinding import de.westnordost.streetcomplete.osm.cycleway.Cycleway import de.westnordost.streetcomplete.osm.cycleway.createCyclewaySides import de.westnordost.streetcomplete.osm.cycleway.isAvailableAsSelection -import de.westnordost.streetcomplete.osm.isReversedOneway import de.westnordost.streetcomplete.osm.isForwardOneway import de.westnordost.streetcomplete.osm.isOneway +import de.westnordost.streetcomplete.osm.isReversedOneway import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.StreetSideRotater diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/CyclewayItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/CyclewayItem.kt index 4b9eaffc7e..d5500b4c0a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/CyclewayItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/cycleway/CyclewayItem.kt @@ -2,8 +2,20 @@ package de.westnordost.streetcomplete.quests.cycleway import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.osm.cycleway.Cycleway +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.BUSWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE_NO_ONEWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.PICTOGRAMS +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SEPARATE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SIDEWALK_EXPLICIT +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* fun Cycleway.asItem(isLeftHandTraffic: Boolean) = Item(this, getDialogIconResId(isLeftHandTraffic), getTitleResId()) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/defibrillator/AddIsDefibrillatorIndoor.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/defibrillator/AddIsDefibrillatorIndoor.kt index 8e519aeba9..7093f87c76 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/defibrillator/AddIsDefibrillatorIndoor.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/defibrillator/AddIsDefibrillatorIndoor.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.defibrillator import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.LIFESAVER import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddDietTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddDietTypeForm.kt index 89001af90c..2f045c85dc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddDietTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddDietTypeForm.kt @@ -4,12 +4,13 @@ import android.os.Bundle import android.view.View import androidx.appcompat.app.AlertDialog import androidx.core.os.bundleOf - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestDietTypeExplanationBinding import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.diet_type.DietAvailability.* +import de.westnordost.streetcomplete.quests.diet_type.DietAvailability.DIET_NO +import de.westnordost.streetcomplete.quests.diet_type.DietAvailability.DIET_ONLY +import de.westnordost.streetcomplete.quests.diet_type.DietAvailability.DIET_YES class AddDietTypeForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt index cb8e720110..902872cfa4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.diet_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN class AddHalal : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt index 36de14d1cb..1c5b5bc8fc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.diet_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN class AddKosher : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt index ed58cacf4d..73b88760dd 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.diet_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.VEG diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt index 402f711722..2e939c3bb1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.diet_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.VEG diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWater.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWater.kt index 0e0006c4a7..e98b4af545 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWater.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWater.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.drinking_water import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS class AddDrinkingWater : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWaterForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWaterForm.kt index 30487c1562..38363e89f1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWaterForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/drinking_water/AddDrinkingWaterForm.kt @@ -3,7 +3,10 @@ package de.westnordost.streetcomplete.quests.drinking_water import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestAnswerFragment import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.drinking_water.DrinkingWater.* +import de.westnordost.streetcomplete.quests.drinking_water.DrinkingWater.NOT_POTABLE_SIGNED +import de.westnordost.streetcomplete.quests.drinking_water.DrinkingWater.NOT_POTABLE_UNSIGNED +import de.westnordost.streetcomplete.quests.drinking_water.DrinkingWater.POTABLE_SIGNED +import de.westnordost.streetcomplete.quests.drinking_water.DrinkingWater.POTABLE_UNSIGNED class AddDrinkingWaterForm : AListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/existence/CheckExistence.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/existence/CheckExistence.kt index 1446d27f03..e33d18c5f5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/existence/CheckExistence.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/existence/CheckExistence.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.existence -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.LAST_CHECK_DATE_KEYS import de.westnordost.streetcomplete.data.meta.updateCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.ktx.arrayOfNotNull diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantType.kt index cf47774367..f95b629a06 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantType.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.fire_hydrant import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.LIFESAVER class AddFireHydrantType : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantTypeForm.kt index eaa5776e00..357e3d4924 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant/AddFireHydrantTypeForm.kt @@ -2,7 +2,10 @@ package de.westnordost.streetcomplete.quests.fire_hydrant import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.fire_hydrant.FireHydrantType.* +import de.westnordost.streetcomplete.quests.fire_hydrant.FireHydrantType.PILLAR +import de.westnordost.streetcomplete.quests.fire_hydrant.FireHydrantType.POND +import de.westnordost.streetcomplete.quests.fire_hydrant.FireHydrantType.UNDERGROUND +import de.westnordost.streetcomplete.quests.fire_hydrant.FireHydrantType.WALL import de.westnordost.streetcomplete.view.image_select.Item class AddFireHydrantTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameter.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameter.kt index a2b1e188ff..d69720092f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameter.kt @@ -2,11 +2,11 @@ package de.westnordost.streetcomplete.quests.fire_hydrant_diameter import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.LIFESAVER import de.westnordost.streetcomplete.ktx.arrayOfNotNull diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameterForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameterForm.kt index af702dae6d..a36b598acc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameterForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/AddFireHydrantDiameterForm.kt @@ -8,7 +8,8 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestFireHydrantDiameterBinding import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.* +import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.INCH +import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.MILLIMETER import de.westnordost.streetcomplete.util.TextChangedWatcher class AddFireHydrantDiameterForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/FireHydrantDiameterAnswer.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/FireHydrantDiameterAnswer.kt index a467f58f4d..2bf33ab62d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/FireHydrantDiameterAnswer.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_diameter/FireHydrantDiameterAnswer.kt @@ -1,5 +1,6 @@ package de.westnordost.streetcomplete.quests.fire_hydrant_diameter -import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.* +import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.INCH +import de.westnordost.streetcomplete.quests.fire_hydrant_diameter.FireHydrantDiameterMeasurementUnit.MILLIMETER sealed interface FireHydrantDiameterAnswer diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPosition.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPosition.kt index 83c640937a..be1c46c312 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPosition.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPosition.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.fire_hydrant_position import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.LIFESAVER -import de.westnordost.streetcomplete.data.osm.mapdata.filter class AddFireHydrantPosition : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPositionForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPositionForm.kt index cb907a07b4..814c2b0f87 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPositionForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fire_hydrant_position/AddFireHydrantPositionForm.kt @@ -2,8 +2,11 @@ package de.westnordost.streetcomplete.quests.fire_hydrant_position import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment +import de.westnordost.streetcomplete.quests.fire_hydrant_position.FireHydrantPosition.GREEN +import de.westnordost.streetcomplete.quests.fire_hydrant_position.FireHydrantPosition.LANE +import de.westnordost.streetcomplete.quests.fire_hydrant_position.FireHydrantPosition.PARKING_LOT +import de.westnordost.streetcomplete.quests.fire_hydrant_position.FireHydrantPosition.SIDEWALK import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.quests.fire_hydrant_position.FireHydrantPosition.* class AddFireHydrantPositionForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt index c11ef9c5d2..2c67194efc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestrians.kt @@ -5,7 +5,10 @@ import de.westnordost.streetcomplete.data.meta.ANYTHING_PAVED import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN -import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.* +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.IS_LIVING_STREET +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES class AddProhibitedForPedestrians : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt index 11347a1d68..c10862d81d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/foot/AddProhibitedForPedestriansForm.kt @@ -6,7 +6,10 @@ import de.westnordost.streetcomplete.databinding.DialogLivingStreetConfirmationB import de.westnordost.streetcomplete.ktx.livingStreetSignDrawableResId import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.* +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.IS_LIVING_STREET +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES class AddProhibitedForPedestriansForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/fuel_service/AddFuelSelfService.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/fuel_service/AddFuelSelfService.kt index 2c9966da7c..ee85365eb3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/fuel_service/AddFuelSelfService.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/fuel_service/AddFuelSelfService.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.quests.fuel_service import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.toYesNo diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/internet_access/AddInternetAccessForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/internet_access/AddInternetAccessForm.kt index a950d8f55a..4f174c6cd3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/internet_access/AddInternetAccessForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/internet_access/AddInternetAccessForm.kt @@ -3,7 +3,10 @@ package de.westnordost.streetcomplete.quests.internet_access import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestAnswerFragment import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.internet_access.InternetAccess.* +import de.westnordost.streetcomplete.quests.internet_access.InternetAccess.NO +import de.westnordost.streetcomplete.quests.internet_access.InternetAccess.TERMINAL +import de.westnordost.streetcomplete.quests.internet_access.InternetAccess.WIFI +import de.westnordost.streetcomplete.quests.internet_access.InternetAccess.WIRED class AddInternetAccessForm : AListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeight.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeight.kt index 35a3b78fd5..81880d48df 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeight.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeight.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.quests.kerb_height -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeightForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeightForm.kt index 78159405c0..58bc24cf0f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeightForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/kerb_height/AddKerbHeightForm.kt @@ -2,8 +2,12 @@ package de.westnordost.streetcomplete.quests.kerb_height import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment +import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.FLUSH +import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.KERB_RAMP +import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.LOWERED +import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.NO_KERB +import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.RAISED import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.quests.kerb_height.KerbHeight.* class AddKerbHeightForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanes.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanes.kt index a45f505417..6fc27f741c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanes.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanes.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.lanes import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.ANYTHING_PAVED -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR class AddLanes : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanesForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanesForm.kt index 65dde93bd2..32c2b1fa52 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanesForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/AddLanesForm.kt @@ -10,17 +10,19 @@ import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestLanesSelectTypeBinding import de.westnordost.streetcomplete.databinding.QuestStreetLanesPuzzleBinding import de.westnordost.streetcomplete.ktx.viewLifecycleScope +import de.westnordost.streetcomplete.osm.isForwardOneway +import de.westnordost.streetcomplete.osm.isOneway +import de.westnordost.streetcomplete.osm.isReversedOneway import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.StreetSideRotater -import de.westnordost.streetcomplete.quests.lanes.LanesType.* +import de.westnordost.streetcomplete.quests.lanes.LanesType.MARKED +import de.westnordost.streetcomplete.quests.lanes.LanesType.MARKED_SIDES +import de.westnordost.streetcomplete.quests.lanes.LanesType.UNMARKED import de.westnordost.streetcomplete.view.dialogs.ValuePickerDialog import kotlinx.coroutines.launch import kotlinx.coroutines.suspendCancellableCoroutine import kotlin.coroutines.resume -import de.westnordost.streetcomplete.osm.isForwardOneway -import de.westnordost.streetcomplete.osm.isReversedOneway -import de.westnordost.streetcomplete.osm.isOneway class AddLanesForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/LanesSelectPuzzle.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/LanesSelectPuzzle.kt index 943c60ff0a..e172d77934 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/LanesSelectPuzzle.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/LanesSelectPuzzle.kt @@ -2,7 +2,12 @@ package de.westnordost.streetcomplete.quests.lanes import android.animation.TimeAnimator import android.content.Context -import android.graphics.* +import android.graphics.Bitmap +import android.graphics.Canvas +import android.graphics.Color +import android.graphics.DashPathEffect +import android.graphics.Matrix +import android.graphics.Paint import android.graphics.drawable.Drawable import android.util.AttributeSet import android.view.LayoutInflater @@ -18,7 +23,9 @@ import de.westnordost.streetcomplete.databinding.ViewLanesSelectPuzzleBinding import de.westnordost.streetcomplete.ktx.getBitmapDrawable import de.westnordost.streetcomplete.ktx.isApril1st import de.westnordost.streetcomplete.ktx.showTapHint -import de.westnordost.streetcomplete.quests.lanes.LineStyle.* +import de.westnordost.streetcomplete.quests.lanes.LineStyle.CONTINUOUS +import de.westnordost.streetcomplete.quests.lanes.LineStyle.DASHES +import de.westnordost.streetcomplete.quests.lanes.LineStyle.SHORT_DASHES import kotlin.math.max import kotlin.random.Random diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/StreetSideSelectRotateContainer.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/StreetSideSelectRotateContainer.kt index c3e6287044..8fcf7f1da6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/StreetSideSelectRotateContainer.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/lanes/StreetSideSelectRotateContainer.kt @@ -6,7 +6,11 @@ import android.view.View import android.widget.FrameLayout import androidx.core.view.children import de.westnordost.streetcomplete.view.StreetRotateable -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.cos +import kotlin.math.max +import kotlin.math.min class StreetSideSelectRotateContainer @JvmOverloads constructor( context: Context, diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafType.kt index 2a4e98e8fb..87b2b0113a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafType.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.leaf_detail -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.geometry.ElementPolygonsGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.util.measuredMultiPolygonArea diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafTypeForm.kt index 453dfb819a..37565707d8 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/leaf_detail/AddForestLeafTypeForm.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.quests.leaf_detail import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.leaf_detail.ForestLeafType.* +import de.westnordost.streetcomplete.quests.leaf_detail.ForestLeafType.BROADLEAVED +import de.westnordost.streetcomplete.quests.leaf_detail.ForestLeafType.MIXED +import de.westnordost.streetcomplete.quests.leaf_detail.ForestLeafType.NEEDLELEAVED import de.westnordost.streetcomplete.view.image_select.Item class AddForestLeafTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevel.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevel.kt index 26df282f19..d97883e246 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevel.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevel.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.quests.level -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.geometry.ElementPolygonsGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.util.contains import de.westnordost.streetcomplete.util.isInMultipolygon diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt index f28e727579..35deabea6b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt @@ -3,13 +3,16 @@ package de.westnordost.streetcomplete.quests.level import android.os.Bundle import android.view.View import de.westnordost.streetcomplete.Injector - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.databinding.QuestLevelBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.getLevelsOrNull +import de.westnordost.streetcomplete.ktx.getSelectableLevels +import de.westnordost.streetcomplete.ktx.isSomeKindOfShop +import de.westnordost.streetcomplete.ktx.toShortString +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.map.getPinIcon import de.westnordost.streetcomplete.osm.SingleLevel import de.westnordost.streetcomplete.osm.levelsIntersect diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt index 38c5396416..b3ac4845e0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeight.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.max_height -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.ALL_PATHS import de.westnordost.streetcomplete.data.meta.ALL_ROADS import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.containsAny import de.westnordost.streetcomplete.util.intersects diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeightForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeightForm.kt index 2602aa6eaa..2baa2c464c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeightForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/AddMaxHeightForm.kt @@ -2,10 +2,12 @@ package de.westnordost.streetcomplete.quests.max_height import android.os.Bundle import android.text.InputFilter -import android.view.LayoutInflater import android.view.View -import android.view.ViewGroup -import android.widget.* +import android.widget.AdapterView +import android.widget.ArrayAdapter +import android.widget.EditText +import android.widget.Spinner +import android.widget.TextView import androidx.appcompat.app.AlertDialog import androidx.core.view.isGone import de.westnordost.streetcomplete.R diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/HeightMeasurementUnit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/HeightMeasurementUnit.kt index 2c8ec059b5..8a6b0f684c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/HeightMeasurementUnit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_height/HeightMeasurementUnit.kt @@ -1,6 +1,7 @@ package de.westnordost.streetcomplete.quests.max_height -import de.westnordost.streetcomplete.quests.max_height.HeightMeasurementUnit.* +import de.westnordost.streetcomplete.quests.max_height.HeightMeasurementUnit.FOOT_AND_INCH +import de.westnordost.streetcomplete.quests.max_height.HeightMeasurementUnit.METER enum class HeightMeasurementUnit(private val displayString: String) { METER("m"), diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.kt index ec6ee24d74..af044c7088 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.kt @@ -3,7 +3,12 @@ package de.westnordost.streetcomplete.quests.max_speed import android.os.Bundle import android.view.View import android.view.inputmethod.EditorInfo -import android.widget.* +import android.widget.ArrayAdapter +import android.widget.EditText +import android.widget.FrameLayout +import android.widget.ImageView +import android.widget.Spinner +import android.widget.TextView import androidx.annotation.IdRes import androidx.appcompat.app.AlertDialog import androidx.core.view.children @@ -19,7 +24,12 @@ import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.max_speed.SpeedMeasurementUnit.KILOMETERS_PER_HOUR import de.westnordost.streetcomplete.quests.max_speed.SpeedMeasurementUnit.MILES_PER_HOUR -import de.westnordost.streetcomplete.quests.max_speed.SpeedType.* +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.ADVISORY +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.LIVING_STREET +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.NO_SIGN +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.NSL +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.SIGN +import de.westnordost.streetcomplete.quests.max_speed.SpeedType.ZONE import de.westnordost.streetcomplete.util.TextChangedWatcher diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/SpeedMeasurementUnit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/SpeedMeasurementUnit.kt index 26d2a38876..84c4981246 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/SpeedMeasurementUnit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/SpeedMeasurementUnit.kt @@ -1,6 +1,7 @@ package de.westnordost.streetcomplete.quests.max_speed -import de.westnordost.streetcomplete.quests.max_speed.SpeedMeasurementUnit.* +import de.westnordost.streetcomplete.quests.max_speed.SpeedMeasurementUnit.KILOMETERS_PER_HOUR +import de.westnordost.streetcomplete.quests.max_speed.SpeedMeasurementUnit.MILES_PER_HOUR enum class SpeedMeasurementUnit(private val displayString: String) { KILOMETERS_PER_HOUR("km/h"), diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeight.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeight.kt index e004726412..945c3d1381 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeight.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/AddMaxWeight.kt @@ -4,7 +4,10 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR -import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign.* +import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign.MAX_AXLE_LOAD +import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign.MAX_GROSS_VEHICLE_MASS +import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign.MAX_TANDEM_AXLE_LOAD +import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign.MAX_WEIGHT class AddMaxWeight : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/WeightMeasurementUnit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/WeightMeasurementUnit.kt index ef49a0ac24..a44b32b613 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/WeightMeasurementUnit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_weight/WeightMeasurementUnit.kt @@ -1,6 +1,8 @@ package de.westnordost.streetcomplete.quests.max_weight -import de.westnordost.streetcomplete.quests.max_weight.WeightMeasurementUnit.* +import de.westnordost.streetcomplete.quests.max_weight.WeightMeasurementUnit.POUND +import de.westnordost.streetcomplete.quests.max_weight.WeightMeasurementUnit.SHORT_TON +import de.westnordost.streetcomplete.quests.max_weight.WeightMeasurementUnit.TON enum class WeightMeasurementUnit { TON, diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_capacity/AddMotorcycleParkingCapacity.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_capacity/AddMotorcycleParkingCapacity.kt index e7df4722b9..a389f8dbec 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_capacity/AddMotorcycleParkingCapacity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_capacity/AddMotorcycleParkingCapacity.kt @@ -2,11 +2,11 @@ package de.westnordost.streetcomplete.quests.motorcycle_parking_capacity import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR class AddMotorcycleParkingCapacity : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_cover/AddMotorcycleParkingCover.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_cover/AddMotorcycleParkingCover.kt index b8ff8c6b19..f9e134771e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_cover/AddMotorcycleParkingCover.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/motorcycle_parking_cover/AddMotorcycleParkingCover.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.motorcycle_parking_cover import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/AttachPhotoFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/AttachPhotoFragment.kt index 19edbc81c0..a883682527 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/AttachPhotoFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/AttachPhotoFragment.kt @@ -14,8 +14,8 @@ import androidx.core.content.FileProvider import androidx.core.view.isGone import androidx.fragment.app.Fragment import androidx.recyclerview.widget.LinearLayoutManager -import de.westnordost.streetcomplete.ApplicationConstants.ATTACH_PHOTO_MAXWIDTH import de.westnordost.streetcomplete.ApplicationConstants.ATTACH_PHOTO_MAXHEIGHT +import de.westnordost.streetcomplete.ApplicationConstants.ATTACH_PHOTO_MAXWIDTH import de.westnordost.streetcomplete.ApplicationConstants.ATTACH_PHOTO_QUALITY import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osmnotes.deleteImages diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteDiscussionForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteDiscussionForm.kt index 3b75a2c860..d7d9edb62f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteDiscussionForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteDiscussionForm.kt @@ -15,8 +15,8 @@ import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osmnotes.NoteComment -import de.westnordost.streetcomplete.data.osmnotes.edits.NotesWithEditsSource import de.westnordost.streetcomplete.data.osmnotes.NotesModule +import de.westnordost.streetcomplete.data.osmnotes.edits.NotesWithEditsSource import de.westnordost.streetcomplete.data.quest.OsmNoteQuestKey import de.westnordost.streetcomplete.data.user.User import de.westnordost.streetcomplete.databinding.QuestNoteDiscussionContentBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteImageAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteImageAdapter.kt index 50a6e3ddab..b7ebf14846 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteImageAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/note_discussion/NoteImageAdapter.kt @@ -1,17 +1,15 @@ package de.westnordost.streetcomplete.quests.note_discussion import android.content.Context -import androidx.appcompat.app.AlertDialog import android.view.LayoutInflater import android.view.ViewGroup +import androidx.appcompat.app.AlertDialog import androidx.core.view.doOnLayout - -import java.io.File - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.CellImageThumbnailBinding import de.westnordost.streetcomplete.util.decodeScaledBitmapAndNormalize import de.westnordost.streetcomplete.view.ListAdapter +import java.io.File class NoteImageAdapter(list: List, private val context: Context) : ListAdapter(list) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOneway.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOneway.kt index a0721c7e18..9d628529a6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOneway.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOneway.kt @@ -1,16 +1,18 @@ package de.westnordost.streetcomplete.quests.oneway -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.ALL_ROADS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.osm.estimateUsableRoadwayWidth -import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.* +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.BACKWARD +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.FORWARD +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.NO_ONEWAY class AddOneway : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOnewayForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOnewayForm.kt index 40b5eaaf2c..bb75b7826c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOnewayForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway/AddOnewayForm.kt @@ -2,21 +2,25 @@ package de.westnordost.streetcomplete.quests.oneway import android.content.Context import android.os.Bundle -import androidx.annotation.AnyThread import android.view.View - +import androidx.annotation.AnyThread import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestStreetSidePuzzleBinding import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.StreetSideRotater -import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.* +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.BACKWARD +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.FORWARD +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.NO_ONEWAY +import de.westnordost.streetcomplete.quests.oneway.OnewayAnswer.valueOf import de.westnordost.streetcomplete.util.getOrientationAtCenterLineInDegrees import de.westnordost.streetcomplete.view.DrawableImage import de.westnordost.streetcomplete.view.ResImage import de.westnordost.streetcomplete.view.ResText import de.westnordost.streetcomplete.view.RotatedCircleDrawable -import de.westnordost.streetcomplete.view.image_select.* +import de.westnordost.streetcomplete.view.image_select.DisplayItem +import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog +import de.westnordost.streetcomplete.view.image_select.Item2 import kotlin.math.PI class AddOnewayForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOneway.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOneway.kt index 96d25afb2f..93f546cb5b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOneway.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOneway.kt @@ -1,15 +1,14 @@ package de.westnordost.streetcomplete.quests.oneway_suspects import android.util.Log -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry - import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression +import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegment import de.westnordost.streetcomplete.quests.oneway_suspects.data.TrafficFlowSegmentsApi diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOnewayForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOnewayForm.kt index dfdf7d015c..0bd9d08cfb 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOnewayForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/AddSuspectedOnewayForm.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.quests.oneway_suspects import android.os.Bundle -import androidx.annotation.AnyThread import android.view.View -import javax.inject.Inject +import androidx.annotation.AnyThread import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry @@ -17,6 +16,7 @@ import de.westnordost.streetcomplete.view.ResImage import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import javax.inject.Inject class AddSuspectedOnewayForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/TrafficFlowSegmentsApi.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/TrafficFlowSegmentsApi.kt index a8e712220a..e3943763eb 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/TrafficFlowSegmentsApi.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/TrafficFlowSegmentsApi.kt @@ -3,11 +3,9 @@ package de.westnordost.streetcomplete.quests.oneway_suspects.data import android.annotation.SuppressLint import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon - -import java.net.URL - import de.westnordost.streetcomplete.ktx.format import org.json.JSONObject +import java.net.URL /** Dao for using this API: https://github.com/ENT8R/oneway-data-api */ class TrafficFlowSegmentsApi(private val apiUrl: String) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/WayTrafficFlowDao.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/WayTrafficFlowDao.kt index 48a968bcb4..59fd0e9a7e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/WayTrafficFlowDao.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/oneway_suspects/data/WayTrafficFlowDao.kt @@ -1,13 +1,11 @@ package de.westnordost.streetcomplete.quests.oneway_suspects.data -import javax.inject.Inject - +import de.westnordost.streetcomplete.data.Database import de.westnordost.streetcomplete.data.osm.mapdata.WayTables -import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable.NAME -import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable.Columns.WAY_ID import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable.Columns.IS_FORWARD - -import de.westnordost.streetcomplete.data.Database +import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable.Columns.WAY_ID +import de.westnordost.streetcomplete.quests.oneway_suspects.data.WayTrafficFlowTable.NAME +import javax.inject.Inject class WayTrafficFlowDao @Inject constructor(private val db: Database) { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt index bfc7f92e3b..a2072e61f4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt @@ -1,15 +1,15 @@ package de.westnordost.streetcomplete.quests.opening_hours -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.containsAny import de.westnordost.streetcomplete.osm.opening_hours.parser.isSupportedOpeningHours diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursForm.kt index 91811c2a62..ac4cd8e4d1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursForm.kt @@ -1,24 +1,24 @@ package de.westnordost.streetcomplete.quests.opening_hours import android.os.Bundle +import android.view.Menu.NONE +import android.view.View import androidx.appcompat.app.AlertDialog -import androidx.recyclerview.widget.LinearLayoutManager import androidx.appcompat.widget.PopupMenu -import android.view.View - -import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment -import de.westnordost.streetcomplete.util.AdapterDataChangedWatcher - -import android.view.Menu.NONE import androidx.core.view.isGone +import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView +import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestOpeningHoursBinding import de.westnordost.streetcomplete.databinding.QuestOpeningHoursCommentBinding -import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.opening_hours.adapter.* import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRows import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules +import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment +import de.westnordost.streetcomplete.quests.AnswerItem +import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningMonthsRow +import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningWeekdaysRow +import de.westnordost.streetcomplete.quests.opening_hours.adapter.RegularOpeningHoursAdapter +import de.westnordost.streetcomplete.util.AdapterDataChangedWatcher import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/MonthsPickerDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/MonthsPickerDialog.kt index e294068d6a..ed53bfad6f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/MonthsPickerDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/MonthsPickerDialog.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.quests.opening_hours import android.content.Context import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.osm.opening_hours.model.Months diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/TimeRangePickerDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/TimeRangePickerDialog.kt index f76f2f2b66..95f6c5d097 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/TimeRangePickerDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/TimeRangePickerDialog.kt @@ -3,8 +3,6 @@ package de.westnordost.streetcomplete.quests.opening_hours import android.content.Context import android.content.DialogInterface import android.os.Bundle -import com.google.android.material.tabs.TabLayout -import androidx.appcompat.app.AlertDialog import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -12,10 +10,11 @@ import android.view.WindowManager import android.widget.CheckBox import android.widget.FrameLayout import android.widget.TimePicker +import androidx.appcompat.app.AlertDialog import androidx.recyclerview.widget.RecyclerView import androidx.viewpager2.widget.ViewPager2 +import com.google.android.material.tabs.TabLayout import com.google.android.material.tabs.TabLayoutMediator - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.DialogTimeRangePickerBinding import de.westnordost.streetcomplete.databinding.TimeRangePickerEndPickerBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/WeekdaysPickerDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/WeekdaysPickerDialog.kt index d53b191056..b2417b0dd9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/WeekdaysPickerDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/WeekdaysPickerDialog.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.quests.opening_hours import android.content.Context import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/adapter/OpeningHoursAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/adapter/OpeningHoursAdapter.kt index c07d739078..e673b467e6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/adapter/OpeningHoursAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours/adapter/OpeningHoursAdapter.kt @@ -2,24 +2,24 @@ package de.westnordost.streetcomplete.quests.opening_hours.adapter import android.content.Context import android.text.format.DateFormat -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup import androidx.core.view.isInvisible - -import java.util.Locale - +import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.CountryInfo import de.westnordost.streetcomplete.databinding.QuestTimesMonthRowBinding import de.westnordost.streetcomplete.databinding.QuestTimesOffdayRowBinding import de.westnordost.streetcomplete.databinding.QuestTimesWeekdayRowBinding +import de.westnordost.streetcomplete.osm.opening_hours.model.Months +import de.westnordost.streetcomplete.osm.opening_hours.model.TimeRange +import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays +import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules import de.westnordost.streetcomplete.quests.opening_hours.MonthsPickerDialog import de.westnordost.streetcomplete.quests.opening_hours.TimeRangePickerDialog import de.westnordost.streetcomplete.quests.opening_hours.WeekdaysPickerDialog -import de.westnordost.streetcomplete.osm.opening_hours.model.* -import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules import kotlinx.serialization.Serializable +import java.util.Locale @Serializable sealed class OpeningHoursRow diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt index c5cbced163..9cf22411b0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt @@ -1,9 +1,7 @@ package de.westnordost.streetcomplete.quests.opening_hours_signed -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.getLastCheckDateKeys import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression @@ -11,8 +9,10 @@ import de.westnordost.streetcomplete.data.meta.setCheckDateForKey import de.westnordost.streetcomplete.data.meta.toCheckDate import de.westnordost.streetcomplete.data.meta.updateCheckDateForKey import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.containsAny import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/orchard_produce/AddOrchardProduceForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/orchard_produce/AddOrchardProduceForm.kt index 22dfa30593..7c8deb05f6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/orchard_produce/AddOrchardProduceForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/orchard_produce/AddOrchardProduceForm.kt @@ -2,7 +2,60 @@ package de.westnordost.streetcomplete.quests.orchard_produce import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.* +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.AGAVE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.ALMOND +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.APPLE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.APRICOT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.ARECA_NUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.AVOCADO +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.BANANA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.BLUEBERRY +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.BRAZIL_NUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CACAO +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CASHEW +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CHERRY +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CHESTNUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CHILLI_PEPPER +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.COCONUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.COFFEE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.CRANBERRY +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.DATE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.FIG +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.GRAPE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.GRAPEFRUIT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.GUAVA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.HAZELNUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.HOP +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.JOJOBA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.KIWI +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.KOLA_NUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.LEMON +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.LIME +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.MANGO +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.MANGOSTEEN +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.MATE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.NUTMEG +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.OLIVE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.ORANGE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PALM_OIL +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PAPAYA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PEACH +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PEAR +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PEPPER +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PERSIMMON +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PINEAPPLE +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PISTACHIO +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.PLUM +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.RASPBERRY +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.RUBBER +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.SISAL +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.STRAWBERRY +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.SWEET_PEPPER +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.TEA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.TOMATO +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.TUNG_NUT +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.VANILLA +import de.westnordost.streetcomplete.quests.orchard_produce.OrchardProduce.WALNUT import de.westnordost.streetcomplete.view.image_select.Item class AddOrchardProduceForm : AImageListQuestAnswerFragment>() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_access/AddParkingAccessForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_access/AddParkingAccessForm.kt index 4ab355fbe3..703cd4e88e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_access/AddParkingAccessForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_access/AddParkingAccessForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.parking_access import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestAnswerFragment import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.parking_access.ParkingAccess.* +import de.westnordost.streetcomplete.quests.parking_access.ParkingAccess.CUSTOMERS +import de.westnordost.streetcomplete.quests.parking_access.ParkingAccess.PRIVATE +import de.westnordost.streetcomplete.quests.parking_access.ParkingAccess.YES class AddParkingAccessForm : AListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_fee/AddParkingFeeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_fee/AddParkingFeeForm.kt index ac4dee1281..b098f371d9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_fee/AddParkingFeeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_fee/AddParkingFeeForm.kt @@ -12,8 +12,8 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestFeeHoursBinding import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.opening_hours.adapter.RegularOpeningHoursAdapter import de.westnordost.streetcomplete.quests.opening_hours.adapter.OpeningHoursRow +import de.westnordost.streetcomplete.quests.opening_hours.adapter.RegularOpeningHoursAdapter import de.westnordost.streetcomplete.util.AdapterDataChangedWatcher import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_type/AddParkingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_type/AddParkingTypeForm.kt index 18d8d13816..5612c5ada0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/parking_type/AddParkingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/parking_type/AddParkingTypeForm.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.quests.parking_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.parking_type.ParkingType.* +import de.westnordost.streetcomplete.quests.parking_type.ParkingType.LANE +import de.westnordost.streetcomplete.quests.parking_type.ParkingType.MULTI_STOREY +import de.westnordost.streetcomplete.quests.parking_type.ParkingType.STREET_SIDE +import de.westnordost.streetcomplete.quests.parking_type.ParkingType.SURFACE +import de.westnordost.streetcomplete.quests.parking_type.ParkingType.UNDERGROUND import de.westnordost.streetcomplete.view.image_select.Item class AddParkingTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/picnic_table_cover/AddPicnicTableCover.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/picnic_table_cover/AddPicnicTableCover.kt index 2d46a501bb..bde18d5eb1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/picnic_table_cover/AddPicnicTableCover.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/picnic_table_cover/AddPicnicTableCover.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.picnic_table_cover import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/pitch_lit/AddPitchLit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/pitch_lit/AddPitchLit.kt index 80d924244f..cecf236cd0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/pitch_lit/AddPitchLit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/pitch_lit/AddPitchLit.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.pitch_lit import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt index dd9a8ea579..97934d3ddc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.place_name -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import java.util.concurrent.FutureTask diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/playground_access/AddPlaygroundAccessForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/playground_access/AddPlaygroundAccessForm.kt index 36b51572d5..451f18f07c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/playground_access/AddPlaygroundAccessForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/playground_access/AddPlaygroundAccessForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.playground_access import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AListQuestAnswerFragment import de.westnordost.streetcomplete.quests.TextItem -import de.westnordost.streetcomplete.quests.playground_access.PlaygroundAccess.* +import de.westnordost.streetcomplete.quests.playground_access.PlaygroundAccess.CUSTOMERS +import de.westnordost.streetcomplete.quests.playground_access.PlaygroundAccess.PRIVATE +import de.westnordost.streetcomplete.quests.playground_access.PlaygroundAccess.YES class AddPlaygroundAccessForm : AListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/police_type/AddPoliceType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/police_type/AddPoliceType.kt index daf146c9a5..fb04ea623b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/police_type/AddPoliceType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/police_type/AddPoliceType.kt @@ -1,8 +1,8 @@ package de.westnordost.streetcomplete.quests.police_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimes.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimes.kt index 0dacd66df7..18ea34b560 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimes.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimes.kt @@ -3,18 +3,18 @@ package de.westnordost.streetcomplete.quests.postbox_collection_times import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey -import de.westnordost.streetcomplete.quests.getNameOrBrandOrOperatorOrRef import de.westnordost.streetcomplete.osm.opening_hours.parser.isSupportedCollectionTimes import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules +import de.westnordost.streetcomplete.quests.getNameOrBrandOrOperatorOrRef class AddPostboxCollectionTimes : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesForm.kt index 67ac8d394d..07b4ea700d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/AddPostboxCollectionTimesForm.kt @@ -2,19 +2,18 @@ package de.westnordost.streetcomplete.quests.postbox_collection_times import android.os.Bundle import android.view.Menu -import androidx.appcompat.app.AlertDialog -import androidx.recyclerview.widget.LinearLayoutManager import android.view.View +import androidx.appcompat.app.AlertDialog import androidx.appcompat.widget.PopupMenu import androidx.core.view.isGone +import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.QuestCollectionTimesBinding -import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment -import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.osm.opening_hours.parser.toCollectionTimesRows import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules +import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment +import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.util.AdapterDataChangedWatcher import kotlinx.serialization.decodeFromString import kotlinx.serialization.encodeToString diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/CollectionTimesAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/CollectionTimesAdapter.kt index 88810f4cf8..a533628e96 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/CollectionTimesAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_collection_times/CollectionTimesAdapter.kt @@ -2,21 +2,19 @@ package de.westnordost.streetcomplete.quests.postbox_collection_times import android.content.Context import android.text.format.DateFormat -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup import androidx.core.view.isInvisible - -import java.util.Locale - +import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.data.meta.CountryInfo import de.westnordost.streetcomplete.databinding.QuestTimesWeekdayRowBinding import de.westnordost.streetcomplete.osm.opening_hours.model.Weekdays -import de.westnordost.streetcomplete.quests.opening_hours.WeekdaysPickerDialog import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules +import de.westnordost.streetcomplete.quests.opening_hours.WeekdaysPickerDialog import de.westnordost.streetcomplete.util.timeOfDayToString import de.westnordost.streetcomplete.view.dialogs.TimePickerDialog import kotlinx.serialization.Serializable +import java.util.Locale @Serializable data class CollectionTimesRow(var weekdays: Weekdays, var time: Int) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRef.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRef.kt index 5fae5b1750..b3618a012d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRef.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_ref/AddPostboxRef.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.postbox_ref import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.quest.NoCountriesExcept -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN import de.westnordost.streetcomplete.ktx.arrayOfNotNull import de.westnordost.streetcomplete.ktx.containsAnyKey diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_royal_cypher/AddPostboxRoyalCypher.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_royal_cypher/AddPostboxRoyalCypher.kt index ca882b6ab8..5f0da5152c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_royal_cypher/AddPostboxRoyalCypher.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/postbox_royal_cypher/AddPostboxRoyalCypher.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.postbox_royal_cypher import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterial.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterial.kt index 1eab7de876..84b01f1735 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterial.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterial.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.quests.powerpoles_material import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BUILDING class AddPowerPolesMaterial : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterialForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterialForm.kt index 55addcabe5..905ae0f264 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterialForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/powerpoles_material/AddPowerPolesMaterialForm.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.quests.powerpoles_material import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.powerpoles_material.PowerPolesMaterial.* +import de.westnordost.streetcomplete.quests.powerpoles_material.PowerPolesMaterial.CONCRETE +import de.westnordost.streetcomplete.quests.powerpoles_material.PowerPolesMaterial.STEEL +import de.westnordost.streetcomplete.quests.powerpoles_material.PowerPolesMaterial.WOOD import de.westnordost.streetcomplete.view.image_select.Item class AddPowerPolesMaterialForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrier.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrier.kt index d62d70b28a..e87b9dafaf 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrier.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrier.kt @@ -1,13 +1,15 @@ package de.westnordost.streetcomplete.quests.railway_crossing -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.* +import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN class AddRailwayCrossingBarrier : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierForm.kt index 45b876513d..b728b27b66 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierForm.kt @@ -1,7 +1,12 @@ package de.westnordost.streetcomplete.quests.railway_crossing import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.* +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.CHICANE +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.DOUBLE_HALF +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.FULL +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.GATE +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.HALF +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.NO import de.westnordost.streetcomplete.view.image_select.DisplayItem class AddRailwayCrossingBarrierForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/RailwayCrossingBarrierItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/RailwayCrossingBarrierItem.kt index 736c289b05..ef08bc3791 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/RailwayCrossingBarrierItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/railway_crossing/RailwayCrossingBarrierItem.kt @@ -1,7 +1,12 @@ package de.westnordost.streetcomplete.quests.railway_crossing import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.* +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.CHICANE +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.DOUBLE_HALF +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.FULL +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.GATE +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.HALF +import de.westnordost.streetcomplete.quests.railway_crossing.RailwayCrossingBarrier.NO import de.westnordost.streetcomplete.view.image_select.Item fun List.toItems(isLeftHandTraffic: Boolean) = diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingType.kt index e839286e32..7a3dedeccc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingType.kt @@ -1,13 +1,15 @@ package de.westnordost.streetcomplete.quests.recycling import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN -import de.westnordost.streetcomplete.quests.recycling.RecyclingType.* +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.OVERGROUND_CONTAINER +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.RECYCLING_CENTRE +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.UNDERGROUND_CONTAINER class AddRecyclingType : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingTypeForm.kt index 5fa46df5b5..9c77e311c8 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling/AddRecyclingTypeForm.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.quests.recycling import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.recycling.RecyclingType.* +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.OVERGROUND_CONTAINER +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.RECYCLING_CENTRE +import de.westnordost.streetcomplete.quests.recycling.RecyclingType.UNDERGROUND_CONTAINER import de.westnordost.streetcomplete.view.image_select.Item class AddRecyclingTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlass.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlass.kt index 305edf8e30..6902af7cb4 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlass.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlass.kt @@ -1,14 +1,15 @@ package de.westnordost.streetcomplete.quests.recycling_glass import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.AllCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN -import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.* +import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.ANY +import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.BOTTLES class DetermineRecyclingGlass : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlassForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlassForm.kt index 4beed78758..30279e65b3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlassForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_glass/DetermineRecyclingGlassForm.kt @@ -3,7 +3,8 @@ package de.westnordost.streetcomplete.quests.recycling_glass import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.* +import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.ANY +import de.westnordost.streetcomplete.quests.recycling_glass.RecyclingGlass.BOTTLES class DetermineRecyclingGlassForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterials.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterials.kt index 5e641864ff..c5a90b12d5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterials.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterials.kt @@ -1,19 +1,22 @@ package de.westnordost.streetcomplete.quests.recycling_material -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.filters.RelativeDate import de.westnordost.streetcomplete.data.elementfilter.filters.TagOlderThan import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.meta.removeCheckDatesForKey import de.westnordost.streetcomplete.data.meta.hasCheckDateForKey +import de.westnordost.streetcomplete.data.meta.removeCheckDatesForKey import de.westnordost.streetcomplete.data.meta.updateCheckDateForKey import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN -import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.* +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.BEVERAGE_CARTONS +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_BOTTLES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_PACKAGING class AddRecyclingContainerMaterials : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsForm.kt index 151898f06f..d89c7fbd58 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/recycling_material/AddRecyclingContainerMaterialsForm.kt @@ -2,14 +2,28 @@ package de.westnordost.streetcomplete.quests.recycling_material import android.os.Bundle import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.BATTERIES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.BEVERAGE_CARTONS +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.CANS +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.CLOTHES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.COOKING_OIL +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.ENGINE_OIL +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.GLASS +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.GLASS_BOTTLES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.GREEN_WASTE +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PAPER +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_BOTTLES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_PACKAGING +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.SCRAP_METAL +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.SHOES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.SMALL_ELECTRICAL_APPLIANCES +import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog import de.westnordost.streetcomplete.view.image_select.ImageSelectAdapter import de.westnordost.streetcomplete.view.image_select.Item -import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog -import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.* class AddRecyclingContainerMaterialsForm : AImageListQuestAnswerFragment, RecyclingContainerMaterialsAnswer>() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/religion/AddReligionForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/religion/AddReligionForm.kt index 75d94d3634..e35c65f652 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/religion/AddReligionForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/religion/AddReligionForm.kt @@ -1,11 +1,23 @@ package de.westnordost.streetcomplete.quests.religion import android.os.Bundle - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.religion.Religion.* +import de.westnordost.streetcomplete.quests.religion.Religion.ANIMIST +import de.westnordost.streetcomplete.quests.religion.Religion.BAHAI +import de.westnordost.streetcomplete.quests.religion.Religion.BUDDHIST +import de.westnordost.streetcomplete.quests.religion.Religion.CAODAISM +import de.westnordost.streetcomplete.quests.religion.Religion.CHINESE_FOLK +import de.westnordost.streetcomplete.quests.religion.Religion.CHRISTIAN +import de.westnordost.streetcomplete.quests.religion.Religion.HINDU +import de.westnordost.streetcomplete.quests.religion.Religion.JAIN +import de.westnordost.streetcomplete.quests.religion.Religion.JEWISH +import de.westnordost.streetcomplete.quests.religion.Religion.MULTIFAITH +import de.westnordost.streetcomplete.quests.religion.Religion.MUSLIM +import de.westnordost.streetcomplete.quests.religion.Religion.SHINTO +import de.westnordost.streetcomplete.quests.religion.Religion.SIKH +import de.westnordost.streetcomplete.quests.religion.Religion.TAOIST import de.westnordost.streetcomplete.view.image_select.Item class AddReligionForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadName.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadName.kt index 15bf859159..bd5b3fb004 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadName.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadName.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.quests.road_name import de.westnordost.streetcomplete.R +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.AllCountriesExcept -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.POSTMAN diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameForm.kt index 7dc34b30f2..3dd636faaa 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameForm.kt @@ -1,14 +1,7 @@ package de.westnordost.streetcomplete.quests.road_name import android.content.DialogInterface -import android.view.View import androidx.appcompat.app.AlertDialog - -import java.util.LinkedList -import java.util.Locale - -import javax.inject.Inject - import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.AbbreviationsByLocale @@ -16,11 +9,13 @@ import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolygonsGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestRoadnameBinding -import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.AAddLocalizedNameForm -import de.westnordost.streetcomplete.quests.AddLocalizedNameAdapter +import de.westnordost.streetcomplete.quests.AnswerItem import de.westnordost.streetcomplete.quests.LocalizedName import java.lang.IllegalStateException +import java.util.LinkedList +import java.util.Locale +import javax.inject.Inject class AddRoadNameForm : AAddLocalizedNameForm() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt index 054075fde9..694c7ecd54 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSource.kt @@ -1,7 +1,5 @@ package de.westnordost.streetcomplete.quests.road_name -import javax.inject.Inject - import de.westnordost.streetcomplete.data.meta.ALL_PATHS import de.westnordost.streetcomplete.data.meta.ALL_ROADS import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource @@ -11,6 +9,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.util.distanceTo import de.westnordost.streetcomplete.util.enclosingBoundingBox import de.westnordost.streetcomplete.util.enlargedBy +import javax.inject.Inject class RoadNameSuggestionsSource @Inject constructor( private val mapDataSource: MapDataWithEditsSource diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShape.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShape.kt index 68c0e87841..95642e573b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShape.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShape.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.roof_shape -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.CountryInfos -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BUILDING class AddRoofShape(private val countryInfos: CountryInfos) : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShapeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShapeForm.kt index 2f84e4bf80..4d0843ee69 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShapeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/roof_shape/AddRoofShapeForm.kt @@ -1,11 +1,26 @@ package de.westnordost.streetcomplete.quests.roof_shape import android.os.Bundle - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.* import de.westnordost.streetcomplete.quests.AnswerItem +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.CONE +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.DOME +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.DOUBLE_SALTBOX +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.FLAT +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.GABLED +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.GAMBREL +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.HALF_HIPPED +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.HIPPED +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.MANSARD +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.MANY +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.ONION +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.PYRAMIDAL +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.QUADRUPLE_SALTBOX +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.ROUND +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.ROUND_GABLED +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.SALTBOX +import de.westnordost.streetcomplete.quests.roof_shape.RoofShape.SKILLION import de.westnordost.streetcomplete.view.image_select.Item class AddRoofShapeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationForm.kt index 7737394e38..fb0dbc1775 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/segregated/AddCyclewaySegregationForm.kt @@ -2,7 +2,6 @@ package de.westnordost.streetcomplete.quests.segregated import android.os.Bundle import android.view.View - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment import de.westnordost.streetcomplete.view.image_select.Item diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundry.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundry.kt index c726886842..fbebc8e366 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundry.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundry.kt @@ -4,7 +4,9 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN -import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.* +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.NO +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.ONLY +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.OPTIONAL class AddSelfServiceLaundry : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundryForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundryForm.kt index facff8fedb..c51baad0ca 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundryForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/self_service/AddSelfServiceLaundryForm.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.self_service import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.* +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.NO +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.ONLY +import de.westnordost.streetcomplete.quests.self_service.SelfServiceLaundry.OPTIONAL class AddSelfServiceLaundryForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt index 5e3a7d4aa8..3dec815e26 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt @@ -2,12 +2,16 @@ package de.westnordost.streetcomplete.quests.shop_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.meta.* -import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.meta.KEYS_THAT_SHOULD_BE_REMOVED_WHEN_SHOP_IS_REPLACED +import de.westnordost.streetcomplete.data.meta.LAST_CHECK_DATE_KEYS +import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression +import de.westnordost.streetcomplete.data.meta.removeCheckDates +import de.westnordost.streetcomplete.data.meta.updateCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN class CheckShopType : OsmElementQuestType { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt index b81d92f229..58fca431b6 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.quests.shop_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.meta.removeCheckDates import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.meta.removeCheckDates import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CITIZEN import de.westnordost.streetcomplete.ktx.containsAny diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/shoulder/AddShoulder.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/shoulder/AddShoulder.kt index cb2acec4bb..579a0f3410 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/shoulder/AddShoulder.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/shoulder/AddShoulder.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.shoulder import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.ANYTHING_UNPAVED import de.westnordost.streetcomplete.data.meta.MAXSPEED_TYPE_KEYS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt index 742820f4e8..06eecd75e5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/AddSidewalk.kt @@ -1,14 +1,14 @@ package de.westnordost.streetcomplete.quests.sidewalk -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.ANYTHING_UNPAVED import de.westnordost.streetcomplete.data.meta.MAXSPEED_TYPE_KEYS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.osm.estimateCycleTrackWidth import de.westnordost.streetcomplete.osm.estimateParkingOffRoadWidth diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/Sidewalk.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/Sidewalk.kt index 96700fe76e..ea4d0d50dc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/Sidewalk.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/Sidewalk.kt @@ -1,7 +1,9 @@ package de.westnordost.streetcomplete.quests.sidewalk import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.* +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.NO +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.SEPARATE +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.YES data class SidewalkSides(val left: Sidewalk, val right: Sidewalk) diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/SidewalkItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/SidewalkItem.kt index f4d429892e..4b33f771d5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/SidewalkItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/sidewalk/SidewalkItem.kt @@ -3,7 +3,9 @@ package de.westnordost.streetcomplete.quests.sidewalk import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.StreetSideDisplayItem import de.westnordost.streetcomplete.quests.StreetSideItem -import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.* +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.NO +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.SEPARATE +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.YES import de.westnordost.streetcomplete.view.image_select.DisplayItem import de.westnordost.streetcomplete.view.image_select.Item diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddPathSmoothness.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddPathSmoothness.kt index c8c9cd81b3..2ad6a8c6df 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddPathSmoothness.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddPathSmoothness.kt @@ -5,8 +5,8 @@ import de.westnordost.streetcomplete.data.meta.removeCheckDatesForKey import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR import de.westnordost.streetcomplete.ktx.arrayOfNotNull class AddPathSmoothness : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothness.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothness.kt index 500b05013b..d697aca41e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothness.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothness.kt @@ -5,8 +5,8 @@ import de.westnordost.streetcomplete.data.meta.removeCheckDatesForKey import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.osm.osmquests.Tags -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR import de.westnordost.streetcomplete.ktx.arrayOfNotNull class AddRoadSmoothness : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessItem.kt index e52775fef6..e5781a8cde 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/smoothness/SmoothnessItem.kt @@ -6,7 +6,14 @@ import android.text.SpannableStringBuilder import androidx.annotation.DrawableRes import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.ktx.asImageSpan -import de.westnordost.streetcomplete.quests.smoothness.Smoothness.* +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.BAD +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.EXCELLENT +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.GOOD +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.HORRIBLE +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.IMPASSABLE +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.INTERMEDIATE +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.VERY_BAD +import de.westnordost.streetcomplete.quests.smoothness.Smoothness.VERY_HORRIBLE import de.westnordost.streetcomplete.view.CharSequenceText import de.westnordost.streetcomplete.view.ResImage import de.westnordost.streetcomplete.view.ResText diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/sport/AddSportForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/sport/AddSportForm.kt index 9c2076d349..10c1206d39 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/sport/AddSportForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/sport/AddSportForm.kt @@ -2,11 +2,43 @@ package de.westnordost.streetcomplete.quests.sport import android.os.Bundle import androidx.appcompat.app.AlertDialog - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.sport.Sport.* +import de.westnordost.streetcomplete.quests.sport.Sport.AMERICAN_FOOTBALL +import de.westnordost.streetcomplete.quests.sport.Sport.ARCHERY +import de.westnordost.streetcomplete.quests.sport.Sport.ATHLETICS +import de.westnordost.streetcomplete.quests.sport.Sport.AUSTRALIAN_FOOTBALL +import de.westnordost.streetcomplete.quests.sport.Sport.BADMINTON +import de.westnordost.streetcomplete.quests.sport.Sport.BASEBALL +import de.westnordost.streetcomplete.quests.sport.Sport.BASKETBALL +import de.westnordost.streetcomplete.quests.sport.Sport.BEACHVOLLEYBALL +import de.westnordost.streetcomplete.quests.sport.Sport.BOULES +import de.westnordost.streetcomplete.quests.sport.Sport.BOWLS +import de.westnordost.streetcomplete.quests.sport.Sport.CANADIAN_FOOTBALL +import de.westnordost.streetcomplete.quests.sport.Sport.CRICKET +import de.westnordost.streetcomplete.quests.sport.Sport.EQUESTRIAN +import de.westnordost.streetcomplete.quests.sport.Sport.FIELD_HOCKEY +import de.westnordost.streetcomplete.quests.sport.Sport.GAELIC_GAMES +import de.westnordost.streetcomplete.quests.sport.Sport.GOLF +import de.westnordost.streetcomplete.quests.sport.Sport.GYMNASTICS +import de.westnordost.streetcomplete.quests.sport.Sport.HANDBALL +import de.westnordost.streetcomplete.quests.sport.Sport.ICE_HOCKEY +import de.westnordost.streetcomplete.quests.sport.Sport.ICE_SKATING +import de.westnordost.streetcomplete.quests.sport.Sport.MULTI +import de.westnordost.streetcomplete.quests.sport.Sport.NETBALL +import de.westnordost.streetcomplete.quests.sport.Sport.PADDLE_TENNIS +import de.westnordost.streetcomplete.quests.sport.Sport.RACQUET +import de.westnordost.streetcomplete.quests.sport.Sport.ROLLER_SKATING +import de.westnordost.streetcomplete.quests.sport.Sport.RUGBY +import de.westnordost.streetcomplete.quests.sport.Sport.SEPAK_TAKRAW +import de.westnordost.streetcomplete.quests.sport.Sport.SHOOTING +import de.westnordost.streetcomplete.quests.sport.Sport.SKATEBOARD +import de.westnordost.streetcomplete.quests.sport.Sport.SOCCER +import de.westnordost.streetcomplete.quests.sport.Sport.SOFTBALL +import de.westnordost.streetcomplete.quests.sport.Sport.TABLE_TENNIS +import de.westnordost.streetcomplete.quests.sport.Sport.TENNIS +import de.westnordost.streetcomplete.quests.sport.Sport.VOLLEYBALL import de.westnordost.streetcomplete.view.image_select.Item class AddSportForm : AImageListQuestAnswerFragment>() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsIncline.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsIncline.kt index 9cc4a3f397..2bf334041d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsIncline.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsIncline.kt @@ -1,10 +1,11 @@ package de.westnordost.streetcomplete.quests.steps_incline import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN -import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.* +import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.UP +import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.UP_REVERSED class AddStepsIncline : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsInclineForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsInclineForm.kt index 54aeb46435..f0bf7976aa 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsInclineForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_incline/AddStepsInclineForm.kt @@ -2,21 +2,24 @@ package de.westnordost.streetcomplete.quests.steps_incline import android.content.Context import android.os.Bundle -import androidx.annotation.AnyThread import android.view.View - +import androidx.annotation.AnyThread import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestStreetSidePuzzleBinding import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.StreetSideRotater -import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.* +import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.UP +import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.UP_REVERSED +import de.westnordost.streetcomplete.quests.steps_incline.StepsIncline.valueOf import de.westnordost.streetcomplete.util.getOrientationAtCenterLineInDegrees import de.westnordost.streetcomplete.view.DrawableImage import de.westnordost.streetcomplete.view.ResImage import de.westnordost.streetcomplete.view.ResText import de.westnordost.streetcomplete.view.RotatedCircleDrawable -import de.westnordost.streetcomplete.view.image_select.* +import de.westnordost.streetcomplete.view.image_select.DisplayItem +import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog +import de.westnordost.streetcomplete.view.image_select.Item2 import kotlin.math.PI class AddStepsInclineForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt index 1af7deff3c..d877844ddf 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRamp.kt @@ -2,8 +2,8 @@ package de.westnordost.streetcomplete.quests.steps_ramp import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRampForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRampForm.kt index 7cbbdd7341..e04f97ec36 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRampForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/steps_ramp/AddStepsRampForm.kt @@ -5,10 +5,12 @@ import android.view.View import androidx.appcompat.app.AlertDialog import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.view.image_select.Item - -import de.westnordost.streetcomplete.quests.steps_ramp.StepsRamp.* +import de.westnordost.streetcomplete.quests.steps_ramp.StepsRamp.BICYCLE +import de.westnordost.streetcomplete.quests.steps_ramp.StepsRamp.NONE +import de.westnordost.streetcomplete.quests.steps_ramp.StepsRamp.STROLLER +import de.westnordost.streetcomplete.quests.steps_ramp.StepsRamp.WHEELCHAIR import de.westnordost.streetcomplete.view.image_select.ImageSelectAdapter +import de.westnordost.streetcomplete.view.image_select.Item class AddStepsRampForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParking.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParking.kt index 136ce0dce8..bcee20cc1b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParking.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParking.kt @@ -2,13 +2,17 @@ package de.westnordost.streetcomplete.quests.street_parking import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.MAXSPEED_TYPE_KEYS -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR -import de.westnordost.streetcomplete.osm.street_parking.* +import de.westnordost.streetcomplete.osm.street_parking.LeftAndRightStreetParking +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingPositionAndOrientation +import de.westnordost.streetcomplete.osm.street_parking.toOsmConditionValue +import de.westnordost.streetcomplete.osm.street_parking.toOsmLaneValue +import de.westnordost.streetcomplete.osm.street_parking.toOsmValue class AddStreetParking : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingForm.kt index b33ef4a6f6..1267ec9f7e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingForm.kt @@ -10,19 +10,44 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.CountryInfo import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.databinding.QuestStreetSidePuzzleWithLastAnswerButtonBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.noParkingLineStyleResId +import de.westnordost.streetcomplete.ktx.noParkingSignDrawableResId +import de.westnordost.streetcomplete.ktx.noStandingLineStyleResId +import de.westnordost.streetcomplete.ktx.noStandingSignDrawableResId +import de.westnordost.streetcomplete.ktx.noStoppingLineStyleResId +import de.westnordost.streetcomplete.ktx.noStoppingSignDrawableResId import de.westnordost.streetcomplete.osm.isForwardOneway import de.westnordost.streetcomplete.osm.isReversedOneway -import de.westnordost.streetcomplete.osm.street_parking.* +import de.westnordost.streetcomplete.osm.street_parking.LeftAndRightStreetParking +import de.westnordost.streetcomplete.osm.street_parking.NoStreetParking +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation +import de.westnordost.streetcomplete.osm.street_parking.StreetParking +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingPositionAndOrientation +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingProhibited +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingSeparate +import de.westnordost.streetcomplete.osm.street_parking.StreetStandingProhibited +import de.westnordost.streetcomplete.osm.street_parking.StreetStoppingProhibited import de.westnordost.streetcomplete.quests.AbstractQuestFormAnswerFragment import de.westnordost.streetcomplete.quests.StreetSideRotater -import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.* -import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.* +import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.CONDITIONAL_RESTRICTIONS +import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.IMPLICIT +import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.NO_PARKING +import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.NO_STANDING +import de.westnordost.streetcomplete.quests.street_parking.NoParkingSelection.NO_STOPPING +import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.DIAGONAL +import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.NO +import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.PARALLEL +import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.PERPENDICULAR +import de.westnordost.streetcomplete.quests.street_parking.ParkingSelection.SEPARATE import de.westnordost.streetcomplete.util.normalizeDegrees -import de.westnordost.streetcomplete.view.* +import de.westnordost.streetcomplete.view.DrawableImage +import de.westnordost.streetcomplete.view.Image +import de.westnordost.streetcomplete.view.ResImage +import de.westnordost.streetcomplete.view.ResText import de.westnordost.streetcomplete.view.image_select.DisplayItem import de.westnordost.streetcomplete.view.image_select.ImageListPickerDialog import de.westnordost.streetcomplete.view.image_select.Item2 +import de.westnordost.streetcomplete.view.setImage import kotlin.math.absoluteValue class AddStreetParkingForm : AbstractQuestFormAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingDrawable.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingDrawable.kt index e7d35906fc..7aae8760fc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingDrawable.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingDrawable.kt @@ -10,9 +10,15 @@ import androidx.core.graphics.withSave import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.ktx.isApril1st import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation -import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.* +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.DIAGONAL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PARALLEL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PERPENDICULAR import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition -import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.HALF_ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_STREET +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.PAINTED_AREA_ONLY +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.STREET_SIDE import kotlin.math.ceil import kotlin.random.Random diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingItem.kt index f39e1b76b8..0ce45058ca 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/street_parking/StreetParkingItem.kt @@ -3,9 +3,27 @@ package de.westnordost.streetcomplete.quests.street_parking import android.content.Context import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.CountryInfo -import de.westnordost.streetcomplete.ktx.* -import de.westnordost.streetcomplete.osm.street_parking.* -import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* +import de.westnordost.streetcomplete.ktx.noParkingLineStyleResId +import de.westnordost.streetcomplete.ktx.noParkingSignDrawableResId +import de.westnordost.streetcomplete.ktx.noStandingLineStyleResId +import de.westnordost.streetcomplete.ktx.noStandingSignDrawableResId +import de.westnordost.streetcomplete.ktx.noStoppingLineStyleResId +import de.westnordost.streetcomplete.ktx.noStoppingSignDrawableResId +import de.westnordost.streetcomplete.osm.street_parking.IncompleteStreetParking +import de.westnordost.streetcomplete.osm.street_parking.NoStreetParking +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.HALF_ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_STREET +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.PAINTED_AREA_ONLY +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.STREET_SIDE +import de.westnordost.streetcomplete.osm.street_parking.StreetParking +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingPositionAndOrientation +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingProhibited +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingSeparate +import de.westnordost.streetcomplete.osm.street_parking.StreetStandingProhibited +import de.westnordost.streetcomplete.osm.street_parking.StreetStoppingProhibited +import de.westnordost.streetcomplete.osm.street_parking.UnknownStreetParking import de.westnordost.streetcomplete.view.DrawableImage import de.westnordost.streetcomplete.view.Image import de.westnordost.streetcomplete.view.ResImage diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/summit_register/AddSummitRegister.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/summit_register/AddSummitRegister.kt index 2c86685267..723e168612 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/summit_register/AddSummitRegister.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/summit_register/AddSummitRegister.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.quests.summit_register -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.OUTDOORS import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.RARE diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/Surface.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/Surface.kt index 40dbb09f90..a1d62882ab 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/Surface.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/Surface.kt @@ -1,6 +1,29 @@ package de.westnordost.streetcomplete.quests.surface -import de.westnordost.streetcomplete.quests.surface.Surface.* +import de.westnordost.streetcomplete.quests.surface.Surface.ARTIFICIAL_TURF +import de.westnordost.streetcomplete.quests.surface.Surface.ASPHALT +import de.westnordost.streetcomplete.quests.surface.Surface.CLAY +import de.westnordost.streetcomplete.quests.surface.Surface.COMPACTED +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE_LANES +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE_PLATES +import de.westnordost.streetcomplete.quests.surface.Surface.DIRT +import de.westnordost.streetcomplete.quests.surface.Surface.FINE_GRAVEL +import de.westnordost.streetcomplete.quests.surface.Surface.GRASS +import de.westnordost.streetcomplete.quests.surface.Surface.GRASS_PAVER +import de.westnordost.streetcomplete.quests.surface.Surface.GRAVEL +import de.westnordost.streetcomplete.quests.surface.Surface.GROUND +import de.westnordost.streetcomplete.quests.surface.Surface.METAL +import de.westnordost.streetcomplete.quests.surface.Surface.PAVED +import de.westnordost.streetcomplete.quests.surface.Surface.PAVING_STONES +import de.westnordost.streetcomplete.quests.surface.Surface.PEBBLES +import de.westnordost.streetcomplete.quests.surface.Surface.ROCK +import de.westnordost.streetcomplete.quests.surface.Surface.SAND +import de.westnordost.streetcomplete.quests.surface.Surface.SETT +import de.westnordost.streetcomplete.quests.surface.Surface.TARTAN +import de.westnordost.streetcomplete.quests.surface.Surface.UNHEWN_COBBLESTONE +import de.westnordost.streetcomplete.quests.surface.Surface.UNPAVED +import de.westnordost.streetcomplete.quests.surface.Surface.WOOD enum class Surface(val osmValue: String) { ASPHALT("asphalt"), diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/SurfaceItem.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/SurfaceItem.kt index 053442caf6..3af389b179 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/surface/SurfaceItem.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/surface/SurfaceItem.kt @@ -1,7 +1,31 @@ package de.westnordost.streetcomplete.quests.surface import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.quests.surface.Surface.* +import de.westnordost.streetcomplete.quests.surface.Surface.ARTIFICIAL_TURF +import de.westnordost.streetcomplete.quests.surface.Surface.ASPHALT +import de.westnordost.streetcomplete.quests.surface.Surface.CLAY +import de.westnordost.streetcomplete.quests.surface.Surface.COMPACTED +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE_LANES +import de.westnordost.streetcomplete.quests.surface.Surface.CONCRETE_PLATES +import de.westnordost.streetcomplete.quests.surface.Surface.DIRT +import de.westnordost.streetcomplete.quests.surface.Surface.FINE_GRAVEL +import de.westnordost.streetcomplete.quests.surface.Surface.GRASS +import de.westnordost.streetcomplete.quests.surface.Surface.GRASS_PAVER +import de.westnordost.streetcomplete.quests.surface.Surface.GRAVEL +import de.westnordost.streetcomplete.quests.surface.Surface.GROUND +import de.westnordost.streetcomplete.quests.surface.Surface.METAL +import de.westnordost.streetcomplete.quests.surface.Surface.PAVED +import de.westnordost.streetcomplete.quests.surface.Surface.PAVING_STONES +import de.westnordost.streetcomplete.quests.surface.Surface.PEBBLES +import de.westnordost.streetcomplete.quests.surface.Surface.ROCK +import de.westnordost.streetcomplete.quests.surface.Surface.SAND +import de.westnordost.streetcomplete.quests.surface.Surface.SETT +import de.westnordost.streetcomplete.quests.surface.Surface.TARTAN +import de.westnordost.streetcomplete.quests.surface.Surface.UNHEWN_COBBLESTONE +import de.westnordost.streetcomplete.quests.surface.Surface.UNPAVED +import de.westnordost.streetcomplete.quests.surface.Surface.WOOD +import de.westnordost.streetcomplete.quests.surface.Surface.WOODCHIPS import de.westnordost.streetcomplete.view.image_select.Item fun List.toItems() = this.map { it.asItem() } diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalk.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalk.kt index 1f64054832..905bcf5426 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalk.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalk.kt @@ -1,12 +1,12 @@ package de.westnordost.streetcomplete.quests.tactile_paving -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.Tags +import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.osm.isCrossing diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingKerb.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingKerb.kt index 8d4a5870c0..776815d794 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingKerb.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingKerb.kt @@ -1,13 +1,13 @@ package de.westnordost.streetcomplete.quests.tactile_paving -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression -import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.meta.updateWithCheckDate import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.osm.kerb.couldBeAKerb diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/tourism_information/AddInformationForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/tourism_information/AddInformationForm.kt index 24ef044fd3..5057e00b74 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/tourism_information/AddInformationForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/tourism_information/AddInformationForm.kt @@ -1,10 +1,13 @@ package de.westnordost.streetcomplete.quests.tourism_information import android.os.Bundle - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.* +import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.BOARD +import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.GUIDEPOST +import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.MAP +import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.OFFICE +import de.westnordost.streetcomplete.quests.tourism_information.TourismInformation.TERMINAL import de.westnordost.streetcomplete.view.image_select.Item class AddInformationForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/tracktype/AddTracktypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/tracktype/AddTracktypeForm.kt index 6749dc985c..2a3c345e6c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/tracktype/AddTracktypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/tracktype/AddTracktypeForm.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.quests.tracktype import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.tracktype.Tracktype.* +import de.westnordost.streetcomplete.quests.tracktype.Tracktype.GRADE1 +import de.westnordost.streetcomplete.quests.tracktype.Tracktype.GRADE2 +import de.westnordost.streetcomplete.quests.tracktype.Tracktype.GRADE3 +import de.westnordost.streetcomplete.quests.tracktype.Tracktype.GRADE4 +import de.westnordost.streetcomplete.quests.tracktype.Tracktype.GRADE5 import de.westnordost.streetcomplete.view.image_select.Item class AddTracktypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingType.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingType.kt index 8ba2d130fc..7dd395b591 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingType.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingType.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.quests.traffic_calming_type import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.CAR +import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN class AddTrafficCalmingType : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingTypeForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingTypeForm.kt index a4d17d8ee6..d419edff07 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingTypeForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_calming_type/AddTrafficCalmingTypeForm.kt @@ -2,7 +2,14 @@ package de.westnordost.streetcomplete.quests.traffic_calming_type import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.quests.AImageListQuestAnswerFragment -import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.* +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.BUMP +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.CHICANE +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.CHOKER +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.CUSHION +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.HUMP +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.ISLAND +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.RUMBLE_STRIP +import de.westnordost.streetcomplete.quests.traffic_calming_type.TrafficCalmingType.TABLE import de.westnordost.streetcomplete.view.image_select.Item class AddTrafficCalmingTypeForm : AImageListQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_button/AddTrafficSignalsButton.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_button/AddTrafficSignalsButton.kt index 750b25792a..2a849f9256 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_button/AddTrafficSignalsButton.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_button/AddTrafficSignalsButton.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.quests.traffic_signals_button import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.osm.isCrossingWithTrafficSignals diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSound.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSound.kt index c15ad43f34..b3c96410a0 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSound.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSound.kt @@ -3,10 +3,10 @@ package de.westnordost.streetcomplete.quests.traffic_signals_sound import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.osm.isCrossingWithTrafficSignals diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibration.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibration.kt index a8748842fe..e919a74d91 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibration.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibration.kt @@ -3,10 +3,10 @@ package de.westnordost.streetcomplete.quests.traffic_signals_vibrate import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpression import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.BLIND import de.westnordost.streetcomplete.ktx.toYesNo import de.westnordost.streetcomplete.osm.isCrossingWithTrafficSignals diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/AddWayLit.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/AddWayLit.kt index b5aa6ae249..38df64ad58 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/AddWayLit.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/AddWayLit.kt @@ -3,8 +3,8 @@ package de.westnordost.streetcomplete.quests.way_lit import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.MAXSPEED_TYPE_KEYS import de.westnordost.streetcomplete.data.meta.updateWithCheckDate -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.PEDESTRIAN class AddWayLit : OsmFilterQuestType() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/WayLitForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/WayLitForm.kt index 518c4fefec..5579dde011 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/WayLitForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/way_lit/WayLitForm.kt @@ -4,8 +4,11 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.ktx.isArea import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment -import de.westnordost.streetcomplete.quests.way_lit.WayLit.* import de.westnordost.streetcomplete.quests.AnswerItem +import de.westnordost.streetcomplete.quests.way_lit.WayLit.AUTOMATIC +import de.westnordost.streetcomplete.quests.way_lit.WayLit.NIGHT_AND_DAY +import de.westnordost.streetcomplete.quests.way_lit.WayLit.NO +import de.westnordost.streetcomplete.quests.way_lit.WayLit.YES class WayLitForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt index 19cf9c8c93..8a93d9a989 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt @@ -3,11 +3,11 @@ package de.westnordost.streetcomplete.quests.wheelchair_access import de.westnordost.osmfeatures.FeatureDictionary import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.meta.isKindOfShopExpression -import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter +import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement.WHEELCHAIR import de.westnordost.streetcomplete.ktx.arrayOfNotNull import java.util.concurrent.FutureTask diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/WheelchairAccessAnswerForm.kt b/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/WheelchairAccessAnswerForm.kt index 9119a22ce9..fb05209b7d 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/WheelchairAccessAnswerForm.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/wheelchair_access/WheelchairAccessAnswerForm.kt @@ -1,10 +1,11 @@ package de.westnordost.streetcomplete.quests.wheelchair_access import de.westnordost.streetcomplete.R - import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.quests.AnswerItem -import de.westnordost.streetcomplete.quests.wheelchair_access.WheelchairAccess.* +import de.westnordost.streetcomplete.quests.wheelchair_access.WheelchairAccess.LIMITED +import de.westnordost.streetcomplete.quests.wheelchair_access.WheelchairAccess.NO +import de.westnordost.streetcomplete.quests.wheelchair_access.WheelchairAccess.YES open class WheelchairAccessAnswerForm : AbstractQuestAnswerFragment() { diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/DialogPreferenceCompat.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/DialogPreferenceCompat.kt index 9ba4cfa1fb..a001e13cf7 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/DialogPreferenceCompat.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/DialogPreferenceCompat.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.settings import android.content.Context +import android.util.AttributeSet import androidx.preference.DialogPreference import androidx.preference.PreferenceDialogFragmentCompat -import android.util.AttributeSet import androidx.preference.R abstract class DialogPreferenceCompat @JvmOverloads constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreference.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreference.kt index e9f2f123f7..e42d71282e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreference.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreference.kt @@ -4,7 +4,6 @@ import android.content.Context import android.content.res.TypedArray import android.util.AttributeSet import androidx.core.content.withStyledAttributes - import de.westnordost.streetcomplete.R /** diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreferenceDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreferenceDialog.kt index ebbd4791f2..e8f55cc256 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreferenceDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/NumberPickerPreferenceDialog.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.settings -import androidx.preference.PreferenceDialogFragmentCompat import android.view.View import android.widget.NumberPicker - +import androidx.preference.PreferenceDialogFragmentCompat import de.westnordost.streetcomplete.R /** Preference dialog where user should pick a number */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/OAuthFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/OAuthFragment.kt index f7411707ae..a4a696ffc8 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/OAuthFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/OAuthFragment.kt @@ -10,7 +10,11 @@ import android.webkit.WebViewClient import android.widget.Toast import androidx.core.net.toUri import androidx.fragment.app.Fragment -import de.westnordost.streetcomplete.* +import de.westnordost.streetcomplete.ApplicationConstants +import de.westnordost.streetcomplete.BackPressedListener +import de.westnordost.streetcomplete.HasTitle +import de.westnordost.streetcomplete.Injector +import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.FragmentOauthBinding import de.westnordost.streetcomplete.ktx.toast import de.westnordost.streetcomplete.ktx.viewBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/ResurveyIntervalsUpdater.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/ResurveyIntervalsUpdater.kt index 85b48e0b80..6e7eee301f 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/ResurveyIntervalsUpdater.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/ResurveyIntervalsUpdater.kt @@ -2,7 +2,10 @@ package de.westnordost.streetcomplete.settings import android.content.SharedPreferences import de.westnordost.streetcomplete.Prefs -import de.westnordost.streetcomplete.Prefs.ResurveyIntervals.* +import de.westnordost.streetcomplete.Prefs.ResurveyIntervals.DEFAULT +import de.westnordost.streetcomplete.Prefs.ResurveyIntervals.LESS_OFTEN +import de.westnordost.streetcomplete.Prefs.ResurveyIntervals.MORE_OFTEN +import de.westnordost.streetcomplete.Prefs.ResurveyIntervals.valueOf import de.westnordost.streetcomplete.data.elementfilter.filters.RelativeDate import javax.inject.Inject import javax.inject.Singleton diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/SettingsFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/SettingsFragment.kt index 9e69fad968..43cf014344 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/SettingsFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/SettingsFragment.kt @@ -29,11 +29,16 @@ import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsSource import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeSource import de.westnordost.streetcomplete.databinding.DialogDeleteCacheBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.format +import de.westnordost.streetcomplete.ktx.getYamlObject +import de.westnordost.streetcomplete.ktx.purge +import de.westnordost.streetcomplete.ktx.toast import de.westnordost.streetcomplete.util.getSelectedLocales import de.westnordost.streetcomplete.util.setDefaultLocales -import kotlinx.coroutines.* -import java.util.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.util.Locale import javax.inject.Inject /** Shows the settings screen */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/ShowQuestFormsActivity.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/ShowQuestFormsActivity.kt index 12b342f655..a5cc155e30 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/ShowQuestFormsActivity.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/ShowQuestFormsActivity.kt @@ -2,29 +2,33 @@ package de.westnordost.streetcomplete.settings import android.content.SharedPreferences import android.os.Bundle -import androidx.recyclerview.widget.DividerItemDecoration -import androidx.recyclerview.widget.LinearLayoutManager import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AlertDialog import androidx.fragment.app.commit +import androidx.recyclerview.widget.DividerItemDecoration +import androidx.recyclerview.widget.LinearLayoutManager import de.westnordost.streetcomplete.BaseActivity -import javax.inject.Inject import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.Prefs import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry -import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osm.mapdata.Way -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.Quest +import de.westnordost.streetcomplete.data.quest.QuestKey +import de.westnordost.streetcomplete.data.quest.QuestType +import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry import de.westnordost.streetcomplete.databinding.FragmentShowQuestFormsBinding import de.westnordost.streetcomplete.databinding.RowQuestDisplayBinding import de.westnordost.streetcomplete.ktx.viewBinding import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment import de.westnordost.streetcomplete.view.ListAdapter +import javax.inject.Inject /** activity only used in debug, to show all the different forms for the different quests. */ class ShowQuestFormsActivity : BaseActivity(), AbstractQuestAnswerFragment.Listener { diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestPresetsAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestPresetsAdapter.kt index 3c00da2309..63f74b23ad 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestPresetsAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestPresetsAdapter.kt @@ -14,7 +14,11 @@ import de.westnordost.streetcomplete.data.visiblequests.QuestPreset import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsController import de.westnordost.streetcomplete.data.visiblequests.QuestPresetsSource import de.westnordost.streetcomplete.databinding.RowQuestPresetBinding -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch class QuestPresetsAdapter( private val context: Context, diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestSelectionAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestSelectionAdapter.kt index 78652ff06d..98cd7f3952 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestSelectionAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestSelectionAdapter.kt @@ -2,39 +2,48 @@ package de.westnordost.streetcomplete.settings.questselection import android.content.Context import android.content.SharedPreferences -import androidx.appcompat.app.AlertDialog -import androidx.recyclerview.widget.RecyclerView -import androidx.recyclerview.widget.ItemTouchHelper import android.view.LayoutInflater import android.view.MotionEvent import android.view.ViewGroup import android.widget.CompoundButton +import androidx.appcompat.app.AlertDialog import androidx.core.content.ContextCompat import androidx.core.view.isGone import androidx.core.view.isInvisible import androidx.lifecycle.Lifecycle import androidx.lifecycle.LifecycleObserver import androidx.lifecycle.OnLifecycleEvent -import java.util.concurrent.FutureTask -import javax.inject.Inject -import de.westnordost.countryboundaries.CountryBoundaries -import de.westnordost.streetcomplete.Prefs -import de.westnordost.streetcomplete.R +import androidx.recyclerview.widget.ItemTouchHelper import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_DRAG import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_IDLE import androidx.recyclerview.widget.ItemTouchHelper.DOWN import androidx.recyclerview.widget.ItemTouchHelper.UP +import androidx.recyclerview.widget.RecyclerView +import de.westnordost.countryboundaries.CountryBoundaries +import de.westnordost.streetcomplete.Prefs +import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType -import de.westnordost.streetcomplete.data.quest.* -import de.westnordost.streetcomplete.data.visiblequests.* import de.westnordost.streetcomplete.data.quest.AllCountries import de.westnordost.streetcomplete.data.quest.AllCountriesExcept import de.westnordost.streetcomplete.data.quest.NoCountriesExcept +import de.westnordost.streetcomplete.data.quest.QuestType +import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry +import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderController +import de.westnordost.streetcomplete.data.visiblequests.QuestTypeOrderSource +import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeController +import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeSource import de.westnordost.streetcomplete.databinding.RowQuestSelectionBinding import de.westnordost.streetcomplete.ktx.containsAny import de.westnordost.streetcomplete.settings.genericQuestTitle -import kotlinx.coroutines.* -import java.util.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancelChildren +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext +import java.util.Collections +import java.util.Locale +import java.util.concurrent.FutureTask /** Adapter for the list that in which the user can enable and disable quests as well as re-order * them */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestVisibility.kt b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestVisibility.kt index adacde47db..ee14350145 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestVisibility.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/settings/questselection/QuestVisibility.kt @@ -1,7 +1,7 @@ package de.westnordost.streetcomplete.settings.questselection -import de.westnordost.streetcomplete.data.quest.QuestType import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestType +import de.westnordost.streetcomplete.data.quest.QuestType data class QuestVisibility(val questType: QuestType<*>, var visible: Boolean) { val isInteractionEnabled get() = questType !is OsmNoteQuestType diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/AbstractInfoFakeDialogFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/AbstractInfoFakeDialogFragment.kt index c293a2a353..0daab61aeb 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/AbstractInfoFakeDialogFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/AbstractInfoFakeDialogFragment.kt @@ -9,7 +9,11 @@ import android.view.animation.AccelerateInterpolator import android.view.animation.DecelerateInterpolator import android.view.animation.OvershootInterpolator import androidx.fragment.app.Fragment -import de.westnordost.streetcomplete.util.* +import de.westnordost.streetcomplete.util.Transforms +import de.westnordost.streetcomplete.util.ViewPropertyAnimatorsPlayer +import de.westnordost.streetcomplete.util.animateFrom +import de.westnordost.streetcomplete.util.animateTo +import de.westnordost.streetcomplete.util.applyTransforms /** It is not a real dialog because a real dialog has its own window, or in other words, has a * different root view than the rest of the UI. However, for the calculation to animate the icon diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/AchievementInfoFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/AchievementInfoFragment.kt index e762cf8ef9..692f8d2299 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/AchievementInfoFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/AchievementInfoFragment.kt @@ -9,7 +9,10 @@ import android.os.Bundle import android.view.View import android.view.ViewGroup import android.view.ViewPropertyAnimator -import android.view.animation.* +import android.view.animation.AccelerateDecelerateInterpolator +import android.view.animation.AccelerateInterpolator +import android.view.animation.DecelerateInterpolator +import android.view.animation.OvershootInterpolator import androidx.core.net.toUri import androidx.core.view.isGone import androidx.fragment.app.Fragment @@ -20,7 +23,11 @@ import de.westnordost.streetcomplete.data.user.achievements.Achievement import de.westnordost.streetcomplete.databinding.FragmentAchievementInfoBinding import de.westnordost.streetcomplete.ktx.tryStartActivity import de.westnordost.streetcomplete.ktx.viewBinding -import de.westnordost.streetcomplete.util.* +import de.westnordost.streetcomplete.util.Transforms +import de.westnordost.streetcomplete.util.ViewPropertyAnimatorsPlayer +import de.westnordost.streetcomplete.util.animateFrom +import de.westnordost.streetcomplete.util.animateTo +import de.westnordost.streetcomplete.util.applyTransforms /** Shows details for a certain level of one achievement as a fake-dialog. diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/AchievementsFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/AchievementsFragment.kt index 8a01969ac1..644df0fc25 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/AchievementsFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/AchievementsFragment.kt @@ -22,7 +22,9 @@ import de.westnordost.streetcomplete.ktx.viewBinding import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.view.GridLayoutSpacingItemDecoration import de.westnordost.streetcomplete.view.ListAdapter -import kotlinx.coroutines.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import javax.inject.Inject /** Shows the icons for all achieved achievements and opens a AchievementInfoFragment to show the diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/BallPitView.kt b/app/src/main/java/de/westnordost/streetcomplete/user/BallPitView.kt index 27b39bf687..1352a480da 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/BallPitView.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/BallPitView.kt @@ -10,7 +10,11 @@ import android.hardware.SensorManager import android.os.Handler import android.os.Looper import android.util.AttributeSet -import android.view.* +import android.view.GestureDetector +import android.view.LayoutInflater +import android.view.MotionEvent +import android.view.Surface +import android.view.View import android.view.animation.DecelerateInterpolator import android.widget.FrameLayout import androidx.core.content.getSystemService @@ -20,14 +24,24 @@ import androidx.lifecycle.OnLifecycleEvent import de.westnordost.streetcomplete.databinding.ViewBallPitBinding import de.westnordost.streetcomplete.ktx.awaitPreDraw import de.westnordost.streetcomplete.ktx.sumByFloat -import kotlinx.coroutines.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.cancel +import kotlinx.coroutines.launch import org.jbox2d.collision.shapes.ChainShape import org.jbox2d.collision.shapes.CircleShape import org.jbox2d.common.Vec2 import org.jbox2d.dynamics.Body import org.jbox2d.dynamics.BodyDef import org.jbox2d.dynamics.BodyType -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.cos +import kotlin.math.max +import kotlin.math.min +import kotlin.math.pow +import kotlin.math.sin +import kotlin.math.sqrt /** Shows the contained views in a physics simulated ball pit of some kind. */ class BallPitView @JvmOverloads constructor( diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/CircularFlagView.kt b/app/src/main/java/de/westnordost/streetcomplete/user/CircularFlagView.kt index 820cdc2c2a..4ac2dced1a 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/CircularFlagView.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/CircularFlagView.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.user import android.content.Context import android.content.res.Resources -import android.graphics.* +import android.graphics.Canvas +import android.graphics.Outline +import android.graphics.Path +import android.graphics.Rect +import android.graphics.RectF import android.graphics.drawable.Drawable import android.util.AttributeSet import android.view.View diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/LinksFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/LinksFragment.kt index 3a7ec5c3ad..4f3c4dc606 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/LinksFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/LinksFragment.kt @@ -13,9 +13,15 @@ import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.data.user.achievements.AchievementsSource import de.westnordost.streetcomplete.data.user.statistics.StatisticsSource import de.westnordost.streetcomplete.databinding.FragmentLinksBinding -import de.westnordost.streetcomplete.ktx.* +import de.westnordost.streetcomplete.ktx.awaitLayout +import de.westnordost.streetcomplete.ktx.toDp +import de.westnordost.streetcomplete.ktx.tryStartActivity +import de.westnordost.streetcomplete.ktx.viewBinding +import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.view.GridLayoutSpacingItemDecoration -import kotlinx.coroutines.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import javax.inject.Inject /** Shows the user's unlocked links */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/LoginFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/LoginFragment.kt index 6b00522521..62e5e2efbc 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/LoginFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/LoginFragment.kt @@ -25,7 +25,9 @@ import de.westnordost.streetcomplete.ktx.toast import de.westnordost.streetcomplete.ktx.viewBinding import de.westnordost.streetcomplete.ktx.viewLifecycleScope import de.westnordost.streetcomplete.settings.OAuthFragment -import kotlinx.coroutines.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import oauth.signpost.OAuthConsumer import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/PhysicsWorldController.kt b/app/src/main/java/de/westnordost/streetcomplete/user/PhysicsWorldController.kt index f468115aaf..c6d7314871 100755 --- a/app/src/main/java/de/westnordost/streetcomplete/user/PhysicsWorldController.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/PhysicsWorldController.kt @@ -2,14 +2,13 @@ package de.westnordost.streetcomplete.user import android.os.Handler import android.os.HandlerThread -import kotlinx.coroutines.* import kotlinx.coroutines.android.asCoroutineDispatcher +import kotlinx.coroutines.withContext import org.jbox2d.collision.shapes.Shape import org.jbox2d.common.Vec2 import org.jbox2d.dynamics.Body import org.jbox2d.dynamics.BodyDef import org.jbox2d.dynamics.World -import java.lang.Runnable import kotlin.math.max /** Contains the physics simulation world and the physics simulation loop */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/user/ProfileFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/user/ProfileFragment.kt index 5bbe24ae36..4b4a3bba8c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/user/ProfileFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/user/ProfileFragment.kt @@ -11,10 +11,12 @@ import androidx.core.view.isGone import androidx.fragment.app.Fragment import de.westnordost.streetcomplete.Injector import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osmnotes.NotesModule import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource +import de.westnordost.streetcomplete.data.osmnotes.NotesModule import de.westnordost.streetcomplete.data.quest.QuestType -import de.westnordost.streetcomplete.data.user.* +import de.westnordost.streetcomplete.data.user.UserDataSource +import de.westnordost.streetcomplete.data.user.UserLoginStatusController +import de.westnordost.streetcomplete.data.user.UserUpdater import de.westnordost.streetcomplete.data.user.achievements.AchievementsSource import de.westnordost.streetcomplete.data.user.statistics.StatisticsSource import de.westnordost.streetcomplete.databinding.FragmentProfileBinding @@ -22,7 +24,9 @@ import de.westnordost.streetcomplete.ktx.createBitmap import de.westnordost.streetcomplete.ktx.tryStartActivity import de.westnordost.streetcomplete.ktx.viewBinding import de.westnordost.streetcomplete.ktx.viewLifecycleScope -import kotlinx.coroutines.* +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import java.io.File import java.util.Locale import javax.inject.Inject diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/LocaleListCompatUtils.kt b/app/src/main/java/de/westnordost/streetcomplete/util/LocaleListCompatUtils.kt index 607928cae6..a3a89d83d5 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/LocaleListCompatUtils.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/LocaleListCompatUtils.kt @@ -9,7 +9,7 @@ import androidx.core.os.LocaleListCompat import androidx.preference.PreferenceManager import de.westnordost.streetcomplete.Prefs import de.westnordost.streetcomplete.ktx.addedToFront -import java.util.* +import java.util.Locale /** Get the override-locale selected in this app or null if there is no override */ fun getSelectedLocale(context: Context): Locale? { diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/SlippyMapMath.kt b/app/src/main/java/de/westnordost/streetcomplete/util/SlippyMapMath.kt index 77c25685d9..6d40f62fb8 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/SlippyMapMath.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/SlippyMapMath.kt @@ -4,7 +4,11 @@ import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.data.osm.mapdata.splitAt180thMeridian import kotlinx.serialization.Serializable -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.asinh +import kotlin.math.atan +import kotlin.math.sinh +import kotlin.math.tan /** X and Y position of a tile */ @Serializable diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/SphericalEarthMath.kt b/app/src/main/java/de/westnordost/streetcomplete/util/SphericalEarthMath.kt index 6d64f49ba9..5d2d32fe33 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/SphericalEarthMath.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/SphericalEarthMath.kt @@ -9,7 +9,17 @@ import de.westnordost.streetcomplete.ktx.forEachLine import de.westnordost.streetcomplete.util.math.arcIntersection import de.westnordost.streetcomplete.util.math.toLatLon import de.westnordost.streetcomplete.util.math.toNormalOnSphere -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.acos +import kotlin.math.asin +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.pow +import kotlin.math.sign +import kotlin.math.sin +import kotlin.math.sqrt +import kotlin.math.tan /** Calculate stuff assuming a spherical Earth. The Earth is not spherical, but it is a good * approximation and totally sufficient for our use here. */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/math/SphericalEarthMathVector3d.kt b/app/src/main/java/de/westnordost/streetcomplete/util/math/SphericalEarthMathVector3d.kt index 39d690ea33..4052ff1e09 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/math/SphericalEarthMathVector3d.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/math/SphericalEarthMathVector3d.kt @@ -2,7 +2,13 @@ package de.westnordost.streetcomplete.util.math import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.util.normalizeRadians -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.max +import kotlin.math.min +import kotlin.math.sin +import kotlin.math.sqrt /* The following formulas have been adapted from this excellent source: http://www.movable-type.co.uk/scripts/latlong-vectors.html#intersection diff --git a/app/src/main/java/de/westnordost/streetcomplete/util/math/Vector3d.kt b/app/src/main/java/de/westnordost/streetcomplete/util/math/Vector3d.kt index d91358e241..7c806ac81e 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/util/math/Vector3d.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/util/math/Vector3d.kt @@ -1,6 +1,10 @@ package de.westnordost.streetcomplete.util.math -import kotlin.math.* +import kotlin.math.atan2 +import kotlin.math.cos +import kotlin.math.sign +import kotlin.math.sin +import kotlin.math.sqrt /* The following code has been adapted from this excellent source: diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/AutoCorrectAbbreviationsEditText.kt b/app/src/main/java/de/westnordost/streetcomplete/view/AutoCorrectAbbreviationsEditText.kt index 46d9c6bb6e..3cdfa28dd7 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/AutoCorrectAbbreviationsEditText.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/AutoCorrectAbbreviationsEditText.kt @@ -1,13 +1,11 @@ package de.westnordost.streetcomplete.view import android.content.Context -import androidx.appcompat.R import android.text.Editable import android.util.AttributeSet import android.view.inputmethod.EditorInfo +import androidx.appcompat.R import androidx.appcompat.widget.AppCompatEditText - - import de.westnordost.streetcomplete.data.meta.Abbreviations import de.westnordost.streetcomplete.util.DefaultTextWatcher diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/StreetSideSelectPuzzle.kt b/app/src/main/java/de/westnordost/streetcomplete/view/StreetSideSelectPuzzle.kt index cab706f0cd..5552f59dd1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/StreetSideSelectPuzzle.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/StreetSideSelectPuzzle.kt @@ -6,18 +6,22 @@ import android.graphics.Matrix import android.graphics.Shader import android.graphics.drawable.BitmapDrawable import android.util.AttributeSet -import android.view.* +import android.view.LayoutInflater +import android.view.View import android.widget.FrameLayout import android.widget.ImageView import android.widget.RelativeLayout import androidx.core.view.doOnPreDraw import androidx.core.view.isGone - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.ViewSideSelectPuzzleBinding import de.westnordost.streetcomplete.ktx.getBitmapDrawable import de.westnordost.streetcomplete.ktx.showTapHint -import kotlin.math.* +import kotlin.math.PI +import kotlin.math.abs +import kotlin.math.cos +import kotlin.math.max +import kotlin.math.min /** A very custom view that conceptually shows the left and right side of a street. Both sides * are clickable.
diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/RangePickerDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/RangePickerDialog.kt index 1dc94f7728..270205aa89 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/RangePickerDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/RangePickerDialog.kt @@ -1,12 +1,11 @@ package de.westnordost.streetcomplete.view.dialogs import android.content.Context -import androidx.appcompat.app.AlertDialog import android.view.LayoutInflater import android.view.ViewGroup import android.widget.EditText +import androidx.appcompat.app.AlertDialog import androidx.core.view.children - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.databinding.DialogRangePickerBinding diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/ValuePickerDialog.kt b/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/ValuePickerDialog.kt index 1af994fbe1..267049f92b 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/ValuePickerDialog.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/dialogs/ValuePickerDialog.kt @@ -2,14 +2,13 @@ package de.westnordost.streetcomplete.view.dialogs import android.content.Context import android.content.DialogInterface -import androidx.appcompat.app.AlertDialog import android.view.LayoutInflater import android.view.ViewGroup import android.widget.EditText import android.widget.NumberPicker import androidx.annotation.LayoutRes +import androidx.appcompat.app.AlertDialog import androidx.core.view.children - import de.westnordost.streetcomplete.R import de.westnordost.streetcomplete.ktx.spToPx diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/image_select/GroupedImageSelectAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/view/image_select/GroupedImageSelectAdapter.kt index a90017aefd..a8ad5a066c 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/image_select/GroupedImageSelectAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/image_select/GroupedImageSelectAdapter.kt @@ -1,10 +1,9 @@ package de.westnordost.streetcomplete.view.image_select -import androidx.recyclerview.widget.GridLayoutManager -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup - +import androidx.recyclerview.widget.GridLayoutManager +import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.R /** Select one items from a groupable list of items */ diff --git a/app/src/main/java/de/westnordost/streetcomplete/view/image_select/ImageSelectAdapter.kt b/app/src/main/java/de/westnordost/streetcomplete/view/image_select/ImageSelectAdapter.kt index e33f9b7979..1c3f0859f1 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/view/image_select/ImageSelectAdapter.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/view/image_select/ImageSelectAdapter.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.view.image_select -import androidx.recyclerview.widget.RecyclerView import android.view.LayoutInflater import android.view.ViewGroup - +import androidx.recyclerview.widget.RecyclerView import de.westnordost.streetcomplete.R import java.util.concurrent.CopyOnWriteArrayList diff --git a/app/src/test/java/de/westnordost/streetcomplete/OpeningHoursParsingTest.kt b/app/src/test/java/de/westnordost/streetcomplete/OpeningHoursParsingTest.kt index 48e47fb63f..448d7e042d 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/OpeningHoursParsingTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/OpeningHoursParsingTest.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete import ch.poole.openinghoursparser.YearRange -import de.westnordost.streetcomplete.osm.opening_hours.parser.weekdaysCollideWithAnother import de.westnordost.streetcomplete.osm.opening_hours.parser.isSupported import de.westnordost.streetcomplete.osm.opening_hours.parser.isSupportedOpeningHours import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRows import de.westnordost.streetcomplete.osm.opening_hours.parser.toOpeningHoursRules +import de.westnordost.streetcomplete.osm.opening_hours.parser.weekdaysCollideWithAnother import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import java.net.HttpURLConnection diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/edithistory/EditHistoryControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/edithistory/EditHistoryControllerTest.kt index f78f7bc7c9..f6b321ff67 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/edithistory/EditHistoryControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/edithistory/EditHistoryControllerTest.kt @@ -9,8 +9,15 @@ import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsSource import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestController import de.westnordost.streetcomplete.data.quest.OsmQuestKey import de.westnordost.streetcomplete.data.quest.TestQuestTypeA -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.edit +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.noteEdit +import de.westnordost.streetcomplete.testutils.noteQuestHidden +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.questHidden +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionBuilderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionBuilderTest.kt index c1ee0ff593..2d65ae958d 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionBuilderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionBuilderTest.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter +import org.junit.Assert.assertEquals import org.junit.Test -import org.junit.Assert.* - class BooleanExpressionBuilderTest { @Test fun leaf() { check("a") } @Test fun and() { check("a*b") } diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionTest.kt index 3c7776f57d..8f13acd3b9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/BooleanExpressionTest.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.data.elementfilter +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class BooleanExpressionTest { @Test fun `match leaf`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpressionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpressionTest.kt index 8e47b7c043..79348158a3 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpressionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFilterExpressionTest.kt @@ -1,12 +1,13 @@ package de.westnordost.streetcomplete.data.elementfilter -import org.junit.Test - import de.westnordost.streetcomplete.data.elementfilter.filters.HasKey import de.westnordost.streetcomplete.data.elementfilter.filters.NotHasKey -import de.westnordost.streetcomplete.testutils.* - -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test import java.util.EnumSet class ElementFilterExpressionTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParserAndOverpassQueryCreatorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParserAndOverpassQueryCreatorTest.kt index 22e867d844..dc5b328f59 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParserAndOverpassQueryCreatorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersParserAndOverpassQueryCreatorTest.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.data.elementfilter import de.westnordost.streetcomplete.data.meta.toCheckDateString +import org.junit.Assert.assertEquals +import org.junit.Assert.fail import org.junit.Test - -import org.junit.Assert.* import java.text.ParseException /** Integration test for the filter parser, filter expression and creator, the whole way from parsing diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersTestUtils.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersTestUtils.kt index 529e7c41ca..7fd132c98e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersTestUtils.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/ElementFiltersTestUtils.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.data.elementfilter.filters.ElementFilter import de.westnordost.streetcomplete.ktx.toEpochMilli - +import de.westnordost.streetcomplete.testutils.node import java.time.LocalDate import java.time.LocalDateTime diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt index 0aaa9cdb6f..72700af87c 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/StringWithCursorTest.kt @@ -1,9 +1,13 @@ package de.westnordost.streetcomplete.data.elementfilter +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Assert.fail import org.junit.Test -import org.junit.Assert.* - class StringWithCursorTest { @Test fun advance() { val x = StringWithCursor("ab") diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/CombineFiltersTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/CombineFiltersTest.kt index 7d7ef9c336..7e504082b7 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/CombineFiltersTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/CombineFiltersTest.kt @@ -4,7 +4,8 @@ import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.on -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class CombineFiltersTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementFilterOverpassKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementFilterOverpassKtTest.kt index b8f136a75f..2c02d8c2b9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementFilterOverpassKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementFilterOverpassKtTest.kt @@ -2,7 +2,7 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.dateDaysAgo import de.westnordost.streetcomplete.data.meta.toCheckDateString -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementNewerThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementNewerThanTest.kt index 81e68510d9..177b4463f5 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementNewerThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementNewerThanTest.kt @@ -2,7 +2,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.dateDaysAgo import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class ElementNewerThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementOlderThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementOlderThanTest.kt index 17ac5c949b..2047044e8b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementOlderThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/ElementOlderThanTest.kt @@ -2,7 +2,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.dateDaysAgo import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class ElementOlderThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterOrEqualThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterOrEqualThanTest.kt index 16f3ccb549..e05c85c9a2 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterOrEqualThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterOrEqualThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterThanTest.kt index 657c6871c0..2ba8252f65 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagGreaterThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessOrEqualThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessOrEqualThanTest.kt index 7fb7599a59..0b6f82ea07 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessOrEqualThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessOrEqualThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessThanTest.kt index 6e3dd5faa4..9f8d00df21 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasDateTagLessThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyLikeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyLikeTest.kt index 010c0a86b9..fde4fa19e2 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyLikeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyLikeTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasKeyLikeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyTest.kt index 354a59c4af..c55f377ac8 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasKeyTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasKeyTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterOrEqualThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterOrEqualThanTest.kt index 1d86145afb..4f46387224 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterOrEqualThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterOrEqualThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagGreaterOrEqualThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterThanTest.kt index 1ee6cc0a7b..6b62251b3f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagGreaterThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagGreaterThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessOrEqualThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessOrEqualThanTest.kt index 3bfd070875..6f00764ceb 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessOrEqualThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessOrEqualThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagLessOrEqualThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessThanTest.kt index f11f191571..7d32958938 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLessThanTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagLessThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLikeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLikeTest.kt index 1be7512263..5f4af57065 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLikeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagLikeTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagLikeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagTest.kt index 45d45266f8..b814c27472 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagValueLikeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagValueLikeTest.kt index 23e2dd185b..ff9b6603fe 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagValueLikeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/HasTagValueLikeTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class HasTagValueLikeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyLikeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyLikeTest.kt index ba3cc343d8..28dde9c94f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyLikeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyLikeTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class NotHasKeyLikeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyTest.kt index 8a590a7398..943a98ef8a 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasKeyTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class NotHasKeyTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagTest.kt index 7af3e50248..337056fda9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class NotHasTagTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagValueLikeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagValueLikeTest.kt index 7e848c053c..5fd5743dbe 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagValueLikeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/NotHasTagValueLikeTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.matches -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class NotHasTagValueLikeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagNewerThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagNewerThanTest.kt index 5eb8c47a30..94cfe46d19 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagNewerThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagNewerThanTest.kt @@ -3,7 +3,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.dateDaysAgo import de.westnordost.streetcomplete.data.elementfilter.matches import de.westnordost.streetcomplete.data.meta.toCheckDateString -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class TagNewerThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagOlderThanTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagOlderThanTest.kt index 50f163f410..9209682f1f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagOlderThanTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/elementfilter/filters/TagOlderThanTest.kt @@ -3,7 +3,8 @@ package de.westnordost.streetcomplete.data.elementfilter.filters import de.westnordost.streetcomplete.data.elementfilter.dateDaysAgo import de.westnordost.streetcomplete.data.elementfilter.matches import de.westnordost.streetcomplete.data.meta.toCheckDateString -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class TagOlderThanTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/meta/AbbreviationsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/meta/AbbreviationsTest.kt index c6331142fa..97df6db892 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/meta/AbbreviationsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/meta/AbbreviationsTest.kt @@ -1,12 +1,13 @@ package de.westnordost.streetcomplete.data.meta +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test - import java.io.ByteArrayInputStream import java.util.Locale -import org.junit.Assert.* - class AbbreviationsTest { @Test fun `capitalizes first letter`() { assertEquals("Straße", abbr("str: straße", Locale.GERMANY).getExpansion("str", true, true)) diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/meta/ResurveyUtilsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/meta/ResurveyUtilsTest.kt index 527c6a87bf..80b6b506a6 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/meta/ResurveyUtilsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/meta/ResurveyUtilsTest.kt @@ -5,7 +5,9 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsControllerTest.kt index efc39a73ac..b7567a4a8e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/ElementEditsControllerTest.kt @@ -2,15 +2,20 @@ package de.westnordost.streetcomplete.data.osm.edits import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChanges import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd -import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.UpdateElementTagsAction import de.westnordost.streetcomplete.data.osm.edits.upload.LastEditTimeStore import de.westnordost.streetcomplete.data.osm.mapdata.ElementIdUpdate import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates import de.westnordost.streetcomplete.data.quest.TestQuestTypeA -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.edit +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.pGeom import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSourceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSourceTest.kt index 5919140a0a..d34f383553 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSourceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/MapDataWithEditsSourceTest.kt @@ -1,20 +1,40 @@ package de.westnordost.streetcomplete.data.osm.edits -import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryCreator import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryEntry -import de.westnordost.streetcomplete.data.osm.mapdata.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataChanges +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapDataWithGeometry import de.westnordost.streetcomplete.data.upload.ConflictException -import de.westnordost.streetcomplete.testutils.eq import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.edit +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.member +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.pGeom +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way import de.westnordost.streetcomplete.util.intersect -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong -import org.mockito.Mockito.* +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions class MapDataWithEditsSourceTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/delete/DeletePoiNodeActionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/delete/DeletePoiNodeActionTest.kt index bb1fbd7b68..df7db0c34b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/delete/DeletePoiNodeActionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/delete/DeletePoiNodeActionTest.kt @@ -7,7 +7,8 @@ import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.on import de.westnordost.streetcomplete.testutils.p -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayActionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayActionTest.kt index 00e77cafbc..82c7b8a0b7 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayActionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/split_way/SplitWayActionTest.kt @@ -1,20 +1,30 @@ package de.westnordost.streetcomplete.data.osm.edits.split_way -import de.westnordost.streetcomplete.data.osm.mapdata.MapData -import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY +import de.westnordost.streetcomplete.data.osm.mapdata.MapData import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.member +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way +import de.westnordost.streetcomplete.testutils.waysAsMembers import de.westnordost.streetcomplete.util.createTranslated -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test -import org.mockito.Mockito.* +import org.mockito.Mockito.reset class SplitWayActionTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesBuilderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesBuilderTest.kt index 96df8203d4..7d2f6b2e9f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesBuilderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesBuilderTest.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class StringMapChangesBuilderTest { @Test fun remove() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesTest.kt index 00662a6df8..1c24901ba1 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapChangesTest.kt @@ -2,10 +2,12 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test - -import org.junit.Assert.* -import org.mockito.Mockito.* +import org.mockito.Mockito.atLeastOnce +import org.mockito.Mockito.verify class StringMapChangesTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryAddTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryAddTest.kt index cfb0bbfde3..559d96447d 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryAddTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryAddTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class StringMapEntryAddTest { @Test fun `conflicts if already added with different value`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryDeleteTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryDeleteTest.kt index 56700c453a..bd25f3649e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryDeleteTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryDeleteTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class StringMapEntryDeleteTest { @Test fun `conflicts if already changed to different value`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryModifyTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryModifyTest.kt index 888abbe603..3a973b58c4 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryModifyTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/StringMapEntryModifyTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class StringMapEntryModifyTest { @Test fun `conflicts if already changed to different value`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsActionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsActionTest.kt index 8d23631d2c..5c129221bc 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsActionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/update_tags/UpdateElementTagsActionTest.kt @@ -1,12 +1,19 @@ package de.westnordost.streetcomplete.data.osm.edits.update_tags import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE import de.westnordost.streetcomplete.data.osm.mapdata.MapDataRepository import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.upload.ConflictException -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.member +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploaderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploaderTest.kt index 3e662a86a3..49b1cbd60e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploaderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditUploaderTest.kt @@ -1,10 +1,16 @@ package de.westnordost.streetcomplete.data.osm.edits.upload -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi import de.westnordost.streetcomplete.data.osm.edits.upload.changesets.OpenQuestChangesetsManager +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates import de.westnordost.streetcomplete.data.upload.ConflictException -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.edit +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploaderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploaderTest.kt index 5583f2a2db..43440433fd 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploaderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/ElementEditsUploaderTest.kt @@ -2,7 +2,11 @@ package de.westnordost.streetcomplete.data.osm.edits.upload import de.westnordost.streetcomplete.data.osm.edits.ElementEditsController import de.westnordost.streetcomplete.data.osm.edits.ElementIdProvider -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataController +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataUpdates import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.upload.OnUploadedChangeListener import de.westnordost.streetcomplete.data.user.statistics.StatisticsController @@ -18,7 +22,9 @@ import kotlinx.coroutines.runBlocking import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong -import org.mockito.Mockito.* +import org.mockito.Mockito.never +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions class ElementEditsUploaderTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/UpdatedElementsHandlerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/UpdatedElementsHandlerTest.kt index a40b6e07b6..96a2484d4a 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/UpdatedElementsHandlerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/UpdatedElementsHandlerTest.kt @@ -1,14 +1,21 @@ package de.westnordost.streetcomplete.data.osm.edits.upload +import de.westnordost.streetcomplete.data.osm.mapdata.DiffElement +import de.westnordost.streetcomplete.data.osm.mapdata.ElementIdUpdate +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY +import de.westnordost.streetcomplete.data.osm.mapdata.Relation import de.westnordost.streetcomplete.data.osm.mapdata.UpdatedElementsHandler -import de.westnordost.streetcomplete.data.osm.mapdata.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder import de.westnordost.streetcomplete.testutils.member import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.rel import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Test class UpdatedElementsHandlerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenQuestChangesetsManagerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenQuestChangesetsManagerTest.kt index e4169d05c6..44b35001d9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenQuestChangesetsManagerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/edits/upload/changesets/OpenQuestChangesetsManagerTest.kt @@ -1,17 +1,18 @@ package de.westnordost.streetcomplete.data.osm.edits.upload.changesets -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi import de.westnordost.streetcomplete.ApplicationConstants -import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.data.osm.edits.upload.LastEditTimeStore +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataApi import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.quest.TestQuestTypeA +import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test -import org.mockito.Mockito.* +import org.mockito.Mockito.never +import org.mockito.Mockito.verify import java.util.Locale class OpenQuestChangesetsManagerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreatorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreatorTest.kt index 1d8216c71f..c81c7d3936 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreatorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/ElementGeometryCreatorTest.kt @@ -1,14 +1,24 @@ package de.westnordost.streetcomplete.data.osm.geometry +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY import de.westnordost.streetcomplete.data.osm.mapdata.MapData import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData -import de.westnordost.streetcomplete.data.osm.mapdata.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.RelationMember +import de.westnordost.streetcomplete.data.osm.mapdata.Way +import de.westnordost.streetcomplete.testutils.member +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class ElementGeometryCreatorTest { @Test fun `create for node`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/NodeWayMapTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/NodeWayMapTest.kt index 3a700c358f..f49a341c30 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/NodeWayMapTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/NodeWayMapTest.kt @@ -1,10 +1,11 @@ package de.westnordost.streetcomplete.data.osm.geometry +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test - -import org.junit.Assert.* - class NodeWayMapTest { @Test fun all() { val way1 = listOf(1L, 2L, 3L) diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/PolylinesSerializerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/PolylinesSerializerTest.kt index 369ec2fd4d..60f6e422c6 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/PolylinesSerializerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/geometry/PolylinesSerializerTest.kt @@ -1,10 +1,9 @@ package de.westnordost.streetcomplete.data.osm.geometry import de.westnordost.streetcomplete.data.osm.mapdata.LatLon -import org.junit.Test import de.westnordost.streetcomplete.testutils.p - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Test class PolylinesSerializerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDaoTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDaoTest.kt index 5aa269924d..0e088da539 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDaoTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/ElementDaoTest.kt @@ -1,15 +1,16 @@ package de.westnordost.streetcomplete.data.osm.mapdata -import org.junit.Before -import org.junit.Test - -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.RELATION +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.WAY import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.node -import de.westnordost.streetcomplete.testutils.way import de.westnordost.streetcomplete.testutils.rel - -import org.mockito.Mockito.* +import de.westnordost.streetcomplete.testutils.way +import org.junit.Before +import org.junit.Test +import org.mockito.Mockito.anyCollection +import org.mockito.Mockito.verify class ElementDaoTest { private lateinit var nodeDao: NodeDao diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataControllerTest.kt index 44338c7e29..5c974d3861 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MapDataControllerTest.kt @@ -1,15 +1,23 @@ package de.westnordost.streetcomplete.data.osm.mapdata import de.westnordost.streetcomplete.data.osm.created_elements.CreatedElementsController -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryCreator import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryDao import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryEntry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.pGeom +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.Mockito.anyBoolean diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MutableMapDataWithGeometryTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MutableMapDataWithGeometryTest.kt index 3d986fd9ad..e83956cd67 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MutableMapDataWithGeometryTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/mapdata/MutableMapDataWithGeometryTest.kt @@ -7,7 +7,8 @@ import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.rel import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class MutableMapDataWithGeometryTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestControllerTest.kt index d6b9fde310..12686b5fe1 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osm/osmquests/OsmQuestControllerTest.kt @@ -4,13 +4,34 @@ import de.westnordost.countryboundaries.CountryBoundaries import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometryEntry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* -import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementKey +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType.NODE +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapDataWithGeometry import de.westnordost.streetcomplete.data.osmnotes.edits.NotesWithEditsSource -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.quest.Countries +import de.westnordost.streetcomplete.data.quest.NoCountriesExcept +import de.westnordost.streetcomplete.data.quest.OsmQuestKey +import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry +import de.westnordost.streetcomplete.data.quest.TestQuestTypeA import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.argThat +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.osmQuest +import de.westnordost.streetcomplete.testutils.osmQuestKey +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.pGeom +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.Mockito.verify diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NoteControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NoteControllerTest.kt index afb4e9691f..1f1b393e89 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NoteControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NoteControllerTest.kt @@ -1,11 +1,16 @@ package de.westnordost.streetcomplete.data.osmnotes -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.bbox import de.westnordost.streetcomplete.testutils.eq -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test -import org.mockito.Mockito.* +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions import java.lang.Thread.sleep class NoteControllerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloaderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloaderTest.kt index be23af74b9..9a1a20a957 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloaderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/NotesDownloaderTest.kt @@ -1,6 +1,11 @@ package de.westnordost.streetcomplete.data.osmnotes -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.on import kotlinx.coroutines.runBlocking import org.junit.Before import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsControllerTest.kt index 6b712bf20a..f6c2040855 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsControllerTest.kt @@ -1,12 +1,17 @@ package de.westnordost.streetcomplete.data.osmnotes.edits -import de.westnordost.streetcomplete.testutils.* import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.noteEdit +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong -import org.mockito.Mockito.verify import org.mockito.Mockito.never +import org.mockito.Mockito.verify class NoteEditsControllerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt index 7b43449d9a..bcc6f0dff9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NoteEditsUploaderTest.kt @@ -5,15 +5,21 @@ import de.westnordost.streetcomplete.data.osmnotes.NotesApi import de.westnordost.streetcomplete.data.osmnotes.StreetCompleteImageUploader import de.westnordost.streetcomplete.data.upload.ConflictException import de.westnordost.streetcomplete.data.upload.OnUploadedChangeListener -import de.westnordost.streetcomplete.testutils.* import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.noteEdit +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p import kotlinx.coroutines.cancelAndJoin import kotlinx.coroutines.launch import kotlinx.coroutines.runBlocking import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyLong -import org.mockito.Mockito.* +import org.mockito.Mockito.times +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions class NoteEditsUploaderTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSourceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSourceTest.kt index 4c70c78eb5..20e0424ed6 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSourceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/edits/NotesWithEditsSourceTest.kt @@ -7,8 +7,17 @@ import de.westnordost.streetcomplete.data.osmnotes.NoteController import de.westnordost.streetcomplete.data.user.User import de.westnordost.streetcomplete.data.user.UserDataSource import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.comment +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.noteEdit +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.Mockito.verify diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuestControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuestControllerTest.kt index 86b481001d..20777dff8e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuestControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/osmnotes/notequests/OsmNoteQuestControllerTest.kt @@ -5,8 +5,18 @@ import de.westnordost.streetcomplete.data.user.User import de.westnordost.streetcomplete.data.user.UserDataSource import de.westnordost.streetcomplete.data.user.UserLoginStatusSource import de.westnordost.streetcomplete.ktx.containsExactlyInAnyOrder -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.argThat +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.comment +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.note +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull import org.junit.Before import org.junit.Test import org.mockito.Mockito.verify diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/quest/TestQuestTypes.kt b/app/src/test/java/de/westnordost/streetcomplete/data/quest/TestQuestTypes.kt index 98a7a65511..477e0854a3 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/quest/TestQuestTypes.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/quest/TestQuestTypes.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.data.quest -import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.R -import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import de.westnordost.streetcomplete.data.osm.osmquests.Tags import de.westnordost.streetcomplete.data.user.achievements.QuestTypeAchievement import de.westnordost.streetcomplete.quests.AbstractQuestAnswerFragment diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/quest/UnsyncedChangesCountSourceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/quest/UnsyncedChangesCountSourceTest.kt index 6faefbf2c0..35f0a7e4f5 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/quest/UnsyncedChangesCountSourceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/quest/UnsyncedChangesCountSourceTest.kt @@ -1,20 +1,21 @@ package de.westnordost.streetcomplete.data.quest -import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource import de.westnordost.streetcomplete.data.osm.edits.ElementEdit import de.westnordost.streetcomplete.data.osm.edits.ElementEditsSource -import de.westnordost.streetcomplete.data.UnsyncedChangesCountSource import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestSource import de.westnordost.streetcomplete.data.osmnotes.edits.NoteEditsSource import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestSource +import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.noteEdit import de.westnordost.streetcomplete.testutils.on import kotlinx.coroutines.runBlocking -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test -import org.mockito.Mockito.* +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoInteractions import org.mockito.invocation.InvocationOnMock class UnsyncedChangesCountSourceTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/quest/VisibleQuestsSourceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/quest/VisibleQuestsSourceTest.kt index 09f709c257..3a029c6d95 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/quest/VisibleQuestsSourceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/quest/VisibleQuestsSourceTest.kt @@ -6,7 +6,14 @@ import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuest import de.westnordost.streetcomplete.data.osmnotes.notequests.OsmNoteQuestSource import de.westnordost.streetcomplete.data.visiblequests.TeamModeQuestFilter import de.westnordost.streetcomplete.data.visiblequests.VisibleQuestTypeSource -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.testutils.any +import de.westnordost.streetcomplete.testutils.bbox +import de.westnordost.streetcomplete.testutils.eq +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.osmNoteQuest +import de.westnordost.streetcomplete.testutils.osmQuest +import de.westnordost.streetcomplete.testutils.osmQuestKey import org.junit.Assert.assertEquals import org.junit.Assert.assertTrue import org.junit.Before diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/upload/VersionIsBannedCheckerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/upload/VersionIsBannedCheckerTest.kt index 3c836aa848..83c67d196c 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/upload/VersionIsBannedCheckerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/upload/VersionIsBannedCheckerTest.kt @@ -1,6 +1,6 @@ package de.westnordost.streetcomplete.data.upload -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class VersionIsBannedCheckerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementTest.kt index 57960e1437..214873b1b7 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementTest.kt @@ -1,6 +1,6 @@ package de.westnordost.streetcomplete.data.user.achievements -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class AchievementTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementsControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementsControllerTest.kt index 4aa208c5e6..bcfce64759 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementsControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/user/achievements/AchievementsControllerTest.kt @@ -10,7 +10,8 @@ import de.westnordost.streetcomplete.testutils.on import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test -import org.mockito.Mockito.* +import org.mockito.Mockito.verify +import org.mockito.Mockito.verifyNoMoreInteractions class AchievementsControllerTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsControllerTest.kt index ec11358858..a16507d8e3 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsControllerTest.kt @@ -7,10 +7,10 @@ import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry import de.westnordost.streetcomplete.data.quest.TestQuestTypeA import de.westnordost.streetcomplete.data.quest.TestQuestTypeB import de.westnordost.streetcomplete.data.user.UserLoginStatusSource +import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on import de.westnordost.streetcomplete.testutils.p -import de.westnordost.streetcomplete.testutils.any import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsParserTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsParserTest.kt index d8c9d96674..2c5fd543da 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsParserTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/user/statistics/StatisticsParserTest.kt @@ -4,9 +4,9 @@ import de.westnordost.streetcomplete.data.quest.QuestTypeRegistry import de.westnordost.streetcomplete.data.quest.TestQuestTypeA import de.westnordost.streetcomplete.data.quest.TestQuestTypeB import de.westnordost.streetcomplete.data.quest.TestQuestTypeC -import java.time.OffsetDateTime import org.junit.Assert.assertEquals import org.junit.Test +import java.time.OffsetDateTime class StatisticsParserTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetControllerTest.kt index b4b8aad6e9..027e7e74ef 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestPresetControllerTest.kt @@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.data.visiblequests import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test import org.mockito.Mockito.verify diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderControllerTest.kt index 5d999297d6..8752bbfdd1 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/QuestTypeOrderControllerTest.kt @@ -1,10 +1,14 @@ package de.westnordost.streetcomplete.data.visiblequests -import de.westnordost.streetcomplete.data.quest.* +import de.westnordost.streetcomplete.data.quest.QuestType +import de.westnordost.streetcomplete.data.quest.TestQuestTypeA +import de.westnordost.streetcomplete.data.quest.TestQuestTypeB +import de.westnordost.streetcomplete.data.quest.TestQuestTypeC +import de.westnordost.streetcomplete.data.quest.TestQuestTypeD import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test import org.mockito.Mockito.verify diff --git a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeControllerTest.kt b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeControllerTest.kt index 0f7099ce86..00e28ba123 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeControllerTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/data/visiblequests/VisibleQuestTypeControllerTest.kt @@ -8,7 +8,8 @@ import de.westnordost.streetcomplete.testutils.any import de.westnordost.streetcomplete.testutils.eq import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.testutils.on -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.Mockito.times diff --git a/app/src/test/java/de/westnordost/streetcomplete/ktx/CollectionsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/ktx/CollectionsTest.kt index 0769178ef8..b5a0fcc7fb 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/ktx/CollectionsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/ktx/CollectionsTest.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.ktx import de.westnordost.streetcomplete.data.osm.mapdata.LatLon import de.westnordost.streetcomplete.testutils.p -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.fail import org.junit.Test class CollectionsTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/ktx/ElementTest.kt b/app/src/test/java/de/westnordost/streetcomplete/ktx/ElementTest.kt index f478a65824..896d68944c 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/ktx/ElementTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/ktx/ElementTest.kt @@ -2,7 +2,8 @@ package de.westnordost.streetcomplete.ktx import de.westnordost.streetcomplete.testutils.rel import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class ElementTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/map/tangram/TangramExtensionsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/map/tangram/TangramExtensionsTest.kt index 01e2b9f006..11d54f655f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/map/tangram/TangramExtensionsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/map/tangram/TangramExtensionsTest.kt @@ -1,10 +1,8 @@ package de.westnordost.streetcomplete.map.tangram -import org.junit.Test - import de.westnordost.streetcomplete.testutils.p - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Test class TangramExtensionsTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/LevelKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/LevelKtTest.kt index a55d179bc8..d3b867cc54 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/LevelKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/LevelKtTest.kt @@ -1,6 +1,9 @@ package de.westnordost.streetcomplete.osm -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test class LevelKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/RoadWidthKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/RoadWidthKtTest.kt index 71011e20ad..d69c221824 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/RoadWidthKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/RoadWidthKtTest.kt @@ -1,6 +1,6 @@ package de.westnordost.streetcomplete.osm -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class RoadWidthKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/ShouldersKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/ShouldersKtTest.kt index 1374852c43..d230f3e897 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/ShouldersKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/ShouldersKtTest.kt @@ -1,6 +1,6 @@ package de.westnordost.streetcomplete.osm -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class ShouldersKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParserKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParserKtTest.kt index 6d4c3c91bd..c2c3cb65e9 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParserKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/cycleway/CyclewayParserKtTest.kt @@ -1,8 +1,25 @@ package de.westnordost.streetcomplete.osm.cycleway -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* - -import org.junit.Assert.* +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.BUSWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.INVALID +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE_NO_ONEWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.PICTOGRAMS +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SEPARATE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SIDEWALK_EXPLICIT +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNKNOWN_SHARED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_SHARED_LANE +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class CyclewayParserKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/CircularSectionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/CircularSectionTest.kt index 4ecf8fec29..85b042acac 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/CircularSectionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/CircularSectionTest.kt @@ -1,9 +1,11 @@ package de.westnordost.streetcomplete.osm.opening_hours.model +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNotEquals +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class CircularSectionTest { @Test fun `start and end`() { val cs = CircularSection(0, 10) diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/MonthsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/MonthsTest.kt index 84b5c37b90..4b2b90cd94 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/MonthsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/MonthsTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.osm.opening_hours.model +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class MonthsTest { @Test fun isSelectionEmpty() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/NumberSystemTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/NumberSystemTest.kt index d2a69b50ee..f24f8959f1 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/NumberSystemTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/NumberSystemTest.kt @@ -1,10 +1,9 @@ package de.westnordost.streetcomplete.osm.opening_hours.model - +import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class NumberSystemTest { @Test(expected = IllegalArgumentException::class) fun `illegal arguments`() { NumberSystem(10, 3) diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/TimeRangeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/TimeRangeTest.kt index 3f18daa7d4..e856d9b81d 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/TimeRangeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/TimeRangeTest.kt @@ -1,11 +1,11 @@ package de.westnordost.streetcomplete.osm.opening_hours.model +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test - import java.util.Locale -import org.junit.Assert.* - class TimeRangeTest { @Test fun intersect() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/WeekdaysTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/WeekdaysTest.kt index aadcd3cee2..483d9e283b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/WeekdaysTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/opening_hours/model/WeekdaysTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.osm.opening_hours.model +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test -import org.junit.Assert.* - class WeekdaysTest { @Test fun isSelectionEmpty() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParserKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParserKtTest.kt index 9d872aef70..c3916bd1f0 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParserKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/osm/street_parking/StreetParkingParserKtTest.kt @@ -1,12 +1,15 @@ package de.westnordost.streetcomplete.osm.street_parking -import org.junit.Assert.* +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.DIAGONAL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PARALLEL +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.PERPENDICULAR +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.HALF_ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_KERB +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.ON_STREET +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.STREET_SIDE +import org.junit.Assert.assertEquals import org.junit.Test -import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition.* -import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation.* - - class StreetParkingParserKtTest { @Test fun `parallel parking on street left`() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddCrossingTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddCrossingTypeTest.kt index f4c45e930a..a31b34c1bc 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddCrossingTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddCrossingTypeTest.kt @@ -4,7 +4,8 @@ import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.crossing_type.AddCrossingType -import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.* +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.MARKED +import de.westnordost.streetcomplete.quests.crossing_type.CrossingType.TRAFFIC_SIGNALS import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddCyclewayTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddCyclewayTest.kt index b69c6ad8d6..dc32d63151 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddCyclewayTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddCyclewayTest.kt @@ -8,11 +8,31 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.osm.cycleway.Cycleway -import de.westnordost.streetcomplete.quests.cycleway.* -import de.westnordost.streetcomplete.osm.cycleway.Cycleway.* -import de.westnordost.streetcomplete.testutils.* +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.ADVISORY_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.BUSWAY +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.DUAL_TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.EXCLUSIVE_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.NONE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.PICTOGRAMS +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SEPARATE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SIDEWALK_EXPLICIT +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.SUGGESTION_LANE +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.TRACK +import de.westnordost.streetcomplete.osm.cycleway.Cycleway.UNSPECIFIED_LANE +import de.westnordost.streetcomplete.quests.cycleway.AddCycleway +import de.westnordost.streetcomplete.quests.cycleway.CyclewayAnswer +import de.westnordost.streetcomplete.quests.cycleway.CyclewaySide +import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.on +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.pGeom +import de.westnordost.streetcomplete.testutils.way import de.westnordost.streetcomplete.util.translate -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test import org.mockito.ArgumentMatchers.anyDouble diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxHeightTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxHeightTest.kt index 594a59991f..bb8180e032 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxHeightTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxHeightTest.kt @@ -1,10 +1,14 @@ package de.westnordost.streetcomplete.quests -import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry -import de.westnordost.streetcomplete.quests.max_height.* +import de.westnordost.streetcomplete.quests.max_height.AddMaxHeight +import de.westnordost.streetcomplete.quests.max_height.ImperialFeetAndInches +import de.westnordost.streetcomplete.quests.max_height.MaxHeight +import de.westnordost.streetcomplete.quests.max_height.Meters +import de.westnordost.streetcomplete.quests.max_height.NoMaxHeightSign import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.way import org.junit.Assert.assertEquals import org.junit.Assert.assertNull diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxSpeedTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxSpeedTest.kt index 7b5ee0e071..180195db1a 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxSpeedTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxSpeedTest.kt @@ -2,7 +2,14 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify -import de.westnordost.streetcomplete.quests.max_speed.* +import de.westnordost.streetcomplete.quests.max_speed.AddMaxSpeed +import de.westnordost.streetcomplete.quests.max_speed.AdvisorySpeedSign +import de.westnordost.streetcomplete.quests.max_speed.ImplicitMaxSpeed +import de.westnordost.streetcomplete.quests.max_speed.IsLivingStreet +import de.westnordost.streetcomplete.quests.max_speed.Kmh +import de.westnordost.streetcomplete.quests.max_speed.MaxSpeedSign +import de.westnordost.streetcomplete.quests.max_speed.MaxSpeedZone +import de.westnordost.streetcomplete.quests.max_speed.Mph import org.junit.Test class AddMaxSpeedTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxWeightTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxWeightTest.kt index 16fb355f0f..be67527a14 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxWeightTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddMaxWeightTest.kt @@ -1,7 +1,13 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd -import de.westnordost.streetcomplete.quests.max_weight.* +import de.westnordost.streetcomplete.quests.max_weight.AddMaxWeight +import de.westnordost.streetcomplete.quests.max_weight.ImperialPounds +import de.westnordost.streetcomplete.quests.max_weight.MaxWeight +import de.westnordost.streetcomplete.quests.max_weight.MaxWeightSign +import de.westnordost.streetcomplete.quests.max_weight.MetricTons +import de.westnordost.streetcomplete.quests.max_weight.NoMaxWeightSign +import de.westnordost.streetcomplete.quests.max_weight.ShortTons import org.junit.Test class AddMaxWeightTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddParkingFeeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddParkingFeeTest.kt index f279260024..b4cddc5463 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddParkingFeeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddParkingFeeTest.kt @@ -9,7 +9,11 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList -import de.westnordost.streetcomplete.quests.parking_fee.* +import de.westnordost.streetcomplete.quests.parking_fee.AddParkingFee +import de.westnordost.streetcomplete.quests.parking_fee.HasFee +import de.westnordost.streetcomplete.quests.parking_fee.HasFeeAtHours +import de.westnordost.streetcomplete.quests.parking_fee.HasFeeExceptAtHours +import de.westnordost.streetcomplete.quests.parking_fee.HasNoFee import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddPlaceNameTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddPlaceNameTest.kt index 209c8558d7..59031af318 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddPlaceNameTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddPlaceNameTest.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd -import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.quests.place_name.AddPlaceName import de.westnordost.streetcomplete.quests.place_name.NoPlaceNameSign import de.westnordost.streetcomplete.quests.place_name.PlaceName +import de.westnordost.streetcomplete.testutils.mock import org.junit.Test class AddPlaceNameTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddPostboxCollectionTimesTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddPostboxCollectionTimesTest.kt index 9e120c3a7b..bfce78d4f2 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddPostboxCollectionTimesTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddPostboxCollectionTimesTest.kt @@ -6,7 +6,9 @@ import ch.poole.openinghoursparser.WeekDay import ch.poole.openinghoursparser.WeekDayRange import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList -import de.westnordost.streetcomplete.quests.postbox_collection_times.* +import de.westnordost.streetcomplete.quests.postbox_collection_times.AddPostboxCollectionTimes +import de.westnordost.streetcomplete.quests.postbox_collection_times.CollectionTimes +import de.westnordost.streetcomplete.quests.postbox_collection_times.NoCollectionTimesSign import org.junit.Test class AddPostboxCollectionTimesTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddProhibitedForPedestriansTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddProhibitedForPedestriansTest.kt index 6a87cfafb3..28c8f8bf69 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddProhibitedForPedestriansTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddProhibitedForPedestriansTest.kt @@ -3,7 +3,10 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.foot.AddProhibitedForPedestrians -import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.* +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.HAS_SEPARATE_SIDEWALK +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.IS_LIVING_STREET +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.NO +import de.westnordost.streetcomplete.quests.foot.ProhibitedForPedestriansAnswer.YES import org.junit.Test class AddProhibitedForPedestriansTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddRecyclingContainerMaterialsTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddRecyclingContainerMaterialsTest.kt index 04e5d1fec6..1603abb974 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddRecyclingContainerMaterialsTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddRecyclingContainerMaterialsTest.kt @@ -1,16 +1,19 @@ package de.westnordost.streetcomplete.quests -import de.westnordost.streetcomplete.testutils.p -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.recycling_material.AddRecyclingContainerMaterials -import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterials import de.westnordost.streetcomplete.quests.recycling_material.IsWasteContainer -import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.* -import de.westnordost.streetcomplete.util.translate +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.CLOTHES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PAPER +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_BOTTLES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.PLASTIC_PACKAGING +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterial.SHOES +import de.westnordost.streetcomplete.quests.recycling_material.RecyclingMaterials +import de.westnordost.streetcomplete.testutils.node import org.junit.Assert.assertEquals import org.junit.Test import java.time.Instant diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddSidewalkTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddSidewalkTest.kt index c298761fa7..e0fd2ca115 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddSidewalkTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddSidewalkTest.kt @@ -1,13 +1,15 @@ package de.westnordost.streetcomplete.quests -import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry import de.westnordost.streetcomplete.quests.sidewalk.AddSidewalk -import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.* +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.NO +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.SEPARATE +import de.westnordost.streetcomplete.quests.sidewalk.Sidewalk.YES import de.westnordost.streetcomplete.quests.sidewalk.SidewalkSides -import de.westnordost.streetcomplete.util.translate +import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.way +import de.westnordost.streetcomplete.util.translate import org.junit.Assert.assertEquals import org.junit.Assert.assertNull import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/AddSportTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/AddSportTest.kt index 81f5328cec..0a95b26bba 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/AddSportTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/AddSportTest.kt @@ -3,7 +3,10 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.sport.AddSport -import de.westnordost.streetcomplete.quests.sport.Sport.* +import de.westnordost.streetcomplete.quests.sport.Sport.FIELD_HOCKEY +import de.westnordost.streetcomplete.quests.sport.Sport.HANDBALL +import de.westnordost.streetcomplete.quests.sport.Sport.ICE_SKATING +import de.westnordost.streetcomplete.quests.sport.Sport.SOCCER import org.junit.Test class AddSportTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/LastPickedValuesStoreTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/LastPickedValuesStoreTest.kt index 1947635a3d..e075c1aac7 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/LastPickedValuesStoreTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/LastPickedValuesStoreTest.kt @@ -1,6 +1,8 @@ package de.westnordost.streetcomplete.quests -import de.westnordost.streetcomplete.quests.Letter.* +import de.westnordost.streetcomplete.quests.Letter.A +import de.westnordost.streetcomplete.quests.Letter.B +import de.westnordost.streetcomplete.quests.Letter.C import org.junit.Assert.assertEquals import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/OsmElementQuestType.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/OsmElementQuestType.kt index 1941447436..6b851ae9fc 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/OsmElementQuestType.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/OsmElementQuestType.kt @@ -1,10 +1,9 @@ package de.westnordost.streetcomplete.quests import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapChangesBuilder -import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryChange - -import org.assertj.core.api.Assertions.* +import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType +import org.assertj.core.api.Assertions.assertThat fun OsmElementQuestType.verifyAnswer(tags:Map, answer:T, vararg expectedChanges: StringMapEntryChange) { val cb = StringMapChangesBuilder(tags) diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/TestMapDataWithGeometry.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/TestMapDataWithGeometry.kt index d02df66e3c..60ebe52122 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/TestMapDataWithGeometry.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/TestMapDataWithGeometry.kt @@ -1,9 +1,14 @@ package de.westnordost.streetcomplete.quests -import de.westnordost.streetcomplete.testutils.bbox import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry +import de.westnordost.streetcomplete.data.osm.mapdata.MutableMapData +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.Way +import de.westnordost.streetcomplete.testutils.bbox class TestMapDataWithGeometry(elements: Iterable) : MutableMapData(), MapDataWithGeometry { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetTest.kt index ad20c28fd8..c2a7c89f4b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddAddressStreetTest.kt @@ -1,12 +1,13 @@ package de.westnordost.streetcomplete.quests.address import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.testutils.member import de.westnordost.streetcomplete.testutils.node -import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.testutils.rel import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class AddAddressStreetTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddHousenumberTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddHousenumberTest.kt index 41e4073229..489a73d720 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddHousenumberTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/address/AddHousenumberTest.kt @@ -4,11 +4,20 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPolygonsGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.quests.createMapData import de.westnordost.streetcomplete.quests.verifyAnswer -import de.westnordost.streetcomplete.testutils.* -import org.junit.Assert.* +import de.westnordost.streetcomplete.testutils.member +import de.westnordost.streetcomplete.testutils.node +import de.westnordost.streetcomplete.testutils.p +import de.westnordost.streetcomplete.testutils.rel +import de.westnordost.streetcomplete.testutils.way +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test class AddHousenumberTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/address/HousenumberParserKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/address/HousenumberParserKtTest.kt index 93f76918d6..8bd3e3da5e 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/address/HousenumberParserKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/address/HousenumberParserKtTest.kt @@ -1,6 +1,9 @@ package de.westnordost.streetcomplete.quests.address -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test class HousenumberParserKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddDetectBarrierIntersectionTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddDetectBarrierIntersectionTest.kt index 520b54d217..72fa79f067 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddDetectBarrierIntersectionTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddDetectBarrierIntersectionTest.kt @@ -1,7 +1,6 @@ package de.westnordost.streetcomplete.quests.barrier_type import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry -import de.westnordost.streetcomplete.quests.crossing.AddCrossing import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.way diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt index 68135af86f..f1e1ae5310 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/barrier_type/AddStileTypeTest.kt @@ -4,9 +4,9 @@ import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify +import de.westnordost.streetcomplete.quests.verifyAnswer import org.junit.Test import java.time.LocalDate -import de.westnordost.streetcomplete.quests.verifyAnswer class AddStileTypeTest { private val questType = AddStileType() diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt index e8b2f25218..3e8747da52 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/car_wash_type/AddCarWashTypeTest.kt @@ -1,9 +1,11 @@ package de.westnordost.streetcomplete.quests.car_wash_type import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.AUTOMATED +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SELF_SERVICE +import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.SERVICE import de.westnordost.streetcomplete.quests.verifyAnswer import org.junit.Test -import de.westnordost.streetcomplete.quests.car_wash_type.CarWashType.* class AddCarWashTypeTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperatorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperatorTest.kt index 090428dbcc..09ff13584c 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperatorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/clothing_bin_operator/AddClothingBinOperatorTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.quests.clothing_bin_operator import de.westnordost.streetcomplete.testutils.node -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class AddClothingBinOperatorTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing/AddCrossingTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing/AddCrossingTest.kt index 88b8eb3cd2..62a82f780f 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing/AddCrossingTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing/AddCrossingTest.kt @@ -4,8 +4,7 @@ import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class AddCrossingTest { @@ -49,7 +48,7 @@ class AddCrossingTest { way(1, nodes = listOf(1, 2, 3), tags = mapOf("highway" to "unclassified")), way(2, nodes = listOf(4, 2, 5), tags = mapOf("highway" to "footway")), )) - Assert.assertEquals(0, questType.getApplicableElements(mapData).toList().size) + assertEquals(0, questType.getApplicableElements(mapData).toList().size) } /* diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIslandTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIslandTest.kt index bdf1dd5c70..a7fae731ed 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIslandTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/crossing_island/AddCrossingIslandTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.quests.crossing_island -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry +import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class AddCrossingIslandTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/existence/CheckExistenceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/existence/CheckExistenceTest.kt index ad575829b7..2d074cb2f8 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/existence/CheckExistenceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/existence/CheckExistenceTest.kt @@ -4,8 +4,8 @@ import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify -import de.westnordost.streetcomplete.testutils.mock import de.westnordost.streetcomplete.quests.verifyAnswer +import de.westnordost.streetcomplete.testutils.mock import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/kerb_height/KerbUtilTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/kerb_height/KerbUtilTest.kt index f7dbb527e0..f859947181 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/kerb_height/KerbUtilTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/kerb_height/KerbUtilTest.kt @@ -2,10 +2,12 @@ package de.westnordost.streetcomplete.quests.kerb_height import de.westnordost.streetcomplete.osm.kerb.couldBeAKerb import de.westnordost.streetcomplete.osm.kerb.findAllKerbNodes -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry +import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class KerbUtilTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/level/AddLevelTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/level/AddLevelTest.kt index bebafdf00b..86f563ea51 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/level/AddLevelTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/level/AddLevelTest.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.quests.createMapData import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class AddLevelTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursTest.kt index c27b5f8f6a..8c07f3c9c2 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHoursTest.kt @@ -4,7 +4,6 @@ import ch.poole.openinghoursparser.Rule import ch.poole.openinghoursparser.TimeSpan import ch.poole.openinghoursparser.WeekDay import ch.poole.openinghoursparser.WeekDayRange -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.data.meta.toCheckDate import de.westnordost.streetcomplete.data.meta.toCheckDateString import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd @@ -13,6 +12,7 @@ import de.westnordost.streetcomplete.ktx.toEpochMilli import de.westnordost.streetcomplete.osm.opening_hours.parser.OpeningHoursRuleList import de.westnordost.streetcomplete.quests.verifyAnswer import de.westnordost.streetcomplete.testutils.mock +import de.westnordost.streetcomplete.testutils.node import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierTest.kt index 5bf1fdb91d..80c7ee3b67 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/railway_crossing/AddRailwayCrossingBarrierTest.kt @@ -2,11 +2,12 @@ package de.westnordost.streetcomplete.quests.railway_crossing import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDelete -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.quests.verifyAnswer +import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class AddRailwayCrossingBarrierTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameTest.kt index 675b2dd455..6b383cfceb 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/AddRoadNameTest.kt @@ -1,10 +1,10 @@ package de.westnordost.streetcomplete.quests.road_name -import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.LocalizedName import de.westnordost.streetcomplete.quests.verifyAnswer +import de.westnordost.streetcomplete.testutils.p import org.junit.Test class AddRoadNameTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSourceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSourceTest.kt index e9648b31b1..08c2a34856 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSourceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/road_name/RoadNameSuggestionsSourceTest.kt @@ -1,6 +1,6 @@ package de.westnordost.streetcomplete.quests.road_name -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class RoadNameSuggestionsSourceTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothnessTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothnessTest.kt index a1e87105c0..622aa61277 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothnessTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/smoothness/AddRoadSmoothnessTest.kt @@ -6,7 +6,7 @@ import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryDe import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryModify import de.westnordost.streetcomplete.quests.verifyAnswer import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertTrue import org.junit.Test import java.time.LocalDate diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingTest.kt index a2e57c36c7..e932b6eb6b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/street_parking/AddStreetParkingTest.kt @@ -1,7 +1,14 @@ package de.westnordost.streetcomplete.quests.street_parking import de.westnordost.streetcomplete.data.osm.edits.update_tags.StringMapEntryAdd -import de.westnordost.streetcomplete.osm.street_parking.* +import de.westnordost.streetcomplete.osm.street_parking.LeftAndRightStreetParking +import de.westnordost.streetcomplete.osm.street_parking.NoStreetParking +import de.westnordost.streetcomplete.osm.street_parking.ParkingOrientation +import de.westnordost.streetcomplete.osm.street_parking.ParkingPosition +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingPositionAndOrientation +import de.westnordost.streetcomplete.osm.street_parking.StreetParkingSeparate +import de.westnordost.streetcomplete.osm.street_parking.StreetStandingProhibited +import de.westnordost.streetcomplete.osm.street_parking.StreetStoppingProhibited import de.westnordost.streetcomplete.quests.verifyAnswer import org.junit.Test diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/surface/AddPitchSurfaceTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/surface/AddPitchSurfaceTest.kt index ef43f35227..c034789a0b 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/surface/AddPitchSurfaceTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/surface/AddPitchSurfaceTest.kt @@ -1,7 +1,8 @@ package de.westnordost.streetcomplete.quests.surface import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue import org.junit.Test class AddPitchSurfaceTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalkTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalkTest.kt index 7a2cf0bfae..6a56f023cd 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalkTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/tactile_paving/AddTactilePavingCrosswalkTest.kt @@ -1,9 +1,10 @@ package de.westnordost.streetcomplete.quests.tactile_paving -import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry +import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull import org.junit.Test class AddTactilePavingCrosswalkTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSoundTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSoundTest.kt index 96f35a4eb5..b8aa361481 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSoundTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_sound/AddTrafficSignalsSoundTest.kt @@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.quests.traffic_signals_sound import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class AddTrafficSignalsSoundTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibrationTest.kt b/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibrationTest.kt index 0cecf88b57..8b776700ab 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibrationTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/quests/traffic_signals_vibrate/AddTrafficSignalsVibrationTest.kt @@ -3,7 +3,7 @@ package de.westnordost.streetcomplete.quests.traffic_signals_vibrate import de.westnordost.streetcomplete.quests.TestMapDataWithGeometry import de.westnordost.streetcomplete.testutils.node import de.westnordost.streetcomplete.testutils.way -import org.junit.Assert.* +import org.junit.Assert.assertEquals import org.junit.Test class AddTrafficSignalsVibrationTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt b/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt index af66eca420..bf26fe2fda 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/testutils/TestDataShortcuts.kt @@ -5,7 +5,14 @@ import de.westnordost.streetcomplete.data.osm.edits.ElementEditAction import de.westnordost.streetcomplete.data.osm.edits.delete.DeletePoiNodeAction import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.geometry.ElementPointGeometry -import de.westnordost.streetcomplete.data.osm.mapdata.* +import de.westnordost.streetcomplete.data.osm.mapdata.BoundingBox +import de.westnordost.streetcomplete.data.osm.mapdata.Element +import de.westnordost.streetcomplete.data.osm.mapdata.ElementType +import de.westnordost.streetcomplete.data.osm.mapdata.LatLon +import de.westnordost.streetcomplete.data.osm.mapdata.Node +import de.westnordost.streetcomplete.data.osm.mapdata.Relation +import de.westnordost.streetcomplete.data.osm.mapdata.RelationMember +import de.westnordost.streetcomplete.data.osm.mapdata.Way import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuest import de.westnordost.streetcomplete.data.osm.osmquests.OsmQuestHidden diff --git a/app/src/test/java/de/westnordost/streetcomplete/util/ElementGeometryUtilsKtTest.kt b/app/src/test/java/de/westnordost/streetcomplete/util/ElementGeometryUtilsKtTest.kt index 12fd2a4215..3f10714b60 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/util/ElementGeometryUtilsKtTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/util/ElementGeometryUtilsKtTest.kt @@ -1,9 +1,8 @@ package de.westnordost.streetcomplete.util -import de.westnordost.streetcomplete.testutils.p import de.westnordost.streetcomplete.data.osm.geometry.ElementPolylinesGeometry +import de.westnordost.streetcomplete.testutils.p import org.junit.Assert.assertTrue - import org.junit.Test class ElementGeometryUtilsKtTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/util/ReverseIteratorTest.kt b/app/src/test/java/de/westnordost/streetcomplete/util/ReverseIteratorTest.kt index 8a7688a155..368b44c444 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/util/ReverseIteratorTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/util/ReverseIteratorTest.kt @@ -1,9 +1,9 @@ package de.westnordost.streetcomplete.util +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse import org.junit.Test -import org.junit.Assert.* - class ReverseIteratorTest { @Test fun reverse() { diff --git a/app/src/test/java/de/westnordost/streetcomplete/util/SlippyMapMathTest.kt b/app/src/test/java/de/westnordost/streetcomplete/util/SlippyMapMathTest.kt index 4f3e9ef0bc..466bd81da3 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/util/SlippyMapMathTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/util/SlippyMapMathTest.kt @@ -2,7 +2,9 @@ package de.westnordost.streetcomplete.util import de.westnordost.streetcomplete.testutils.bbox import de.westnordost.streetcomplete.testutils.p -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue import org.junit.Test class SlippyMapMathTest { diff --git a/app/src/test/java/de/westnordost/streetcomplete/util/SphericalEarthMathTest.kt b/app/src/test/java/de/westnordost/streetcomplete/util/SphericalEarthMathTest.kt index 26b4d357b1..2c25988923 100644 --- a/app/src/test/java/de/westnordost/streetcomplete/util/SphericalEarthMathTest.kt +++ b/app/src/test/java/de/westnordost/streetcomplete/util/SphericalEarthMathTest.kt @@ -1,11 +1,12 @@ package de.westnordost.streetcomplete.util import de.westnordost.streetcomplete.data.osm.mapdata.LatLon -import org.junit.Test - import de.westnordost.streetcomplete.testutils.bbox - -import org.junit.Assert.* +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test import kotlin.math.PI import kotlin.math.roundToInt import kotlin.math.sqrt diff --git a/buildSrc/src/main/java/DownloadBrandLogosTask.kt b/buildSrc/src/main/java/DownloadBrandLogosTask.kt index 5a235bd665..a5014584c9 100644 --- a/buildSrc/src/main/java/DownloadBrandLogosTask.kt +++ b/buildSrc/src/main/java/DownloadBrandLogosTask.kt @@ -1,10 +1,10 @@ import com.beust.klaxon.JsonObject +import com.beust.klaxon.Parser import org.gradle.api.DefaultTask import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction import java.io.File -import com.beust.klaxon.Parser import java.io.FileNotFoundException import java.io.FileOutputStream import java.lang.Exception diff --git a/buildSrc/src/main/java/GenerateMetadataByCountry.kt b/buildSrc/src/main/java/GenerateMetadataByCountry.kt index 313f32c66f..240a3e7b8a 100644 --- a/buildSrc/src/main/java/GenerateMetadataByCountry.kt +++ b/buildSrc/src/main/java/GenerateMetadataByCountry.kt @@ -5,7 +5,6 @@ import org.gradle.api.DefaultTask import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction import org.gradle.kotlin.dsl.support.listFilesOrdered - import java.io.File import java.io.StringWriter diff --git a/buildSrc/src/main/java/UpdatePresetsTask.kt b/buildSrc/src/main/java/UpdatePresetsTask.kt index fbf06b27f4..042614e4f4 100644 --- a/buildSrc/src/main/java/UpdatePresetsTask.kt +++ b/buildSrc/src/main/java/UpdatePresetsTask.kt @@ -1,12 +1,12 @@ +import com.beust.klaxon.JsonArray +import com.beust.klaxon.JsonObject +import com.beust.klaxon.Parser import org.gradle.api.DefaultTask import org.gradle.api.tasks.Input import org.gradle.api.tasks.TaskAction import java.io.File -import java.net.URL -import com.beust.klaxon.Parser -import com.beust.klaxon.JsonObject -import com.beust.klaxon.JsonArray import java.io.StringWriter +import java.net.URL /** Update the presets metadata and its translations for use with the de.westnordost:osmfeatures library */ open class UpdatePresetsTask : DefaultTask() {